Shortcuts

Contributing to LightRFT

Thank you for your interest in contributing to LightRFT! This guide will help you get started.

Ways to Contribute

  • 🐛 Report Bugs: Open an issue with detailed reproduction steps

  • 💡 Suggest Features: Propose new features or improvements

  • 📝 Improve Documentation: Fix typos, add examples, clarify instructions

  • 🔧 Submit Code: Implement features, fix bugs, optimize performance

  • Write Tests: Add test cases for better coverage

  • 🌍 Translate: Help translate documentation

Getting Started

  1. Fork the Repository

    git clone https://github.com/yourusername/LightRFT.git
    cd LightRFT
    
  2. Install Development Dependencies

    # Install LightRFT with all core dependencies (SGLang, Flash-Attention, etc.)
    pip install -e .
    
    # Install documentation dependencies
    
    # (Optional) Install vLLM if you need to test vLLM backend
    pip install ".[vllm]"
    
  3. Create a Branch

    git checkout -b feature/your-feature-name
    

Code Style

  • Follow PEP8 for Python code

  • Use meaningful variable and function names

  • Add docstrings to all public functions/classes

  • Keep functions focused and modular

Pull Request Process

  1. Before Submitting:

    • Test your changes thoroughly

    • Update documentation if needed

    • Add tests for new features

    • Ensure all tests pass

  2. Submit PR:

    • Write a clear PR title and description, following the format <type>(<author>): <description> (e.g., feature(username): add language switcher)

    • Reference related issues (e.g., “Fixes #123”)

    • Request review from maintainers

  3. After Submission:

    • Respond to review feedback

    • Make requested changes

    • Keep PR updated with main branch

Documentation

Documentation is built with Sphinx:

# Build documentation
make docs

# Live preview
make docs-live

Testing

# Run specific tests
pytest lightrft/models/tests/test_actor_vl.py

# Add your own tests in lightrft/models/tests/ directory

Questions?

Thank you for contributing to LightRFT! 🎉