Skip to content

Comments

feature(wzn): add language switcher and complete some Chinese documentation for LightRFT docs#42

Open
zunian-wan wants to merge 5 commits intoopendilab:mainfrom
zunian-wan:dev-docs
Open

feature(wzn): add language switcher and complete some Chinese documentation for LightRFT docs#42
zunian-wan wants to merge 5 commits intoopendilab:mainfrom
zunian-wan:dev-docs

Conversation

@zunian-wan
Copy link
Contributor

@zunian-wan zunian-wan commented Feb 10, 2026

📋 Summary

Add language switcher for en & zh in LightRFT docs and complete Chinese documentation for model testing, design philosophy, troubleshooting, and core project architecture.

Purpose:

Type of Change:

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • ✅ Test addition/modification
  • 🔧 Configuration/Build changes

🔗 Related Issues

None

📝 Changes

What changed:

Why these changes:

Key implementation details:

🧪 Testing

Test Plan

  • Unit tests: Added/updated unit tests
  • Integration tests: Tested with full training pipeline
  • Manual testing: Describe what you tested manually

Test commands:

# Commands used to test the changes

Test Results

Test Output
Paste test output here

📊 Performance Impact

  • No performance impact
  • Performance improved:
  • Performance regression:

📚 Documentation

  • Docstrings updated for new/modified functions
  • README.md updated (if user-facing changes)
  • Documentation in docs/ updated (if applicable)
  • Examples updated/added (if applicable)
  • Configuration reference updated (if new parameters added)
  • CHANGELOG.md updated

✅ Checklist

Code Quality

  • Code follows the project's style guidelines (run make format and make fcheck)
  • Self-review of code completed
  • Code is well-commented, especially in complex areas
  • No unnecessary debug logs or commented-out code

Compatibility

  • Changes are backward compatible (or breaking changes are documented)
  • Existing tests pass with changes
  • No new warnings introduced

Testing

  • Tested with FSDP (if applicable)
  • Tested with DeepSpeed (if applicable)
  • Tested with inference engines (vLLM/SGLang) (if applicable)
  • Tested on multiple GPU configurations (if applicable)

Documentation

  • All public APIs are documented
  • User-facing changes are documented
  • Migration guide provided (if breaking changes)

💭 Additional Notes

🔍 Review Checklist for Maintainers

  • Code quality and style verified
  • Tests are adequate and passing
  • Documentation is complete and clear
  • Performance impact is acceptable
  • Breaking changes are properly documented
  • Ready to merge

BEFORE SUBMITTING, PLEASE READ:

- Initialize Chinese documentation structure with index files for main, quick start, and best practices pages.
- Implement a polished, floating language toggle button in the bottom-right corner.
- Add a custom SVG language icon and PyTorch-themed styling (accent border and hover effects).
- Create dynamic JavaScript to handle intelligent switching between English and Chinese versions of the same page.
- Update conf.py to globally include the new localized assets and styles.
- Add Chinese docs for model testing, design philosophy, troubleshooting, and core project architecture.
- Standardize all Chinese documentation suffixes from `_cn` to `_zh` to follow standard locale naming.
@puyuan1996 puyuan1996 changed the title Add language switcher and complete some Chinese documentation for LightRFT docs feature(wzn): add language switcher and complete some Chinese documentation for LightRFT docs Feb 10, 2026
@puyuan1996 puyuan1996 added documentation Improvements or additions to documentation style Code or comments formatting labels Feb 10, 2026
@@ -73,7 +73,6 @@ make docs-live
```bash
# Run specific tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is the directory of these tests

```bash
# Run specific tests
python test_trajectory_saver_fix.py
python test_action_mask_indexing.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete this?


## 代码规范

- Python 代码请遵循 PEP 8 规范。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be PEP8 here

- 确保所有现有测试均能通过。

2. **提交 PR**:
- 填写清晰的 PR 标题和描述。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add PR name format like our previous format

- **LLMs**: Qwen, Qwen2.5, LLaMA, Mistral, and most HuggingFace models
- **VLMs**: Qwen-VL, Qwen2-VL, LLaVA
- **LLM**: Qwen, Qwen2.5 and most HuggingFace models
- **VLM**: Qwen-VL, Qwen2-VL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add audio model here

- 经验生成与收集
- 优势估计 (Advantage estimation) 与回报计算 (return computation)
- 策略与价值函数更新
- 重放缓存 (Replay buffer) 管理(标准和视觉语言)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“标准和视觉语言” 这句进行优化


核心组件:

- PPO (Proximal Policy Optimization) 实现
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加上 GRPO 等算法

- 完全分片数据并行 (FSDP) 实现
- 高效推理引擎 (vLLM, SGLang)
- 分布式张量操作工具
- 检查点 (Checkpoint) 管理和广播
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

分出来讲一点,从训练引擎到推理引擎的模型参数更新

核心组件:

- Actor 网络实现(语言、视觉语言、音频语言)
- 奖励模型实现(通用和安全奖励模型)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不是安全奖励,全局也再次检查下

- **DeepSpeed 集成**:原生支持 DeepSpeed ZeRO 优化。
- **FSDP 兼容性**:支持完全分片数据并行 (Fully Sharded Data Parallel) 训练。

## 错误处理与健壮性
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

鲁棒性

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation style Code or comments formatting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants