[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-EvolvingLMMs-Lab--lmms-engine":3,"tool-EvolvingLMMs-Lab--lmms-engine":64},[4,17,27,36,44,52],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",160015,2,"2026-04-18T11:30:52",[13,14,15],"开发框架","Agent","语言模型","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,3,"2026-04-06T11:19:32",[15,26,14,13],"图像",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[13,26,14,35],"视频",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":10,"last_commit_at":42,"category_tags":43,"status":16},8553,"spec-kit","github\u002Fspec-kit","Spec Kit 是一款专为提升软件开发效率而设计的开源工具包，旨在帮助团队快速落地“规格驱动开发”（Spec-Driven Development）模式。传统开发中，需求文档往往与代码实现脱节，导致沟通成本高且结果不可控；而 Spec Kit 通过将规格说明书转化为可执行的指令，让 AI 直接依据明确的业务场景生成高质量代码，从而减少从零开始的随意编码，确保产出结果的可预测性。\n\n该工具特别适合希望利用 AI 辅助编程的开发者、技术负责人及初创团队。无论是启动全新项目还是在现有工程中引入规范化流程，用户只需通过简单的命令行操作，即可初始化项目并集成主流的 AI 编程助手。其核心技术亮点在于“规格即代码”的理念，支持社区扩展与预设模板，允许用户根据特定技术栈定制开发流程。此外，Spec Kit 强调官方维护的安全性，提供稳定的版本管理，帮助开发者在享受 AI 红利的同时，依然牢牢掌握架构设计的主动权，真正实现从“凭感觉写代码”到“按规格建系统”的转变。",88749,"2026-04-17T09:48:14",[15,26,14,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,15],{"id":53,"name":54,"github_repo":55,"description_zh":56,"stars":57,"difficulty_score":10,"last_commit_at":58,"category_tags":59,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85267,"2026-04-18T11:00:28",[26,60,35,61,14,62,15,13,63],"数据工具","插件","其他","音频",{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":80,"owner_twitter":81,"owner_website":79,"owner_url":82,"languages":83,"stars":96,"forks":97,"last_commit_at":98,"license":79,"difficulty_score":23,"env_os":99,"env_gpu":100,"env_ram":101,"env_deps":102,"category_tags":111,"github_topics":112,"view_count":10,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":118,"updated_at":119,"faqs":120,"releases":151},9207,"EvolvingLMMs-Lab\u002Flmms-engine","lmms-engine","A simple, unified multimodal models training engine. Lean, flexible, and built for hacking at scale.","lmms-engine 是一个专为大规模训练统一多模态模型而设计的轻量级引擎。它致力于解决当前多模态模型训练中框架分散、配置复杂以及难以高效扩展的痛点，为开发者提供了一个简洁、灵活且统一的代码底座。\n\n这款工具非常适合从事大模型算法研究的研究人员、需要快速验证新想法的 AI 工程师，以及希望深入理解多模态训练架构的开发者。无论是进行视觉理解、内容生成，还是构建融合图像、音频与文本的全能模型，lmms-engine 都能提供强有力的支持。\n\n其技术亮点在于极致的效率与现代化设计：原生支持 PyTorch FSDP2 分布式策略，集成了 Muon 优化器、Liger Kernel 加速库以及 NSA（嵌套序列注意力）等前沿技术，显著提升了显存利用率和训练速度（MFU）。此外，它还支持数据打包（Packing）和专家并行（EP），并提供了详细的性能基准参考。配合 uv 包管理器和预构建的 Docker 镜像，lmms-engine 让从环境搭建到启动大规模训练的过程变得异常顺畅，是进行多模态模型“黑客式”创新与规模化实验的理想选择。","\u003Cdiv align=\"center\">\n\n\u003Cimg width=\"2816\" height=\"1157\" alt=\"Gemini_Generated_Image_s42giss42giss42g\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEvolvingLMMs-Lab_lmms-engine_readme_e524cc9921fc.png\" \u002F>\n\n\u003Ch4>A simple, unified multimodal models training engine. Lean, flexible, and built for hacking at scale.\u003C\u002Fh4>\n\n[![Python 3.11+](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.11+-blue.svg)](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F)\n[![PyTorch](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPyTorch-2.0+-ee4c2c.svg)](https:\u002F\u002Fpytorch.org\u002F)\n[![uv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fuv-package%20manager-blueviolet.svg)](https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fuv)\n[![Code style: black](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg)](https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack)\n[![Lint](https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Factions\u002Fworkflows\u002Flint.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Factions\u002Fworkflows\u002Flint.yml)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-green.svg)](LICENSE)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FEvolvingLMMs-Lab\u002Flmms-engine?style=social)](https:\u002F\u002Fgithub.com\u002FLMMs-Lab\u002Flmms-engine\u002Fstargazers)\n\n[Quick Start](#-quick-start) • [Examples](#-featured-examples) • [Model Support](#-model-support) • [Optimizations](#️-optimizations) • [Codebase Architecture](#️-codebase-architecture) • [Documentation](#-documentation)\n\n\u003C\u002Fdiv>\n\n---\n\n## Annoucement\n\n- [2025-10] 🎉🎉 **Efficiency Report**: We provide comprehensive Model FLOPs Utilization (MFU) metrics for various model architectures and training configurations. See [MFU Reference](docs\u002Freference\u002Fmfu.md) for detailed benchmarks.\n- [2025-10] 🚀🚀 **LMMs-Engine v0.1** is here! a lean, efficient framework built to train unified multimodal model at scale.\n\n## 🚀 Quick Start\n\n### Installation\n\n```bash\n# Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002FLMMs-Lab\u002Flmms-engine.git\ncd lmms-engine\n\n# Install editable packages\nuv pip install -e \".[all]\"\n# or install as a packages\nuv pip install -e .\n# Install a stable release\nuv pip install lmms-engine\n\n# Install dependencies using uv sync\n# For Linux systems (recommended - auto-detects platform):\nbash uv_sync_linux.sh\n\n# For other systems or if encountering errors:\nuv sync\n# If uv sync fails, try: \nuv pip install -r requirements.txt\n\n# Optional: Performance optimizations\nuv pip install flash-attn --no-build-isolation\nuv pip install liger-kernel\n```\n\n### Docker\nWe provide [Docker images](https:\u002F\u002Fhub.docker.com\u002Fr\u002Ffatbao55\u002Flmms-engine\u002Ftags) with pre-built environments including PyTorch, CUDA, and all necessary dependencies.\n\n```bash\ndocker run --gpus all -it --rm \\\n  -v $(pwd):\u002Fworkspace \\\n  -w \u002Fworkspace \\  \n  fatbao55\u002Flmms-engine:v1.0 \\\n  bash\n```\n\n### Launch Training\n\n**Recommended: torchrun (native PyTorch)**\n```bash\ntorchrun --nproc_per_node=8 --nnodes=1 --node_rank=0 \\\n  --master_addr=127.0.0.1 --master_port=12355 \\\n  -m lmms_engine.launch.cli config_yaml=examples\u002Fqwen3_vl\u002Fexample_config.yaml\n```\n\n**Alternative: Accelerate**\n```bash\naccelerate launch --use_fsdp \\\n  -m lmms_engine.launch.cli config_yaml=examples\u002Fqwen3_vl\u002Fexample_config.yaml\n```\n\n**Single GPU**\n```bash\npython -m lmms_engine.launch.cli config_yaml=examples\u002Fqwen3_vl\u002Fexample_config.yaml\n```\n\n## 🔥 Featured Examples\n\n| Model | Quick Start | FSDP2 | USP | Muon | Liger | Packing | NSA | EP | Highlights |\n|-------|-------------|-------|-----|------|-------|---------|-----|----|------------------|\n| **[BAGEL](src\u002Flmms_engine\u002Fmodels\u002Fbagel)** | [run.sh](examples\u002Fbagel\u002Frun.sh) | ✅ | TBD | ✅ | ❌ | ✅ | ✅ | ❌ | Unified visual understanding & generation |\n| **[Qwen2.5](src\u002Flmms_engine\u002Fmodels\u002Fqwen2)** | [run.sh](examples\u002Fqwen2_5_llm\u002Frun.sh) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | Large Language Model |\n| **[Qwen2.5-VL](src\u002Flmms_engine\u002Fmodels\u002Fqwen2_5_vl\u002F)** | [run.sh](examples\u002Fqwen2_5_vl\u002Frun.sh) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | Multimodal Model |\n| **[Qwen2.5-Omni](examples\u002Fqwen2_5_omni)** | [run.sh](examples\u002Fqwen2_5_omni\u002Frun.sh) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | Unified multimodal (image, audio, text) |\n| **[Qwen3-VL](examples\u002Fqwen3_vl)** | [run.sh](examples\u002Fqwen3_vl\u002Frun.sh) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | Native-resolution, long context (10K+ tokens) |\n| **[Qwen3-VL MoE](examples\u002Fqwen3_vl_moe)** | [run.sh](examples\u002Fqwen3_vl_moe\u002Frun.sh) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | Vision-Language MoE with EP (image, video, text) |\n| **[Qwen3-MoE](examples\u002Fqwen3_moe)** | [run.sh](examples\u002Fqwen3_moe\u002Frun.sh) | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ✅ | Mixture-of-Experts, Expert Parallelism |\n| **[Qwen3-Omni MoE](examples\u002Fqwen3_omni_moe)** | [config](examples\u002Fqwen3_omni_moe_ep2.yaml) | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ✅ | Multimodal MoE with EP (image, audio, text) |\n| **[WanVideo](examples\u002Fwanvideo)** | [run.sh](examples\u002Fwanvideo\u002Frun.sh) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | T2V\u002FI2V\u002FV2V generation (1.3B\u002F14B) |\n| **[FLA models](examples\u002Fdgn)** | [run.sh](examples\u002Fdgn\u002Frun.sh) | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | Efficient architecture, FineWeb-Edu pretraining |\n| **[dLLM (Qwen3)](examples\u002Fdiffusion_language_model)** | [run.sh](examples\u002Fdiffusion_language_model\u002Frun.sh) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | Masked diffusion language model |\n| **[RAE-SigLip](examples\u002Frepresentation_autoencoder)** | [run.sh](examples\u002Frepresentation_autoencoder\u002Frun.sh) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | Representation AutoEncoder, LPIPS, EMA |\n| **[SiT](examples\u002Fscalable_interpolant_transformer)** | [run.sh](examples\u002Fscalable_interpolant_transformer\u002Frun.sh) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | Interpolant Transformer, CFG, ImageNet-1K |\n\n**Optimization Legend:**\n- **FSDP2**: Fully Sharded Data Parallel v2 for distributed training\n- **USP**: Ulysses Sequence Parallel for long contexts\n- **Muon**: Advanced optimizer with Newton-Schulz orthogonalization\n- **Liger**: Triton fused kernels (CrossEntropy, RMSNorm, RoPE, SwiGLU) for 30% memory reduction\n- **Packing**: First-fit bin packing for peaking at 35-40% MFU vs 20-25% (w\u002Fo in Qwen2.5-VL finetuning)\n- **NSA**: Native Sparse Attention for efficient long-context processing\n- **EP**: Expert Parallelism for Mixture-of-Experts models, sharding experts across GPUs\n\n> 💡 **Tip:** Each `run.sh` file contains detailed setup instructions, prerequisites, and configuration options.\n\n## 🤖 Model Support\n\n**20+ architectures spanning vision-language, diffusion, and language models.**\n\n### Multimodal Models\n- **Qwen2.5-VL** - SOTA level performance vision-language model\n- **Qwen3-VL** - SOTA level performance vision-language model\n- **Qwen3-VL MoE** - Vision-Language Mixture-of-Experts with Expert Parallelism and Sequence Parallelism support\n- **Qwen2.5-Omni** - Unified vision + audio + text modalities\n- **Qwen3-Omni MoE** - Multimodal Mixture-of-Experts with vision + audio + text and Expert Parallelism support\n- **LLaVA-OneVision** - Fully open-source vision-language model\n- **Bagel** - Unified multimodal model for visual understanding and generation\n- **Aero** - Lightweight audio-language model\n\n### Diffusion & Generative Models\n- **dLLM (Qwen3)** - Diffusion Language Model with masked prediction\n- **WanVideo (1.3B\u002F14B)** - Text\u002FImage-to-Video generation (T2V\u002FI2V\u002FV2V)\n- **SiT (XL\u002F2)** - Scalable Interpolant Transformers for class-conditional image generation\n- **RAE-SigLip** - Representation AutoEncoder with adversarial discriminator\n\n### Language Models\n- **Qwen2\u002F2.5\u002F3 series** - Full Liger kernel support with fused operations\n- **Linear Attention Models** - Recurrent architecture optimized for Muon; Please install [FLA](https:\u002F\u002Fgithub.com\u002Ffla-org\u002Fflash-linear-attention) first.\n- **Custom architectures** - Extensible via `@register_model()` decorator\n\n## ⚡️ Optimizations\n\nProduction-grade efficiency from distributed training to kernel fusion.\n\n### Core Distributed Training\n\n- **FSDP2** - PyTorch 2.0+ DTensor-based sharding for parameters, gradients, and optimizer states. Improved composability over original FSDP enables flexible parallelism composition.\n\n- **Ulysses Sequence Parallel** - Splits sequence dimension across GPUs for ultra-long contexts. Critical for vision-language models like Qwen3-VL with 10K+ visual tokens.\n\n- **Multi-dimensional Parallelism** - Compose TP x PP × DP meshes for cluster-scale training.\n\n### Memory & Compute Optimizations\n\n- **Flash Attention + Unpadding** - Tiled attention with `use_rmpad` eliminates all padding computation.\n\n- **Native Sparse Attention (NSA)** - Hybrid attention mechanism combining compressed attention, topk sparse attention, and sliding window attention.\n\n- **Liger Kernel** - Triton fused kernels (CrossEntropy, RMSNorm, RoPE, SwiGLU) achieve memory reduction by avoiding intermediate materializations.\n\n- **Monkey Patching System** - Runtime kernel injection via `lmms_engine\u002Fconfigs\u002Fmonkey_patch\u002F` for model-specific optimizations without code modification.\n\n- **Sequence Packing** - Faster first-fit bin packing.\n\n### Advanced Optimizer\n\n- **Muon Optimizer** - Newton-Schulz orthogonalization with Triton kernels, distributed via DTensor. Selective 2D-parameter application outperforms AdamW convergence.\n\n### Data Pipeline\n\n- **Streaming Datasets** - `IterableDataset` for trillion-token pretraining without full data loading.\n\n### Configuration Examples\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Sequence Packing\u003C\u002Fb> - with full unpadding\u003C\u002Fsummary>\n\n```yaml\ndataset_config:\n  packing: true\n  packing_strategy: first_fit\n  packing_length: 32000\n\ntrainer_args:\n  use_rmpad: true  # Requires flash-attn\n  use_liger_kernel: true\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Liger Kernel\u003C\u002Fb> - Enable LinkedIn's Triton kernels for 30% memory reduction\u003C\u002Fsummary>\n\n```yaml\ntrainer_args:\n  use_liger_kernel: true\n```\n\n**Fused operations:**\n- CrossEntropy (major memory savings)\n- RMSNorm, RoPE, SwiGLU\n- Automatically applied via monkey patching\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Muon Optimizer\u003C\u002Fb> - State-of-the-art optimizer for LLMs\u003C\u002Fsummary>\n\n```yaml\ntrainer_args:\n  use_muon: true # enable muonwithadam optimizer\n  adam_beta1: 0.9 # for the adam part in muonwithadam optimizer\n  adam_beta2: 0.999 # for the adam part in muonwithadam optimizer\n  adam_epsilon: 1.0e-8 # for the adam part in muonwithadam optimizer\n  learning_rate: 0.001\n  weight_decay: 0.01\n  # ns_steps: 5  # Newton-Schulz iterations (default)\n\n  # for some modules which the user hope to \n```\n\n**Features:**\n- Newton-Schulz orthogonalization with Triton kernels\n- Distributed via DTensor (FSDP2)\n- Selective 2D parameter application\n\n**Note**\nIf users wish to specify whether a module should be optimized using Muon or Adam, they can designate this in `lmms_engine.train.hf.trainer.create_optimizer`. By default, modules excluded from Muon optimization include those containing the following substrings in their names: `[\"emb\", \"norm\", \"lm_head\", \"bias\", \"wte\", \"wpe\", \"output\", \"a_proj\", \"b_proj\", \"conv1d\", \"rotary\"]`\nas well as any parameters whose dimension does not equal 2.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>FSDP2 Configuration\u003C\u002Fb>\u003C\u002Fsummary>\n\n```yaml\ntrainer_args:\n  fsdp2: true\n  fsdp_config:\n    transformer_layer_cls_to_wrap: [\"Qwen2VLDecoderLayer\"]\n    reshard_after_forward: false\n    activation_checkpointing: true\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Ulysses Sequence Parallel\u003C\u002Fb> - For long-sequence VLMs\u003C\u002Fsummary>\n\n```yaml\ntrainer_args:\n  sp_ulysses_degree: 2  # Sequence parallel degree\n```\n\n**Benefits:**\n- Splits sequence length across GPUs\n- Reduces memory footprint for long contexts\n- Works with Flash Attention\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Native Sparse Attention (NSA)\u003C\u002Fb> - Efficient long-context attention for BAGEL\u003C\u002Fsummary>\n\n```yaml\nmodel_config:\n  load_from_pretrained_path: \"lmms-lab\u002FBAGEL-7B-MoT-ver.LE\"\n\nmonkey_patch:\n  - type: nsa\n    model_type: bagel\n    kwargs:\n      block_size: 64\n      compress_type: \"weightedpool\"  # weightedpool, linear, avgpool\n      kernel_size: 32\n      kernel_stride: 16\n      topk: 16\n      init_blocks: 1\n      local_blocks: 2\n      window_size: 512\n```\n\n**Features:**\n- Compressed attention with key-value compression\n- TopK sparse attention for efficiency\n- Sliding window attention for local context\n- Hybrid mechanism combines all three attention types\n- Requires: `pip install git+https:\u002F\u002Fgithub.com\u002FXunhaoLai\u002Fnative-sparse-attention-triton.git`\n\n**Note:** Currently only supported for BAGEL model.\n\u003C\u002Fdetails>\n\n## 📖 Documentation\n\n### Step-by-Step Workflow\n\n1. **Process the dataset** into OpenAI chat format (JSONL\u002FJSON\u002FArrow\u002FCSV)\n   ```bash\n   hf download kcz358\u002Fopen-thoughts-debug --local-dir data\u002Fopen_thoughts_debug --repo-type dataset\n   ```\n\n2. **Prepare dataset YAML** (optional for single data source)\n   ```yaml\n   datasets:\n     - path: data\u002Fopen_thoughts_debug\n       data_folder: \"\"\n       data_type: arrow\n   ```\n\n3. **Configure training** - See [examples\u002Fqwen3_vl\u002Fexample_config.yaml](examples\u002Fqwen3_vl\u002Fexample_config.yaml) or any model-specific config in [examples\u002F](examples\u002F)\n\n### Comprehensive Guides\n\n**Getting Started:**\n- [Dataset Preparation](docs\u002Fuser_guide\u002Fdata_prep.md) - How to prepare and structure your data\n- [Dataset & Packing Guide](docs\u002Fuser_guide\u002Fdatasets.md) - Detailed dataset implementations and packing strategies\n- [Training Guide](docs\u002Fgetting_started\u002Ftrain.md) - Comprehensive training walkthrough\n\n**Advanced Topics:**\n- [Design Principles](docs\u002Freference\u002Fdesign_principle.md) - Architectural patterns and philosophy\n- [API Reference](docs\u002Freference\u002Fapi.md) - Detailed API documentation\n\n## 🏗️ Codebase Architecture\n\n### Component Registry\n\n**Factory Pattern** enables easy extensibility:\n\n```python\n# Register a custom dataset\nfrom lmms_engine.datasets import register_dataset, BaseDataset\n\n@register_dataset(\"my_custom_dataset\")\nclass MyCustomDataset(BaseDataset):\n    def __init__(self, config):\n        super().__init__(config)\n        # Custom initialization\n\n    def __getitem__(self, idx):\n        # Custom data loading\n        return item\n\n# Register a custom processor\nfrom lmms_engine.datasets.processor import register_processor\n\n@register_processor(\"my_custom_processor\")\nclass MyCustomProcessor:\n    def __call__(self, raw_data):\n        # Custom processing\n        return processed_data\n```\n\n### Training Pipeline\n\n**Builder Pattern** for flexible composition:\n\n```python\nfrom lmms_engine.train import TrainRunner\n\n# Configuration defines the pipeline\nrunner = TrainRunner(config)\nrunner.build()  # Lazy initialization of components\nrunner.run()    # Execute training\n```\n\n**Pipeline stages:**\n1. **Model initialization** - From pretrained or config\n2. **Dataset creation** - With processor and collator\n3. **Monkey patching** - Apply kernel optimizations\n4. **Trainer setup** - FSDP2, DeepSpeed, or custom\n5. **Training execution** - With checkpointing and logging\n\n### Supported Trainers\n\n| Trainer Type | Use Case | Key Features |\n|-------------|----------|--------------|\n| `hf_trainer` | General VLM\u002FLM training | FSDP2, Muon, Liger, Flash Attn |\n| `dllm_trainer` | Diffusion language models | Masked LM, custom loss, DLLM collator |\n| `wan_trainer` | Video generation | Flow-matching, multi-modal inputs |\n| `rae_trainer` | Visual autoencoders | Adversarial loss, EMA, LPIPS |\n| `sit_trainer` | Diffusion transformers | Interpolant framework, CFG, EMA |\n\n## 🎯 Use Cases\n\n- **Vision-Language Pretraining** - Qwen-VL, LLaVA on large multimodal datasets\n- **Video Understanding** - AERO on 3D video data\n- **Diffusion Models** - DLLM, SiT, WanVideo for generation tasks\n- **Representation Learning** - RAE for visual representations\n- **Language Model Pretraining** - DGN, Qwen with Muon optimizer\n- **Multimodal Fine-tuning** - Efficient SFT with sequence packing\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Design Principles](docs\u002Freference\u002Fdesign_principle.md) for coding guidelines:\n\n- **Simplicity**: Write simple, straightforward code\n- **Readability**: Prioritize clarity over cleverness\n- **Testability**: Create testable components\n- **Minimal Changes**: Only modify code related to the task\n- **Less Code = Less Debt**: Minimize code footprint\n\n## 😊 Acknowledgement\n\nThanks to the following projects for their excellent work:\n\n- [axolotl](https:\u002F\u002Fgithub.com\u002Faxolotl-ai-cloud\u002Faxolotl)\n- [LLaMA-Factory](https:\u002F\u002Fgithub.com\u002Fhiyouga\u002FLLaMA-Factory)\n- [nanotron](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fnanotron)\n- [veScale](https:\u002F\u002Fgithub.com\u002Fvolcengine\u002FveScale)\n- [veOmni](https:\u002F\u002Fgithub.com\u002FByteDance-Seed\u002FVeOmni)\n\n## 📝 Citation\n\nIf you use LMMs Engine in your research, please cite:\n\n```bibtex\n@software{lmms_engine2025,\n  title={LMMs Engine: A simple, unified multimodal framework for pretraining and finetuning.},\n  author={LMMs-Lab},\n  year={2025},\n  url={https:\u002F\u002Fgithub.com\u002FLMMs-Lab\u002Flmms-engine}\n}\n```\n\n## 📄 License\n\nThis project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.\n\n## 🔗 Links\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\n- **LMMs-Lab**: https:\u002F\u002Flmms-lab.com\n- **Documentation**: [docs\u002F](docs\u002F)\n- **Issues**: https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fissues\n\n## 🎉 Awesome projects using LMMs-Engine\n\n- [LongVT](https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002FLongVT): Incentivizing \"Thinking with Long Videos\" via Native Tool Calling ![GitHub Repo stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FEvolvingLMMs-Lab\u002FLongVT)\n\n- [OpenMMReasoner](https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002FOpenMMReasoner): Pushing the Frontiers for Multimodal Reasoning with an Open and General Recipe![GitHub Repo stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FEvolvingLMMs-Lab\u002FOpenMMReasoner)\n\n---\n\n\u003Cdiv align=\"center\">\n\n**Built with ❤️ by [LMMs-Lab](https:\u002F\u002Flmms-lab.com\u002F)**\n\n⭐ **Star us on GitHub to support the project!** ⭐\n\n\u003C\u002Fdiv>\n","\u003Cdiv align=\"center\">\n\n\u003Cimg width=\"2816\" height=\"1157\" alt=\"Gemini_Generated_Image_s42giss42giss42g\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEvolvingLMMs-Lab_lmms-engine_readme_e524cc9921fc.png\" \u002F>\n\n\u003Ch4>一个简单、统一的多模态模型训练引擎。精简、灵活，专为大规模实验而构建。\u003C\u002Fh4>\n\n[![Python 3.11+](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.11+-blue.svg)](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F)\n[![PyTorch](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPyTorch-2.0+-ee4c2c.svg)](https:\u002F\u002Fpytorch.org\u002F)\n[![uv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fuv-package%20manager-blueviolet.svg)](https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fuv)\n[![Code style: black](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcode%20style-black-000000.svg)](https:\u002F\u002Fgithub.com\u002Fpsf\u002Fblack)\n[![Lint](https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Factions\u002Fworkflows\u002Flint.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Factions\u002Fworkflows\u002Flint.yml)\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache%202.0-green.svg)](LICENSE)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FEvolvingLMMs-Lab\u002Flmms-engine?style=social)](https:\u002F\u002Fgithub.com\u002FLMMs-Lab\u002Flmms-engine\u002Fstargazers)\n\n[快速入门](#-quick-start) • [示例](#-featured-examples) • [模型支持](#-model-support) • [优化技术](#️-optimizations) • [代码库架构](#️-codebase-architecture) • [文档](#-documentation)\n\n\u003C\u002Fdiv>\n\n---\n\n## 公告\n\n- [2025-10] 🎉🎉 **效率报告**：我们提供了针对多种模型架构和训练配置的全面模型浮点运算利用率（MFU）指标。详细基准测试请参阅[MFU参考](docs\u002Freference\u002Fmfu.md)。\n- [2025-10] 🚀🚀 **LMMs-Engine v0.1** 正式发布！这是一个轻量级、高效的框架，专为大规模训练统一多模态模型而设计。\n\n## 🚀 快速入门\n\n### 安装\n\n```bash\n# 克隆仓库\ngit clone https:\u002F\u002Fgithub.com\u002FLMMs-Lab\u002Flmms-engine.git\ncd lmms-engine\n\n# 安装可编辑包\nuv pip install -e \".[all]\"\n# 或者作为普通包安装\nuv pip install -e .\n# 安装稳定版本\nuv pip install lmms-engine\n\n# 使用 uv sync 安装依赖\n# 对于 Linux 系统（推荐——自动检测平台）：\nbash uv_sync_linux.sh\n\n# 对于其他系统或遇到问题时：\nuv sync\n# 如果 uv sync 失败，可以尝试：\nuv pip install -r requirements.txt\n\n# 可选：性能优化\nuv pip install flash-attn --no-build-isolation\nuv pip install liger-kernel\n```\n\n### Docker\n我们提供了包含 PyTorch、CUDA 及所有必要依赖的预构建环境的[Docker 镜像](https:\u002F\u002Fhub.docker.com\u002Fr\u002Ffatbao55\u002Flmms-engine\u002Ftags)。\n\n```bash\ndocker run --gpus all -it --rm \\\n  -v $(pwd):\u002Fworkspace \\\n  -w \u002Fworkspace \\  \n  fatbao55\u002Flmms-engine:v1.0 \\\n  bash\n```\n\n### 启动训练\n\n**推荐：torchrun（原生 PyTorch）**\n```bash\ntorchrun --nproc_per_node=8 --nnodes=1 --node_rank=0 \\\n  --master_addr=127.0.0.1 --master_port=12355 \\\n  -m lmms_engine.launch.cli config_yaml=examples\u002Fqwen3_vl\u002Fexample_config.yaml\n```\n\n**替代方案：Accelerate**\n```bash\naccelerate launch --use_fsdp \\\n  -m lmms_engine.launch.cli config_yaml=examples\u002Fqwen3_vl\u002Fexample_config.yaml\n```\n\n**单 GPU**\n```bash\npython -m lmms_engine.launch.cli config_yaml=examples\u002Fqwen3_vl\u002Fexample_config.yaml\n```\n\n## 🔥 精选示例\n\n| 模型 | 快速入门 | FSDP2 | USP | Muon | Liger | Packing | NSA | EP | 亮点 |\n|-------|-------------|-------|-----|------|-------|---------|-----|----|------------------|\n| **[BAGEL](src\u002Flmms_engine\u002Fmodels\u002Fbagel)** | [run.sh](examples\u002Fbagel\u002Frun.sh) | ✅ | TBD | ✅ | ❌ | ✅ | ✅ | ❌ | 统一视觉理解与生成 |\n| **[Qwen2.5](src\u002Flmms_engine\u002Fmodels\u002Fqwen2)** | [run.sh](examples\u002Fqwen2_5_llm\u002Frun.sh) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | 大型语言模型 |\n| **[Qwen2.5-VL](src\u002Flmms_engine\u002Fmodels\u002Fqwen2_5_vl\u002F)** | [run.sh](examples\u002Fqwen2_5_vl\u002Frun.sh) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | 多模态模型 |\n| **[Qwen2.5-Omni](examples\u002Fqwen2_5_omni)** | [run.sh](examples\u002Fqwen2_5_omni\u002Frun.sh) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | 统一多模态（图像、音频、文本） |\n| **[Qwen3-VL](examples\u002Fqwen3_vl)** | [run.sh](examples\u002Fqwen3_vl\u002Frun.sh) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | 原始分辨率，长上下文（10K+ tokens） |\n| **[Qwen3-VL MoE](examples\u002Fqwen3_vl_moe)** | [run.sh](examples\u002Fqwen3_vl_moe\u002Frun.sh) | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ✅ | 视觉-语言 MoE，支持 EP（图像、视频、文本） |\n| **[Qwen3-MoE](examples\u002Fqwen3_moe)** | [run.sh](examples\u002Fqwen3_moe\u002Frun.sh) | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ✅ | 混合专家模型，专家并行 |\n| **[Qwen3-Omni MoE](examples\u002Fqwen3_omni_moe)** | [配置](examples\u002Fqwen3_omni_moe_ep2.yaml) | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ✅ | 多模态 MoE，支持 EP（图像、音频、文本） |\n| **[WanVideo](examples\u002Fwanvideo)** | [run.sh](examples\u002Fwanvideo\u002Frun.sh) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | T2V\u002FI2V\u002FV2V 生成（1.3B\u002F14B） |\n| **[FLA 模型](examples\u002Fdgn)** | [run.sh](examples\u002Fdgn\u002Frun.sh) | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | 高效架构，FineWeb-Edu 预训练 |\n| **[dLLM (Qwen3)](examples\u002Fdiffusion_language_model)** | [run.sh](examples\u002Fdiffusion_language_model\u002Frun.sh) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | 掩码扩散语言模型 |\n| **[RAE-SigLip](examples\u002Frepresentation_autoencoder)** | [run.sh](examples\u002Frepresentation_autoencoder\u002Frun.sh) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | 表征自编码器，LPIPS、EMA |\n| **[SiT](examples\u002Fscalable_interpolant_transformer)** | [run.sh](examples\u002Fscalable_interpolant_transformer\u002Frun.sh) | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | 插值 Transformer，CFG，ImageNet-1K |\n\n**优化术语说明：**\n- **FSDP2**：完全分片数据并行 v2，用于分布式训练\n- **USP**：尤利西斯序列并行，适用于长上下文\n- **Muon**：基于 Newton-Schulz 正交化的高级优化器\n- **Liger**：Triton 融合核函数（交叉熵、RMSNorm、RoPE、SwiGLU），可减少 30% 的内存占用\n- **Packing**：首次适应式装箱算法，使 MFU 提升至 35-40%，而未使用时仅为 20-25%（例如在 Qwen2.5-VL 微调中）\n- **NSA**：原生稀疏注意力机制，高效处理长上下文\n- **EP**：专家并行技术，用于混合专家模型，在不同 GPU 上划分专家\n\n> 💡 **提示**：每个 `run.sh` 文件都包含详细的设置步骤、先决条件和配置选项。\n\n## 🤖 模型支持\n\n**涵盖视觉-语言、扩散及语言模型的 20 多种架构。**\n\n### 多模态模型\n- **Qwen2.5-VL**：SOTA 级别性能的视觉-语言模型\n- **Qwen3-VL**：SOTA 级别性能的视觉-语言模型\n- **Qwen3-VL MoE**：视觉-语言混合专家模型，支持专家并行和序列并行\n- **Qwen2.5-Omni**：统一视觉 + 音频 + 文本模态\n- **Qwen3-Omni MoE**：多模态混合专家模型，支持视觉 + 音频 + 文本以及专家并行\n- **LLaVA-OneVision**：完全开源的视觉-语言模型\n- **Bagel**：用于视觉理解和生成的统一多模态模型\n- **Aero**：轻量级音频-语言模型\n\n### 扩散与生成模型\n- **dLLM (Qwen3)** - 带掩码预测的扩散语言模型\n- **WanVideo (1.3B\u002F14B)** - 文本\u002F图像到视频生成（T2V\u002FI2V\u002FV2V）\n- **SiT (XL\u002F2)** - 用于类别条件图像生成的可扩展插值Transformer\n- **RAE-SigLip** - 带对抗判别器的表示自编码器\n\n### 语言模型\n- **Qwen2\u002F2.5\u002F3系列** - 完全支持Liger内核，具备融合操作\n- **线性注意力模型** - 针对Muon优化的循环架构；请先安装[FLA](https:\u002F\u002Fgithub.com\u002Ffla-org\u002Fflash-linear-attention)。\n- **自定义架构** - 可通过`@register_model()`装饰器进行扩展\n\n## ⚡️ 优化措施\n\n从分布式训练到内核融合，实现生产级效率。\n\n### 核心分布式训练\n\n- **FSDP2** - 基于PyTorch 2.0+ DTensor的参数、梯度和优化器状态划分。相比原始FSDP，其组合性更强，可灵活配置并行策略。\n  \n- **Ulysses序列并行** - 将序列维度拆分到多个GPU上，以处理超长上下文。这对像Qwen3-VL这样拥有1万+视觉token的视觉-语言模型至关重要。\n\n- **多维并行** - 组合TP x PP × DP网格，实现集群规模的训练。\n\n### 内存与计算优化\n\n- **Flash Attention + 无填充** - 使用`use_rmpad`的分块注意力机制，完全消除填充计算。\n  \n- **原生稀疏注意力（NSA）** - 结合压缩注意力、TopK稀疏注意力和滑动窗口注意力的混合机制。\n  \n- **Liger内核** - Triton融合内核（CrossEntropy、RMSNorm、RoPE、SwiGLU）通过避免中间结果的显式存储，显著降低内存占用。\n  \n- **猴子补丁系统** - 通过`lmms_engine\u002Fconfigs\u002Fmonkey_patch\u002F`在运行时注入内核，实现无需修改代码的模型特定优化。\n  \n- **序列打包** - 更快的首次适应装箱算法。\n\n### 高级优化器\n\n- **Muon优化器** - 基于Triton内核的Newton-Schulz正交化，通过DTensor分布式执行。选择性地对二维参数应用，其收敛性能优于AdamW。\n\n### 数据流水线\n\n- **流式数据集** - 使用`IterableDataset`进行万亿token预训练，无需完整加载数据。\n\n### 配置示例\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>序列打包\u003C\u002Fb> - 全部无填充\u003C\u002Fsummary>\n\n```yaml\ndataset_config:\n  packing: true\n  packing_strategy: first_fit\n  packing_length: 32000\n\ntrainer_args:\n  use_rmpad: true  # 需要flash-attn\n  use_liger_kernel: true\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Liger内核\u003C\u002Fb> - 启用LinkedIn的Triton内核，内存占用减少30%\u003C\u002Fsummary>\n\n```yaml\ntrainer_args:\n  use_liger_kernel: true\n```\n\n**融合操作：**\n- CrossEntropy（大幅节省内存）\n- RMSNorm、RoPE、SwiGLU\n- 自动通过猴子补丁应用\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Muon优化器\u003C\u002Fb> - LLM领域的最先进优化器\u003C\u002Fsummary>\n\n```yaml\ntrainer_args:\n  use_muon: true # 启用muonwithadam优化器\n  adam_beta1: 0.9 # muonwithadam优化器中的adam部分\n  adam_beta2: 0.999 # muonwithadam优化器中的adam部分\n  adam_epsilon: 1.0e-8 # muonwithadam优化器中的adam部分\n  learning_rate: 0.001\n  weight_decay: 0.01\n  # ns_steps: 5  # Newton-Schulz迭代次数（默认）\n\n  # 对于用户希望指定的模块\n```\n\n**特性：**\n- 基于Triton内核的Newton-Schulz正交化\n- 通过DTensor（FSDP2）分布式执行\n- 选择性地对二维参数应用\n\n**注意：**\n若用户希望指定某个模块使用Muon还是Adam优化，可在`lmms_engine.train.hf.trainer.create_optimizer`中进行设置。默认情况下，以下名称包含的子字符串的模块将不参与Muon优化：`[\"emb\", \"norm\", \"lm_head\", \"bias\", \"wte\", \"wpe\", \"output\", \"a_proj\", \"b_proj\", \"conv1d\", \"rotary\"]`，以及所有维度不等于2的参数。\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>FSDP2配置\u003C\u002Fb>\u003C\u002Fsummary>\n\n```yaml\ntrainer_args:\n  fsdp2: true\n  fsdp_config:\n    transformer_layer_cls_to_wrap: [\"Qwen2VLDecoderLayer\"]\n    reshard_after_forward: false\n    activation_checkpointing: true\n```\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Ulysses序列并行\u003C\u002Fb> - 适用于长序列VLM\u003C\u002Fsummary>\n\n```yaml\ntrainer_args:\n  sp_ulysses_degree: 2  # 序列并行度\n```\n\n**优势：**\n- 将序列长度拆分到多个GPU上\n- 降低长上下文的内存占用\n- 可与Flash Attention配合使用\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>原生稀疏注意力（NSA）\u003C\u002Fb> - 为BAGEL提供高效的长上下文注意力\u003C\u002Fsummary>\n\n```yaml\nmodel_config:\n  load_from_pretrained_path: \"lmms-lab\u002FBAGEL-7B-MoT-ver.LE\"\n\nmonkey_patch:\n  - type: nsa\n    model_type: bagel\n    kwargs:\n      block_size: 64\n      compress_type: \"weightedpool\"  # weightedpool, linear, avgpool\n      kernel_size: 32\n      kernel_stride: 16\n      topk: 16\n      init_blocks: 1\n      local_blocks: 2\n      window_size: 512\n```\n\n**特性：**\n- 带有键值压缩的注意力机制\n- 通过TopK稀疏注意力提升效率\n- 滑动窗口注意力用于局部上下文\n- 混合机制结合了三种注意力类型\n- 需要：`pip install git+https:\u002F\u002Fgithub.com\u002FXunhaoLai\u002Fnative-sparse-attention-triton.git`\n\n**注意：** 目前仅支持BAGEL模型。\n\u003C\u002Fdetails>\n\n## 📖 文档\n\n### 分步工作流程\n\n1. **处理数据集**为OpenAI聊天格式（JSONL\u002FJSON\u002FArrow\u002FCSV）\n   ```bash\n   hf download kcz358\u002Fopen-thoughts-debug --local-dir data\u002Fopen_thoughts_debug --repo-type dataset\n   ```\n\n2. **准备数据集YAML**（单个数据源可选）\n   ```yaml\n   datasets:\n     - path: data\u002Fopen_thoughts_debug\n       data_folder: \"\"\n       data_type: arrow\n   ```\n   \n3. **配置训练** - 参见[examples\u002Fqwen3_vl\u002Fexample_config.yaml](examples\u002Fqwen3_vl\u002Fexample_config.yaml)或[examples\u002F](examples\u002F)中的任何模型特定配置。\n\n### 综合指南\n\n**入门：**\n- [数据准备](docs\u002Fuser_guide\u002Fdata_prep.md) - 如何准备和组织您的数据\n- [数据集与打包指南](docs\u002Fuser_guide\u002Fdatasets.md) - 详细的数据集实现和打包策略\n- [训练指南](docs\u002Fgetting_started\u002Ftrain.md) - 全面的训练流程讲解\n\n**进阶主题：**\n- [设计原则](docs\u002Freference\u002Fdesign_principle.md) - 架构模式与哲学\n- [API参考](docs\u002Freference\u002Fapi.md) - 详细的API文档\n\n## 🏗️ 代码库架构\n\n### 组件注册表\n\n**工厂模式**便于轻松扩展：\n\n```python\n# 注册自定义数据集\nfrom lmms_engine.datasets import register_dataset, BaseDataset\n\n@register_dataset(\"my_custom_dataset\")\nclass MyCustomDataset(BaseDataset):\n    def __init__(self, config):\n        super().__init__(config)\n        # 自定义初始化\n\n    def __getitem__(self, idx):\n        # 自定义数据加载\n        return item\n\n# 注册自定义处理器\nfrom lmms_engine.datasets.processor import register_processor\n\n@register_processor(\"my_custom_processor\")\nclass MyCustomProcessor:\n    def __call__(self, raw_data):\n        # 自定义处理逻辑\n        return processed_data\n```\n\n### 训练流水线\n\n**构建者模式**用于灵活组合：\n\n```python\nfrom lmms_engine.train import TrainRunner\n\n# 配置定义了整个流水线\nrunner = TrainRunner(config)\nrunner.build()  # 惰性初始化各个组件\nrunner.run()    # 执行训练\n```\n\n**流水线阶段：**\n1. **模型初始化** - 从预训练模型或配置中加载\n2. **数据集创建** - 包括处理器和数据整理器\n3. **Monkey Patching** - 应用内核优化\n4. **训练器设置** - FSDP2、DeepSpeed 或自定义训练器\n5. **训练执行** - 包括检查点保存和日志记录\n\n### 支持的训练器\n\n| 训练器类型 | 使用场景 | 主要特性 |\n|-------------|----------|----------|\n| `hf_trainer` | 通用视觉-语言模型\u002F语言模型训练 | FSDP2、Muon、Liger、Flash Attn |\n| `dllm_trainer` | 扩散语言模型 | 掩码语言模型、自定义损失函数、DLLM 数据整理器 |\n| `wan_trainer` | 视频生成 | 流匹配、多模态输入 |\n| `rae_trainer` | 视觉自编码器 | 对抗损失、EMA、LPIPS |\n| `sit_trainer` | 扩散 Transformer | 插值框架、CFG、EMA |\n\n## 🎯 使用场景\n\n- **视觉-语言预训练** - Qwen-VL、LLaVA 在大规模多模态数据集上的应用\n- **视频理解** - AERO 在 3D 视频数据上的应用\n- **扩散模型** - DLLM、SiT、WanVideo 用于生成任务\n- **表征学习** - RAE 用于视觉表征学习\n- **语言模型预训练** - DGN、Qwen 结合 Muon 优化器\n- **多模态微调** - 基于序列打包的高效 SFT\n\n## 🤝 贡献\n\n我们欢迎各位贡献！请参阅我们的[设计原则](docs\u002Freference\u002Fdesign_principle.md)以了解编码规范：\n\n- **简单性**：编写简洁明了的代码\n- **可读性**：优先考虑清晰度而非技巧性\n- **可测试性**：确保组件易于测试\n- **最小改动**：仅修改与当前任务相关的代码\n- **代码越少，债务越小**：尽量减少代码量\n\n## 😊 致谢\n\n感谢以下项目提供的优秀工作：\n\n- [axolotl](https:\u002F\u002Fgithub.com\u002Faxolotl-ai-cloud\u002Faxolotl)\n- [LLaMA-Factory](https:\u002F\u002Fgithub.com\u002Fhiyouga\u002FLLaMA-Factory)\n- [nanotron](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fnanotron)\n- [veScale](https:\u002F\u002Fgithub.com\u002Fvolcengine\u002FveScale)\n- [veOmni](https:\u002F\u002Fgithub.com\u002FByteDance-Seed\u002FVeOmni)\n\n## 📝 引用\n\n如果您在研究中使用 LMMs Engine，请引用以下内容：\n\n```bibtex\n@software{lmms_engine2025,\n  title={LMMs Engine: 一个简单、统一的多模态框架，用于预训练和微调。},\n  author={LMMs-Lab},\n  year={2025},\n  url={https:\u002F\u002Fgithub.com\u002FLMMs-Lab\u002Flmms-engine}\n}\n```\n\n## 📄 许可证\n\n本项目采用 Apache 2.0 许可证授权，详情请参阅[LICENSE](LICENSE)文件。\n\n## 🔗 链接\n\n- **GitHub**: https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\n- **LMMs-Lab**: https:\u002F\u002Flmms-lab.com\n- **文档**: [docs\u002F](docs\u002F)\n- **问题追踪**: https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fissues\n\n## 🎉 使用 LMMs-Engine 的优秀项目\n\n- [LongVT](https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002FLongVT): 通过原生工具调用激励“用长视频思考” ![GitHub 仓库星标数](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FEvolvingLMMs-Lab\u002FLongVT)\n\n- [OpenMMReasoner](https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002FOpenMMReasoner): 以开放且通用的方法推动多模态推理的边界![GitHub 仓库星标数](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FEvolvingLMMs-Lab\u002FOpenMMReasoner)\n\n---\n\n\u003Cdiv align=\"center\">\n\n**由 [LMMs-Lab](https:\u002F\u002Flmms-lab.com\u002F) 用心打造**\n\n⭐ **请在 GitHub 上为该项目点赞，以支持我们的工作！** ⭐\n\n\u003C\u002Fdiv>","# lmms-engine 快速上手指南\n\nlmms-engine 是一个轻量、灵活且专为大规模训练设计的统一多模态模型训练引擎。支持包括 Qwen 系列、BAGEL、WanVideo 等在内的 20+ 种主流架构，内置 FSDP2、Ulysses 序列并行、Muon 优化器及 Liger Kernel 等生产级效率优化。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux (推荐，脚本自动检测平台) 或其他支持 PyTorch 的系统\n*   **Python**: 3.11 或更高版本\n*   **PyTorch**: 2.0 或更高版本 (需匹配对应的 CUDA 版本)\n*   **包管理器**: 推荐使用 [`uv`](https:\u002F\u002Fgithub.com\u002Fastral-sh\u002Fuv) 以获得更快的依赖解析和安装速度\n*   **硬件**: 建议使用 NVIDIA GPU 以启用 Flash Attention 等加速特性\n\n## 安装步骤\n\n### 1. 克隆仓库\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FLMMs-Lab\u002Flmms-engine.git\ncd lmms-engine\n```\n\n### 2. 安装依赖\n推荐使用 `uv` 进行环境管理。\n\n**方式 A：开发模式安装（推荐）**\n```bash\n# 安装所有可选依赖\nuv pip install -e \".[all]\"\n\n# 或者仅安装核心包\nuv pip install -e .\n```\n\n**方式 B：同步环境（适用于 Linux）**\n```bash\n# Linux 系统推荐运行此脚本，自动处理平台相关依赖\nbash uv_sync_linux.sh\n\n# 其他系统或遇到错误时尝试\nuv sync\n\n# 如果 uv sync 失败，回退到传统方式\nuv pip install -r requirements.txt\n```\n\n**方式 C：直接安装稳定版**\n```bash\nuv pip install lmms-engine\n```\n\n### 3. 性能优化组件（可选但强烈推荐）\n为了获得最佳训练效率（如显存降低 30%+），建议安装以下加速库：\n```bash\nuv pip install flash-attn --no-build-isolation\nuv pip install liger-kernel\n```\n\n### 4. Docker 方案（备选）\n如果您希望使用预构建的环境（包含 PyTorch, CUDA 及所有依赖），可直接拉取 Docker 镜像：\n```bash\ndocker run --gpus all -it --rm \\\n  -v $(pwd):\u002Fworkspace \\\n  -w \u002Fworkspace \\  \n  fatbao55\u002Flmms-engine:v1.0 \\\n  bash\n```\n\n## 基本使用\n\nlmms-engine 通过 YAML 配置文件驱动训练。以下是最简单的启动示例。\n\n### 启动训练\n\n**单卡训练 (Single GPU)**\n最快速的测试方式：\n```bash\npython -m lmms_engine.launch.cli config_yaml=examples\u002Fqwen3_vl\u002Fexample_config.yaml\n```\n\n**多卡分布式训练 (推荐)**\n使用原生 `torchrun` 启动多卡训练（例如 8 卡）：\n```bash\ntorchrun --nproc_per_node=8 --nnodes=1 --node_rank=0 \\\n  --master_addr=127.0.0.1 --master_port=12355 \\\n  -m lmms_engine.launch.cli config_yaml=examples\u002Fqwen3_vl\u002Fexample_config.yaml\n```\n\n**使用 Accelerate 启动**\n如果您习惯使用 Hugging Face Accelerate：\n```bash\naccelerate launch --use_fsdp \\\n  -m lmms_engine.launch.cli config_yaml=examples\u002Fqwen3_vl\u002Fexample_config.yaml\n```\n\n### 配置说明\n*   **配置文件**: 上述命令中的 `examples\u002Fqwen3_vl\u002Fexample_config.yaml` 是示例配置。您可以复制该文件并根据需要修改模型路径、数据集路径、超参数等。\n*   **模型支持**: 框架内置了多种模型的示例配置（如 `examples\u002Fqwen2_5_llm\u002F`, `examples\u002Fwanvideo\u002F` 等），直接参考对应的 `run.sh` 或 YAML 文件即可快速复用。\n*   **开启优化**: 在 YAML 配置文件中设置 `trainer_args` 即可轻松开启高级特性，例如：\n    ```yaml\n    trainer_args:\n      use_liger_kernel: true   # 启用 Liger Kernel 节省显存\n      use_muon: true           # 启用 Muon 优化器加速收敛\n      fsdp2: true              # 启用 FSDP2 分布式策略\n    ```\n\n更多详细配置项和特定模型的启动脚本，请参阅项目根目录下的 `examples\u002F` 文件夹。","某 AI 实验室团队正致力于研发一款能同时处理图像、音频和文本的统一多模态大模型，需要在大规模集群上进行高效训练与快速迭代。\n\n### 没有 lmms-engine 时\n- **框架割裂严重**：团队需为视觉编码器和语言解码器分别维护不同的训练脚本，代码耦合度低，修改架构如同“拼凑积木”，极易出错。\n- **资源利用率低下**：缺乏原生的高级并行策略（如 FSDP2、USP）支持，多卡训练时显存碎片化严重，模型浮点运算利用率（MFU）长期徘徊在低位。\n- **环境配置繁琐**：依赖库版本冲突频发，每次在新节点部署环境需耗时数小时手动调试 PyTorch、CUDA 及各类算子库。\n- **实验迭代缓慢**：尝试新的优化技术（如 Liger Kernel 或 Muon 优化器）需要重写大量底层逻辑，导致新想法验证周期长达数周。\n\n### 使用 lmms-engine 后\n- **统一训练引擎**：通过单一的 YAML 配置文件即可启动 Qwen2.5-Omni 等复杂架构的训练，视觉与语言模块无缝集成，代码结构清晰简洁。\n- **极致性能释放**：内置 FSDP2、USP 及 Flash Attention 等优化，开箱即用，将集群的 MFU 提升至行业领先水平，大幅缩短训练时间。\n- **一键环境部署**：借助 uv 包管理器和预构建的 Docker 镜像，团队成员可在几分钟内完成从本地到千卡集群的环境同步，彻底消除依赖地狱。\n- **灵活黑客式开发**：原生支持 Liger Kernel 和多种并行策略，研究人员仅需调整配置参数即可验证最新优化算法，实验迭代效率提升十倍。\n\nlmms-engine 通过提供一个精简且统一的训练底座，让研发团队从繁琐的工程泥潭中解脱，真正专注于多模态模型本身的创新与突破。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FEvolvingLMMs-Lab_lmms-engine_e524cc99.png","EvolvingLMMs-Lab","LMMs-Lab","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FEvolvingLMMs-Lab_cafaf396.png","Feeling and building multimodal intelligence.",null,"drluodian@gmail.com","lmmslab","https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab",[84,88,92],{"name":85,"color":86,"percentage":87},"Python","#3572A5",99.7,{"name":89,"color":90,"percentage":91},"Shell","#89e051",0.3,{"name":93,"color":94,"percentage":95},"Dockerfile","#384d54",0,762,34,"2026-04-17T00:03:18","Linux","需要 NVIDIA GPU (支持 CUDA)，推荐使用多卡进行分布式训练 (FSDP2, EP)，具体显存取决于模型大小和配置 (如开启 Liger Kernel 可减少 30% 显存)","未说明",{"notes":103,"python":104,"dependencies":105},"推荐使用 uv 作为包管理器安装依赖；官方提供预构建的 Docker 镜像 (包含 PyTorch, CUDA 及所有依赖)；支持多种高级优化技术如 FSDP2、Ulysses 序列并行、Muon 优化器和 Native Sparse Attention；部分功能 (如 Flash Attention) 需单独安装且可能不支持 Windows。","3.11+",[106,107,108,109,110],"PyTorch>=2.0","uv","flash-attn","liger-kernel","accelerate",[35,15,62],[113,114,115,116,117],"large-language-models","multimodal","agi","unified-multimodal-models","video-generation","2026-03-27T02:49:30.150509","2026-04-19T03:03:49.254924",[121,126,131,136,141,146],{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},41344,"在多节点训练时，为什么非主节点（rank != 0）会报错提示输出目录不存在？","这是因为代码中仅在 rank == 0 时创建了输出目录。如果您的系统每个节点有独立的磁盘（而非共享存储），其他节点在保存状态字典时会因父目录不存在而报错。\n解决方案：移除创建目录代码前的 `if rank == 0:` 判断。由于 `makedirs` 函数已包含 `exist_ok=True` 参数，所有节点同时执行创建操作是安全的，这样可以确保每个节点本地都有所需的目录结构。","https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fissues\u002F93",{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},41345,"训练 Qwen3-VL 模型时速度极慢（比 Qwen2.5-VL 慢几十倍），是什么原因？","这是由于 PyTorch 的 `conv3d` 操作回退到了非常缓慢的实现方式导致的。\n解决方案：项目已在 PR #96 中修复了此问题，将逻辑从 `conv3d` 更改为等效的线性操作（linear ops）。请更新代码或应用相关补丁，训练速度将会有显著提升。","https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fissues\u002F99",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},41346,"全量微调 Qwen3-VL 模型时性能大幅下降，但冻结 ViT 参数后正常，这是为什么？","该问题源于 patch embed patch 和 vision block layer norm patch 中对卷积权重（conv weight）的形状操作错误。\n解决方案：此问题已在 PR #106 中修复。请拉取包含该修复的最新代码版本进行训练，全量微调的性能表现即可恢复正常。","https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fissues\u002F104",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},41347,"Bagel 训练中的 Loss 归一化使用的是局部 token 计数还是全局 token 计数？代码中被注释掉的 all_reduce 是否需要开启？","原始 ByteDance BAGEL 实现使用的是跨所有 GPU 的全局 token 计数。虽然之前为了代码风格统一暂时注释掉了 `dist.all_reduce` 调用，但这部分代码实际上是需要的。\n解决方案：应恢复被注释的全局归一化代码（取消 `dist.all_reduce` 和相关计算的注释），以符合原始实现逻辑。尽管维护者提到这对最终结果影响较小，但为了准确性建议开启。","https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fissues\u002F133",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},41348,"Qwen3-VL 的视频时间戳 token 位置与 transformers 库不一致，且图像块大小设置似乎有误，如何处理？","1. 关于时间戳位置：这是因为 lmms-engine 对时间戳 token 进行了扩展处理，导致顺序差异，计划后续对齐。\n2. 关于图像块大小：数据集处理中确实未指定图像块大小为 16，导致 resize 时错误地按 patch 14 计算。\n解决方案：请在 `src\u002Flmms_engine\u002Fdatasets\u002Fiterable\u002Fqwen3_vl_iterable_dataset.py` 的第 85-97 行附近显式指定 patch size 为 16 以修复 resize 问题。","https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fissues\u002F132",{"id":147,"question_zh":148,"answer_zh":149,"source_url":150},41349,"该代码库主要设计用于 SFT（监督微调）吗？是否支持预训练（Pretrain）？","是的，目前的代码和大部分数据集主要是为 SFT（对话格式）设计的。\n但是，您仍然可以使用该框架进行预训练，前提是需要您自己实现适配预训练任务的数据集（Dataset）和数据处理器（Data Processor）。","https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fissues\u002F125",[152,157,162,167,172],{"id":153,"version":154,"summary_zh":155,"released_at":156},333304,"v0.1.3","## 变更内容\n* doc：修复 GitHub 链接，由 @mwxely 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F65 中完成\n* fix：修复 Llava OV 批量图像填充问题，由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F72 中完成\n* [test] 添加 Qwen2.5 Omni 的测试，修复 Qwen2.5 Omni 示例，由 @ngquangtrung57 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F71 中完成\n* [feat] 支持使用 Liger Kernel 进行 BAGEL 训练，由 @pufanyi 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F74 中完成\n* [docs] 修复 README 中 BAGEL 模型打包状态，由 @pufanyi 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F79 中完成\n* 增强 MFU 参考文档介绍，由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F82 中完成\n* 添加 Linux UV 同步脚本，并实现自动平台检测，由 @oneScotch 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F81 中完成\n* [feat] Qwen3 MoE EP 支持，由 @Jinghao-Guo 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F75 中完成\n* [docs] 在 README 中添加 Docker 使用说明，由 @pangyyyyy 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F85 中完成\n* 为 DLLM 训练添加 Llada 和 Dream Arch 示例，由 @JinjieNi 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F84 中完成\n* [feat] Qwen 3 Omni MOE 支持 EP，由 @ngquangtrung57 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F88 中完成\n* [docs] 修正文档：扩散语言模型，由 @KemingWu 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F89 中完成\n* 更新 README.md，由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F90 中完成\n* [fix]：移除所有 makedirs 中的 rank == 0 (#93)，由 @VietCT04 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F94 中完成\n* [feat] Qwen 3 VL MOE 支持 EP，由 @ngquangtrung57 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F92 中完成\n* [feat] Qwen3 训练支持，由 @yiyexy 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F95 中完成\n* [feat] SP 损失更好的对齐，并将 Qwen3 VL 的卷积实现修复为线性，由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F96 中完成\n* [fix] 处理 Qwen 3 MoE 和 Qwen 3 Omni MoE 中的路由 logits，用于辅助损失，由 @ngquangtrung57 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F98 中完成\n* [feat] LLaVA-Video 训练支持，由 @nssmd 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F97 中完成\n* [feat] 梯度累积，由 @pufanyi 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F103 中完成\n* 暂时移除 conv3d 的线性 patch，以解决精度问题，由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F105 中完成\n* [feat] 允许 Bagel 输出 SDE 的 logits 和 logprobs，修复填充图像的 collator 填充问题，由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F109 中完成\n* [fix] 更新多节点训练的 Hydra 命令，由 @pufanyi 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F108 中完成\n* [fix] 修复 Qwen3 VL 和 RFC 并行逻辑中的一些训练不匹配问题，由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F106 中完成\n* 添加 projec","2026-01-16T10:15:03",{"id":158,"version":159,"summary_zh":160,"released_at":161},333305,"v0.1.2","## 变更内容\n* 新特性：@pufanyi 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F43 中实现了 Bagel 图像理解功能\n* 修复：@pufanyi 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F44 中修复了 Bagel 文档数据格式问题\n* 修复：@pufanyi 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F46 中允许在 `visual_gen=True` 时使用理解数据集训练 Bagel\n* 新特性：@kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F45 中实现了 Bagel 的稀疏注意力朴素实现\n* 新特性：@kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F48 中优化了批量输入的合并与打印\n* 修复：@kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F49 中合并了 FSDP\n* @BIGKnight 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F53 中添加了单卡 Muon 并修复了一些 bug\n* [v0.1.2] 发布：@kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F50 中发布了 Hydra 启动配置、SIT 和 RAE 训练相关功能\n* 修复：@kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F54 中修复了使用配置示例从命令行启动的问题\n* 新特性：@kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F56 中支持 Qwen2.5 Omni Thinker\n* 新特性：@kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F57 中添加了 Llava_OV、Bagel，并改进了 CI\u002FCD 文档和控制流程\n* 文档：@kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F58 中添加了自动构建文档的功能，该功能可能会被弃用\n* 新特性：@kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F59 中支持 Qwen3-VL Ulysses 序列并行操作\n* 修复：@kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F60 中修复了相同 DP Rank 下的随机打乱种子问题，以防止 SP 挂起\n* 文档：@mwxely 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F62 中提高了文档准确性，并添加了 Qwen-VL 训练指南\n* @Luodian 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F61 中修复并重新组织了示例\n* @Luodian 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F63 中更新了开发说明和 README 文件\n* 文档：@kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F64 中修复了一些示例错误，并改进了关于实现新类的文档\n\n## 新贡献者\n* @mwxely 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F62 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fcompare\u002Fv0.1.1...v0.1.2","2025-10-25T11:11:07",{"id":163,"version":164,"summary_zh":165,"released_at":166},333306,"v0.1.1","## 变更内容\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F8 中实现的自定义 FSDP2 训练器\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F9 中添加的 FSDP2 训练器保存与加载逻辑\n* 开发\u002Fbo 0809：由 @Luodian 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F10 中完成\n* 功能：由 @Luodian 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F11 中添加的 flash-attn 和 liger-kernel 依赖\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F14 中实现的对 Qwen2 的去填充训练支持\n* [功能]：由 @BIGKnight 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F15 中启用 dllm 训练\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F16 中添加的 CI\u002FCD 流程\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F17 中提出的 LLaVA-Ov 操作及 liger-kernel RFC\n* RFC：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F20 中提出的更完善的基数据集抽象类及灵活的 kwargs 参数\n* 测试：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F22 中进行的多 GPU CI\u002FCD 测试，以提升鲁棒性\n* 开发\u002Fwan：由 @BIGKnight 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F23 中完成\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F24 中添加的 Qwen2 ulysses 序列并行支持\n* RFC：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F25 中重构的视频加载逻辑及处理器\n* RFC：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F28 中提出的训练实现与猴子补丁逻辑\n* 为 dllm 添加高效损失函数：由 @yshenaw 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F27 中完成\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F30 中添加的性能分析器\n* 修复：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F31 中修复的性能分析错误\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F32 中实现的流式打包支持\n* 开发\u002Fmuon：由 @BIGKnight 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F34 中完成\n* 修复：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F35 中强制设置可迭代的最大步数\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F33 中实现的 bagel 训练支持\n* 修复：由 @pufanyi 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F40 中修复的图像张量尺寸错误\n\n## 新贡献者\n* @yshenaw 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fpull\u002F27 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine\u002Fcompare\u002Fv0.1.0...v0.1.1","2025-09-18T09:54:45",{"id":168,"version":169,"summary_zh":170,"released_at":171},333307,"v0.1.0.post1","## 变更内容\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F8 中实现的自定义 FSDP2 训练器\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F9 中添加的 FSDP2 训练器的保存与加载逻辑\n* 开发\u002Fbo 0809：由 @Luodian 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F10 中完成\n* 功能：由 @Luodian 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F11 中添加的 flash-attn 和 liger-kernel 依赖\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F14 中实现的对 Qwen2 的去填充训练支持\n* [功能]：由 @BIGKnight 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F15 中启用 dllm 训练\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F16 中添加的 CI\u002FCD 流程\n* 功能：由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F17 中实现的 LLaVA-Ov 操作及 liger-kernel RFC\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fcompare\u002Fv0.1.0...v0.1.0.post1","2025-08-21T05:01:21",{"id":173,"version":174,"summary_zh":175,"released_at":176},333308,"v0.1.0","## 变更内容\n* [功能] 由 @Luodian 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F2 中实现的简化\n* 开发\u002F修复由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F5 中完成\n* 功能：重构内核结构及初始化稀疏逻辑，由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F1 中完成\n* 修复：FSDP 的保存与合并，由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F6 中完成\n* 新功能：支持 Qwen2_5_VL 模型的 Ulysses 序列并行，由 @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F7 中实现\n\n## 新贡献者\n* @Luodian 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F2 中完成了首次贡献\n* @kcz358 在 https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fpull\u002F5 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002FEvolvingLMMs-Lab\u002Flmms-engine-mini\u002Fcommits\u002Fv0.1.0","2025-08-07T05:46:40"]