Thank you for your interest in Trinity-RFT! Our framework is built on a decoupled architecture consisting of the Explorer, Trainer, and Buffer. We welcome all forms of contributions—from core feature enhancements and new algorithms to documentation and bug reports.
Trinity-RFT provides modular interfaces for different technical interests. Please refer to our Developer Guide for detailed implementation standards:
| Focus Area | Interface/Code Directory | Potential Tasks |
|---|---|---|
| Agentic Workflows | Workflow |
Implementing multi-turn dialogs, ReAct workflows, or domain-specific agent training capabilities (e.g., Coding, Math). |
| RL Algorithms | Algorithm |
Integrating new RL algorithms (e.g., RLOO, GSPO) or optimizing loss functions and advantage estimations. |
| Data & Experience | Operator, Selector |
Designing data cleaning, selection, reward modeling, or experience augmentation and replay strategies. |
| Use Cases | Examples |
Sharing new usages and improving built-in demonstrated configurations. |
| General Utility | docs/, tests/ |
Improving documentation, adding translations, fixing bugs, or enhancing CLI/GUI tools. |
To minimize friction and keep the core codebase stable, we recommend the Plugin-First workflow for new features:
- Develop: Create your custom module in the
trinity/plugins/directory. - Auto-Load: Trinity-RFT automatically detects and registers modules in this directory at runtime without requiring changes to the framework's internal code.
- Integrate: Once your feature is stable and verified, submit a Pull Request to "graduate" your code from
plugins/into the formal modules (e.g.,trinity/algorithm/ortrinity/common/workflows/).
To ensure a smooth review process, please complete the following:
- Registration: If moving code from a plugin to the core framework, register it in the corresponding
__init__.pymapping. - Testing: Add or update unit tests in the
tests/directory. Verify your changes by running:python -m pytest tests/
- Code Style: We use
pre-committo maintain code quality. Run the following before committing:pre-commit run --all-files
- Description: Provide a clear PR title and a description that explains the motivation (why this change is needed) and the implementation (how it works).
- Bug Reports & Feature Requests: Please use GitHub Issues. For bugs, include reproduction steps, environment info, and error logs.
- Major Changes: For significant architectural changes or large features, please open an issue first to discuss the design with the maintainers.
- Documentation: We highly value improvements to our tutorials, docstrings, and translations.
For a deep dive into the framework's architecture, please refer to the Full Doc.
Thank you for helping us build a better Reinforcement Fine-Tuning framework!