[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-NVlabs--DoRA":3,"tool-NVlabs--DoRA":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01: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},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 真正成长为懂上",138956,2,"2026-04-05T11:33:21",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"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,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":76,"owner_name":77,"owner_avatar_url":78,"owner_bio":79,"owner_company":80,"owner_location":80,"owner_email":80,"owner_twitter":80,"owner_website":81,"owner_url":82,"languages":83,"stars":112,"forks":113,"last_commit_at":114,"license":115,"difficulty_score":23,"env_os":116,"env_gpu":117,"env_ram":116,"env_deps":118,"category_tags":126,"github_topics":127,"view_count":23,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":138,"updated_at":139,"faqs":140,"releases":180},2881,"NVlabs\u002FDoRA","DoRA","[ICML2024 (Oral)] Official PyTorch implementation of DoRA: Weight-Decomposed Low-Rank Adaptation","DoRA（Weight-Decomposed Low-Rank Adaptation）是一种高效的大模型微调技术，旨在解决现有主流方法 LoRA 在训练稳定性和学习能力上的局限。作为 ICML 2024 的口头报告论文成果，DoRA 创新性地将预训练权重分解为“幅度”和“方向”两个独立分量进行优化。它专门利用低秩适配技术来更新权重的方向部分，从而在显著减少可训练参数数量的同时，大幅提升了模型的收敛速度和最终性能。\n\n在实际应用中，DoRA 无需增加任何推理阶段的计算开销，却能 consistently 在 LLaMA、LLaVA 等多种架构及常识推理、视觉指令微调等任务上超越 LoRA，甚至逼近全量微调的效果。此外，DoRA 已完美集成至 HuggingFace PEFT 库，支持线性层、卷积层及量化模型，开发者只需简单配置即可启用。\n\n这款工具特别适合 AI 研究人员、大模型开发者以及希望以低成本实现高性能微调的技术团队使用。无论是希望在消费级显卡上探索大模型潜力的个人开发者，还是追求极致效果的企业研发团队，DoRA 都能提供一个兼具高效性与强大表现力的理想选择，让大模型定制变得更加","DoRA（Weight-Decomposed Low-Rank Adaptation）是一种高效的大模型微调技术，旨在解决现有主流方法 LoRA 在训练稳定性和学习能力上的局限。作为 ICML 2024 的口头报告论文成果，DoRA 创新性地将预训练权重分解为“幅度”和“方向”两个独立分量进行优化。它专门利用低秩适配技术来更新权重的方向部分，从而在显著减少可训练参数数量的同时，大幅提升了模型的收敛速度和最终性能。\n\n在实际应用中，DoRA 无需增加任何推理阶段的计算开销，却能 consistently 在 LLaMA、LLaVA 等多种架构及常识推理、视觉指令微调等任务上超越 LoRA，甚至逼近全量微调的效果。此外，DoRA 已完美集成至 HuggingFace PEFT 库，支持线性层、卷积层及量化模型，开发者只需简单配置即可启用。\n\n这款工具特别适合 AI 研究人员、大模型开发者以及希望以低成本实现高性能微调的技术团队使用。无论是希望在消费级显卡上探索大模型潜力的个人开发者，还是追求极致效果的企业研发团队，DoRA 都能提供一个兼具高效性与强大表现力的理想选择，让大模型定制变得更加轻松可靠。","\u003Ch1 align=\"center\">\n    \u003Cp> DoRA: Weight-Decomposed Low-Rank Adaptation \u003Cbr> [ICML2024 (Oral)]\u003C\u002Fp>\n\u003C\u002Fh1>\n\n\u003Ch1 align=\"center\"> \n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNVlabs_DoRA_readme_7443159c554a.png\" width=\"600\">\n\u003C\u002Fh1>\n\nThe Official PyTorch implementation of [**DoRA: Weight-Decomposed Low-Rank Adaptation**](https:\u002F\u002Farxiv.org\u002Fabs\u002F2402.09353) [ICML2024 (Oral, acceptance rate: ***1.5%***)].\n\n[![Star on GitHub](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FNVlabs\u002FDoRA.svg?style=social)](https:\u002F\u002Fgithub.com\u002FNVlabs\u002FDoRA\u002Fstargazers)\n\n[Shih-Yang Liu*](https:\u002F\u002Fnbasyl.github.io\u002F), [Chien-Yi Wang](https:\u002F\u002Fchienyiwang.github.io\u002F), [Hongxu Yin](https:\u002F\u002Fhongxu-yin.github.io\u002F), [Pavlo Molchanov](https:\u002F\u002Fwww.pmolchanov.com\u002F), [Yu-Chiang Frank Wang](http:\u002F\u002Fvllab.ee.ntu.edu.tw\u002Fycwang.html), [Kwang-Ting Cheng](https:\u002F\u002Fseng.hkust.edu.hk\u002Fabout\u002Fpeople\u002Ffaculty\u002Ftim-kwang-ting-cheng), [Min-Hung Chen](https:\u002F\u002Fminhungchen.netlify.app\u002F) \u003Cbr>\n(*Work done during the internship at NVIDIA Research)\n\n[[`Paper`](https:\u002F\u002Farxiv.org\u002Fabs\u002F2402.09353)] [[`Website`](https:\u002F\u002Fnbasyl.github.io\u002FDoRA-project-page\u002F)] [[`NV Blog`](https:\u002F\u002Fdeveloper.nvidia.com\u002Fblog\u002Fintroducing-dora-a-high-performing-alternative-to-lora-for-fine-tuning\u002F)] [[`BibTeX`](#citation)]\n\nDoRA decomposes the pre-trained weight into two components, *magnitude* and *direction*, for fine-tuning, specifically employing LoRA for directional updates to minimize the number of trainable parameters efficiently. By employing DoRA, we enhance both the learning capacity and training stability of LoRA while avoiding any additional inference overhead. DoRA consistently outperforms LoRA on fine-tuning LLaMA, LLaVA, and VL-BART on various downstream tasks, such as commonsense reasoning, visual instruction tuning, and image\u002Fvideo-text understanding.\n\nFor business inquiries, please visit our website and submit the form: [NVIDIA Research Licensing](https:\u002F\u002Fwww.nvidia.com\u002Fen-us\u002Fresearch\u002Finquiries\u002F).\n\n## 💥 News 💥\n- **[07.02.2024]** 🔥🔥 The official NVIDIA Tech Blog of DoRA is released [HERE](https:\u002F\u002Fdeveloper.nvidia.com\u002Fblog\u002Fintroducing-dora-a-high-performing-alternative-to-lora-for-fine-tuning\u002F)!!\n- **[06.02.2024]** 🔥🔥 DoRA is selected as an ***Oral*** paper in [ICML 2024](https:\u002F\u002Ficml.cc\u002FConferences\u002F2024)!!\n- **[05.24.2024]** 🔥🔥 Add step-by-step instructions on how to reproduce the QDoRA\u002FFSDP results, see [\u002FQDoRA](https:\u002F\u002Fgithub.com\u002FNVlabs\u002FDoRA\u002Ftree\u002Fmain\u002FQDoRA)\n- **[05.02.2024]** 🔥🔥 DoRA is accepted to [**ICML 2024**](https:\u002F\u002Ficml.cc\u002FConferences\u002F2024)!! See you in Vienna!!\n- **[04.27.2024]** 🔥🔥 We have added the source code and the DoRA weight for finetuning LLaMA2-7B and LLaMA3-8B on commonsense reasoning tasks!\n- **[04.22.2024]** 🔥🔥 Check out an awesome blog post [FSDP\u002FQDoRA](https:\u002F\u002Fwww.answer.ai\u002Fposts\u002F2024-04-26-fsdp-qdora-llama3.html) from Answer.ai which shows that QDoRA significantly outperforms QLoRA and even edges out full finetuning!\n- **[04.18.2024]** 🔥🔥 We have released the source code and the DoRA weight for reproducing the results in our paper!\n- **[03.20.2024]** 🔥🔥 DoRA is now fully supported by the HuggingFace PEFT package and can now support Linear, Conv1d, and Conv2d layers, as well as linear layers quantized with bitsandbytes! \n\n## Useful Links\n\n- An amazing tutorial about implementing DoRA from scratch by Sebastian Raschka, see https:\u002F\u002Fmagazine.sebastianraschka.com\u002Fp\u002Flora-and-dora-from-scratch \n- An amazing blog post from Answer.AI about QDoRA\u002FFSDP which allows finetuning LLMs on consumer-level GPUs, see https:\u002F\u002Fwww.answer.ai\u002Fposts\u002F2024-04-26-fsdp-qdora-llama3.html\n\n## Quick Start and some tricks regarding finetuning with DoRA\n### HuggingFace PEFT\nDoRA is now supported by the [Huggingface PEFT package](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fpeft\u002Freleases\u002Ftag\u002Fv0.10.0). You can install the PEFT package using\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fpeft.git -q\n```\n\nAfter PEFT is installed, you can simply set the `use_dora` argument of `LoraConfig()` to `True` for applying DoRA.\n\nAn example could be as follows:\n```bash\nfrom peft import LoraConfig\n\n# Initialize DoRA configuration\nconfig = (\n    use_dora=True, ...\n)\n```\nPlease refer to the official [documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fpeft\u002Fen\u002Fdeveloper_guides\u002Flora#weight-decomposed-low-rank-adaptation-dora) for more details.\n\n### HuggingFace Diffusers\nYou can also toy with DoRA on finetuning diffusion models. See [huggingface\u002Fdiffusers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdiffusers\u002Ftree\u002Fmain\u002Fexamples\u002Fadvanced_diffusion_training#dora-training). Another good tutorial would be this [Colab notebook](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F134mt7bCMKtCYyYzETfEGKXT1J6J50ydT?usp=sharing#scrollTo=23d6bb49-3469-4e23-baf5-25b2344b599d) from [Linoy Tsaban](https:\u002F\u002Ftwitter.com\u002Flinoy_tsaban).\n\nIn general, DoRA finetuning on diffusion models is still _experimental_ and is likely to require different hyperparameter values to perform best compared to LoRA.\n> Specifically, people have noticed 2 differences to take into account in your training: \n> 1. **LoRA seem to converge faster than DoRA** (so a set of parameters that may lead to overfitting when training a LoRA may be working well for a DoRA)\n> 2. **DoRA quality superior to LoRA especially in lower ranks**: The difference in quality of DoRA of rank 8 and LoRA of rank 8 appears to be more significant than when training ranks of 32 or 64 for example.  \n\n#### Some DoRA vs. LoRA diffusion finetuning results\n- Example From [Linoy Tsaban](https:\u002F\u002Ftwitter.com\u002Flinoy_tsaban)(Images generated by DoRA are on the left and LoRA on the right):\n\u003Ch1 align=\"center\"> \n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNVlabs_DoRA_readme_83f1e6907657.jpg\" width=\"500\">\n\u003C\u002Fh1>\n\n- Example From [merve](https:\u002F\u002Ftwitter.com\u002Fmervenoyann):\n\u003Ch1 align=\"center\"> \n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNVlabs_DoRA_readme_d128a17b4184.jpeg\" width=\"500\">\n\u003C\u002Fh1>\n\n\n### DoRA hyperparameters settings\n> [!NOTE]\n> 💡 While fine-tuning with DoRA, utilizing the configuration of LoRA can already achieve better results most of the time, achieving optimal performance compared to LoRA still requires adjustments to the hyperparameters. \n\n> We suggest starting with a slightly lower learning rate than that of LoRA, and users may also experiment with varying LoRA dropout ratios.\n\n> User may also start with half of the rank of the LoRA configuration which oftentimes can already result in comparable or even superior accuracy compared to that of LoRA.\n\n## Reproducing the results in the paper\n\nThis repo contains four directories:\n\n`.\u002Fcommonsense_reasoning` contains the code to finetune LLaMA-7B\u002F13B using DoRA on the commonsense reasoning tasks. This directory is modified based on [LLM-Adapter](https:\u002F\u002Fgithub.com\u002FAGI-Edgerunners\u002FLLM-Adapters).\n\n`.\u002Finstruction_tuning_dvora` contains the code to finetune LLaMA-7B and LLaMA2-7B using DoRA and DVoRA (DoRA+VeRA) with the cleaned Alpaca instruction tuning dataset. This directory is modified based on [VeRA](https:\u002F\u002Fopenreview.net\u002Fattachment?id=NjNfLdxr3A&name=supplementary_material).\n\n`.\u002Fimage_video_text_understanding` contains the code to finetune VL-BART using DoRA for the image\u002Fvideo-text understanding tasks. This directory is modified based on [VL-Adapter](https:\u002F\u002Fgithub.com\u002Fylsung\u002FVL_adapter).\n\n`.\u002Fvisual_instruction_tuning` contains the code to finetune LLaVA-1.5-7B on the visual instruction tuning tasks with DoRA. This directory is modified based on [LLaVA](https:\u002F\u002Fgithub.com\u002Fhaotian-liu\u002FLLaVA).\n\n\n## DoRA vs LoRA on the commonsense reasoning tasks \n| Model                 | r |    BoolQ  |  PIQA  |  SIQA  |  HellaS  |  WinoG  |  ARC-e  |  ARC-c  |  OBQA  |  Average  |\n|-----------------------|-------|---------|--------|--------|-------------|--------------|---------|---------|--------|-----------|\n| LLaMA-7B-LoRA\t\t  |   32  |    67.5  |  80.8  |  78.2  |  83.4  |  80.4   |  78.0   |  62.6   |  79.1  |  76.3     |\n| LLaMA-7B-DoRA(ours)\t  |  [16](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama-7B\u002Fdora_r16)   |    70.0 | 82.6 | 79.7 | 83.2 | 80.6 | 80.6 | 65.4 | 77.6 | **77.5**   |\n| LLaMA-7B-DoRA(ours) \t  |  [32](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama-7B\u002Fdora_r32)   |   69.7 | 83.4 | 78.6 | 87.2 | 81.0 | 81.9 | 66.2 | 79.2 | **78.4**   |\n| LLaMA2-7B-LoRA\t\t  |   32  |   69.8 | 79.9| 79.5| 83.6| 82.6| 79.8|64.7| 81.0| 77.6    |\n| LLaMA2-7B-DoRA(ours)\t\t  |  [16](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama2-7B\u002Fdora_r16)   |   72.0 |83.1 |79.9| 89.1 |83.0| 84.5| 71.0 |81.2 |**80.5**  |\n| LLaMA2-7B-DoRA(ours) \t  |  [32](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama2-7B\u002Fdora_r32)   |  71.8 |83.7 |76.0 |89.1 |82.6 |83.7 |68.2| 82.4 |**79.7**   |\n| LLaMA3-8B-LoRA\t\t  |   32  |   70.8 |85.2| 79.9| 91.7 |84.3 |84.2| 71.2| 79.0| 80.8    |\n| LLaMA3-8B-DoRA(ours)\t\t  |  [16](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama3-8B\u002Fdora_r16)   |  74.5 |88.8 |80.3| 95.5| 84.7| 90.1| 79.1| 87.2| **85.0**   |\n| LLaMA3-8B-DoRA(ours) \t  |  [32](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama3-8B\u002Fdora_r32)   |   74.6| 89.3| 79.9 |95.5| 85.6| 90.5| 80.4 |85.8 |**85.2**  |\n\n## Star History\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNVlabs_DoRA_readme_593c336a8ea1.png)](https:\u002F\u002Fstar-history.com\u002F#NVlabs\u002FDoRA&Date)\n\n\n## Contact\nShih-Yang Liu: [shihyangl@nvidia.com](shihyangl@nvidia.com) or [sliuau@connect.ust.hk](sliuau@connect.ust.hk)\n\n## Citation\nIf you find DoRA useful, please consider giving a star and citation:\n```bibtex\n@article{liu2024dora,\n  title={DoRA: Weight-Decomposed Low-Rank Adaptation},\n  author={Liu, Shih-Yang and Wang, Chien-Yi and Yin, Hongxu and Molchanov, Pavlo and Wang, Yu-Chiang Frank and Cheng, Kwang-Ting and Chen, Min-Hung},\n  journal={arXiv preprint arXiv:2402.09353},\n  year={2024}\n}\n```\n\n## Licenses\nCopyright © 2024, NVIDIA Corporation. All rights reserved.\n\nThis work is made available under the NVIDIA Source Code License-NC. Click [here](LICENSE) to view a copy of this license.\n\n","\u003Ch1 align=\"center\">\n    \u003Cp> DoRA：权重分解低秩适应 \u003Cbr> [ICML2024（口头报告）]\u003C\u002Fp>\n\u003C\u002Fh1>\n\n\u003Ch1 align=\"center\"> \n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNVlabs_DoRA_readme_7443159c554a.png\" width=\"600\">\n\u003C\u002Fh1>\n\n这是[**DoRA：权重分解低秩适应**](https:\u002F\u002Farxiv.org\u002Fabs\u002F2402.09353)的官方 PyTorch 实现，该论文入选了 [ICML2024（口头报告，录取率：***1.5%***）]。\n\n[![GitHub Star 数](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002FNVlabs\u002FDoRA.svg?style=social)](https:\u002F\u002Fgithub.com\u002FNVlabs\u002FDoRA\u002Fstargazers)\n\n[Shih-Yang Liu*](https:\u002F\u002Fnbasyl.github.io\u002F)、[Chien-Yi Wang](https:\u002F\u002Fchienyiwang.github.io\u002F)、[Hongxu Yin](https:\u002F\u002Fhongxu-yin.github.io\u002F)、[Pavlo Molchanov](https:\u002F\u002Fwww.pmolchanov.com\u002F)、[Yu-Chiang Frank Wang](http:\u002F\u002Fvllab.ee.ntu.edu.tw\u002Fycwang.html)、[Kwang-Ting Cheng](https:\u002F\u002Fseng.hkust.edu.hk\u002Fabout\u002Fpeople\u002Ffaculty\u002Ftim-kwang-ting-cheng)、[Min-Hung Chen](https:\u002F\u002Fminhungchen.netlify.app\u002F) \u003Cbr>\n(*实习期间于 NVIDIA Research 完成的工作)\n\n[[`论文`](https:\u002F\u002Farxiv.org\u002Fabs\u002F2402.09353)] [[`官网`](https:\u002F\u002Fnbasyl.github.io\u002FDoRA-project-page\u002F)] [[`NV 博客`](https:\u002F\u002Fdeveloper.nvidia.com\u002Fblog\u002Fintroducing-dora-a-high-performing-alternative-to-lora-for-fine-tuning\u002F)] [[`BibTeX`](#citation)]\n\nDoRA 将预训练权重分解为“幅度”和“方向”两个组成部分来进行微调，其中特别采用 LoRA 进行方向更新，从而高效地减少可训练参数的数量。通过使用 DoRA，我们不仅提升了 LoRA 的学习能力和训练稳定性，还避免了任何额外的推理开销。在对 LLaMA、LLaVA 和 VL-BART 等模型进行各种下游任务的微调时，例如常识推理、视觉指令微调以及图像\u002F视频与文本的理解任务，DoRA 均显著优于 LoRA。\n\n如需商务合作，请访问我们的官网并提交表格：[NVIDIA Research Licensing](https:\u002F\u002Fwww.nvidia.com\u002Fen-us\u002Fresearch\u002Finquiries\u002F)。\n\n## 💥 最新消息 💥\n- **[07.02.2024]** 🔥🔥 DoRA 的官方 NVIDIA 技术博客已发布 [HERE](https:\u002F\u002Fdeveloper.nvidia.com\u002Fblog\u002Fintroducing-dora-a-high-performing-alternative-to-lora-for-fine-tuning\u002F)!!\n- **[06.02.2024]** 🔥🔥 DoRA 被选为 [ICML 2024](https:\u002F\u002Ficml.cc\u002FConferences\u002F2024) 的 ***口头报告*** 论文!!\n- **[05.24.2024]** 🔥🔥 添加了复现 QDoRA\u002FFSDP 结果的分步指南，详情请参阅 [\u002FQDoRA](https:\u002F\u002Fgithub.com\u002FNVlabs\u002FDoRA\u002Ftree\u002Fmain\u002FQDoRA)\n- **[05.02.2024]** 🔥🔥 DoRA 已被 [**ICML 2024**](https:\u002F\u002Ficml.cc\u002FConferences\u002F2024) 接受!! 维也纳见!!\n- **[04.27.2024]** 🔥🔥 我们已添加用于在常识推理任务上微调 LLaMA2-7B 和 LLaMA3-8B 的源代码及 DoRA 权重！\n- **[04.22.2024]** 🔥🔥 请查看 Answer.ai 发布的一篇精彩博文 [FSDP\u002FQDoRA](https:\u002F\u002Fwww.answer.ai\u002Fposts\u002F2024-04-26-fsdp-qdora-llama3.html)，文中指出 QDoRA 显著优于 QLoRA，甚至在性能上超越了全量微调！\n- **[04.18.2024]** 🔥🔥 我们已发布用于复现论文中结果的源代码和 DoRA 权重！\n- **[03.20.2024]** 🔥🔥 DoRA 现已完全支持 HuggingFace PEFT 包，并且可以支持 Linear、Conv1d 和 Conv2d 层，以及使用 bitsandbytes 量化后的线性层！\n\n## 有用链接\n\n- Sebastian Raschka 关于从头实现 DoRA 的精彩教程，请参阅 https:\u002F\u002Fmagazine.sebastianraschka.com\u002Fp\u002Flora-and-dora-from-scratch\n- Answer.AI 关于 QDoRA\u002FFSDP 的精彩博文，允许在消费级 GPU 上微调 LLM，请参阅 https:\u002F\u002Fwww.answer.ai\u002Fposts\u002F2024-04-26-fsdp-qdora-llama3.html\n\n## 快速入门及使用 DoRA 微调的一些技巧\n### HuggingFace PEFT\nDoRA 现已由 [Huggingface PEFT 包](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fpeft\u002Freleases\u002Ftag\u002Fv0.10.0) 支持。您可以通过以下命令安装 PEFT 包：\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fpeft.git -q\n```\n\nPEFT 安装完成后，只需将 `LoraConfig()` 的 `use_dora` 参数设置为 `True`，即可应用 DoRA。\n\n示例如下：\n```bash\nfrom peft import LoraConfig\n\n# 初始化 DoRA 配置\nconfig = (\n    use_dora=True, ...\n)\n```\n更多详细信息请参阅官方 [文档](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fpeft\u002Fen\u002Fdeveloper_guides\u002Flora#weight-decomposed-low-rank-adaptation-dora)。\n\n### HuggingFace Diffusers\n您也可以尝试使用 DoRA 对扩散模型进行微调。详情请参阅 [huggingface\u002Fdiffusers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdiffusers\u002Ftree\u002Fmain\u002Fexamples\u002Fadvanced_diffusion_training#dora-training)。另一个不错的教程是来自 [Linoy Tsaban](https:\u002F\u002Ftwitter.com\u002Flinoy_tsaban) 的 [Colab 笔记本](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F134mt7bCMKtCYyYzETfEGKXT1J6J50ydT?usp=sharing#scrollTo=23d6bb49-3469-4e23-baf5-25b2344b599d)。\n\n总体而言，使用 DoRA 对扩散模型进行微调仍处于 _实验阶段_，并且与 LoRA 相比，可能需要不同的超参数设置才能达到最佳效果。\n> 具体来说，人们注意到以下两点差异需要注意：\n> 1. **LoRA 的收敛速度似乎比 DoRA 更快**（因此，在训练 LoRA 时可能导致过拟合的一组参数，可能在 DoRA 中表现良好）\n> 2. **DoRA 的质量尤其在较低秩的情况下优于 LoRA**：例如，当训练秩为 8 时，DoRA 和 LoRA 的质量差异会比训练秩为 32 或 64 时更为明显。\n\n#### 一些 DoRA 与 LoRA 在扩散模型微调中的对比结果\n- 来自 [Linoy Tsaban](https:\u002F\u002Ftwitter.com\u002Flinoy_tsaban) 的示例（左侧为 DoRA 生成的图像，右侧为 LoRA）：\n\u003Ch1 align=\"center\"> \n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNVlabs_DoRA_readme_83f1e6907657.jpg\" width=\"500\">\n\u003C\u002Fh1>\n\n- 来自 [merve](https:\u002F\u002Ftwitter.com\u002Fmervenoyann) 的示例：\n\u003Ch1 align=\"center\"> \n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNVlabs_DoRA_readme_d128a17b4184.jpeg\" width=\"500\">\n\u003C\u002Fh1>\n\n\n### DoRA 超参数设置\n> [!NOTE]\n> 💡 使用 DoRA 进行微调时，直接沿用 LoRA 的配置通常已经可以获得较好的效果，但要达到比 LoRA 更优的性能，仍需对超参数进行调整。\n\n> 我们建议从略低于 LoRA 的学习率开始，用户也可以尝试不同的 LoRA Dropout 比例。\n\n> 此外，用户可以从 LoRA 配置中一半的秩开始，这往往已经能够带来与 LoRA 相当甚至更优的准确率。\n\n## 复现论文中的结果\n\n本仓库包含四个目录：\n\n`.\u002Fcommonsense_reasoning` 包含在常识推理任务上使用 DoRA 对 LLaMA-7B\u002F13B 进行微调的代码。该目录基于 [LLM-Adapter](https:\u002F\u002Fgithub.com\u002FAGI-Edgerunners\u002FLLM-Adapters) 修改而来。\n\n`.\u002Finstruction_tuning_dvora` 包含使用 DoRA 和 DVoRA（DoRA+VeRA）以及清洗后的 Alpaca 指令微调数据集对 LLaMA-7B 和 LLaMA2-7B 进行微调的代码。该目录基于 [VeRA](https:\u002F\u002Fopenreview.net\u002Fattachment?id=NjNfLdxr3A&name=supplementary_material) 修改而来。\n\n`.\u002Fimage_video_text_understanding` 包含在图像\u002F视频-文本理解任务上使用 DoRA 对 VL-BART 进行微调的代码。该目录基于 [VL-Adapter](https:\u002F\u002Fgithub.com\u002Fylsung\u002FVL_adapter) 修改而来。\n\n`.\u002Fvisual_instruction_tuning` 包含在视觉指令微调任务上使用 DoRA 对 LLaVA-1.5-7B 进行微调的代码。该目录基于 [LLaVA](https:\u002F\u002Fgithub.com\u002Fhaotian-liu\u002FLLaVA) 修改而来。\n\n\n## 常识推理任务中 DoRA 与 LoRA 的对比\n| 模型                 | r值 |    BoolQ  |  PIQA  |  SIQA  |  HellaS  |  WinoG  |  ARC-e  |  ARC-c  |  OBQA  |  平均  |\n|-----------------------|-------|---------|--------|--------|-------------|--------------|---------|---------|--------|-----------|\n| LLaMA-7B-LoRA\t\t  |   32  |    67.5  |  80.8  |  78.2  |  83.4  |  80.4   |  78.0   |  62.6   |  79.1  |  76.3     |\n| LLaMA-7B-DoRA(ours)\t  |  [16](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama-7B\u002Fdora_r16)   |    70.0 | 82.6 | 79.7 | 83.2 | 80.6 | 80.6 | 65.4 | 77.6 | **77.5**   |\n| LLaMA-7B-DoRA(ours) \t  |  [32](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama-7B\u002Fdora_r32)   |   69.7 | 83.4 | 78.6 | 87.2 | 81.0 | 81.9 | 66.2 | 79.2 | **78.4**   |\n| LLaMA2-7B-LoRA\t\t  |   32  |   69.8 | 79.9| 79.5| 83.6| 82.6| 79.8|64.7| 81.0| 77.6    |\n| LLaMA2-7B-DoRA(ours)\t\t  |  [16](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama2-7B\u002Fdora_r16)   |   72.0 |83.1 |79.9| 89.1 |83.0| 84.5| 71.0 |81.2 |**80.5**  |\n| LLaMA2-7B-DoRA(ours) \t  |  [32](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama2-7B\u002Fdora_r32)   |  71.8 |83.7 |76.0 |89.1 |82.6 |83.7 |68.2| 82.4 |**79.7**   |\n| LLaMA3-8B-LoRA\t\t  |   32  |   70.8 |85.2| 79.9| 91.7 |84.3 |84.2| 71.2| 79.0| 80.8    |\n| LLaMA3-8B-DoRA(ours)\t\t  |  [16](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama3-8B\u002Fdora_r16)   |  74.5 |88.8 |80.3| 95.5| 84.7| 90.1| 79.1| 87.2| **85.0**   |\n| LLaMA3-8B-DoRA(ours) \t  |  [32](https:\u002F\u002Fhuggingface.co\u002Fsliuau\u002FDoRA-weights\u002Ftree\u002Fmain\u002Fllama_dora_commonsense_checkpoints\u002FLLama3-8B\u002Fdora_r32)   |   74.6| 89.3| 79.9 |95.5| 85.6| 90.5| 80.4 |85.8 |**85.2**  |\n\n## 星标历史\n\n[![星标历史图](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNVlabs_DoRA_readme_593c336a8ea1.png)](https:\u002F\u002Fstar-history.com\u002F#NVlabs\u002FDoRA&Date)\n\n\n## 联系方式\n刘士扬：[shihyangl@nvidia.com](shihyangl@nvidia.com) 或 [sliuau@connect.ust.hk](sliuau@connect.ust.hk)\n\n## 引用\n如果您觉得 DoRA 有用，请考虑给项目点赞并引用：\n```bibtex\n@article{liu2024dora,\n  title={DoRA: Weight-Decomposed Low-Rank Adaptation},\n  author={Liu, Shih-Yang and Wang, Chien-Yi and Yin, Hongxu and Molchanov, Pavlo and Wang, Yu-Chiang Frank and Cheng, Kwang-Ting and Chen, Min-Hung},\n  journal={arXiv preprint arXiv:2402.09353},\n  year={2024}\n}\n```\n\n## 许可证\n版权所有 © 2024，英伟达公司。保留所有权利。\n\n本作品根据 NVIDIA 源代码许可协议-非商业版提供。点击 [此处](LICENSE) 查看该许可协议的副本。","# DoRA 快速上手指南\n\nDoRA (Weight-Decomposed Low-Rank Adaptation) 是一种高效的微调技术，通过将预训练权重分解为“幅度”和“方向”两个分量，并仅对方向分量使用 LoRA 进行更新。相比传统 LoRA，DoRA 在保持推理零开销的同时，显著提升了模型的学习能力和训练稳定性，尤其在低秩（Low Rank）设置下表现更优。\n\n## 环境准备\n\n*   **系统要求**：Linux 或 macOS 环境（Windows 需通过 WSL2 运行），具备 CUDA 支持的 NVIDIA GPU。\n*   **前置依赖**：\n    *   Python >= 3.8\n    *   PyTorch >= 1.13 (建议最新稳定版)\n    *   Hugging Face `transformers` 库\n    *   `bitsandbytes` (如需量化训练)\n\n## 安装步骤\n\nDoRA 已正式集成到 Hugging Face 的 `peft` 库中（v0.10.0+）。推荐直接从 GitHub 安装最新版以获取完整支持。\n\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fpeft.git -q\n```\n\n> **国内加速提示**：如果下载速度较慢，可配置 pip 使用国内镜像源（如清华源）：\n> ```bash\n> pip install git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fpeft.git -q -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n> ```\n\n确保同时安装了必要的依赖库：\n```bash\npip install transformers accelerate bitsandbytes\n```\n\n## 基本使用\n\n在 Hugging Face PEFT 中使用 DoRA 非常简单，只需在配置 `LoraConfig` 时将 `use_dora` 参数设置为 `True` 即可。\n\n### 代码示例\n\n以下是最基础的配置示例，适用于 LLaMA、LLaVA 等模型的微调：\n\n```python\nfrom peft import LoraConfig, get_peft_model\n\n# 定义 DoRA 配置\nconfig = LoraConfig(\n    r=16,                  # 秩 (Rank)，DoRA 通常可使用比 LoRA 更小的秩达到同等效果\n    lora_alpha=32,         # 缩放因子\n    target_modules=[\"q_proj\", \"v_proj\"], # 根据模型架构调整目标模块\n    lora_dropout=0.05,     # Dropout 比例\n    bias=\"none\",           # 偏置项处理方式\n    task_type=\"CAUSAL_LM\", # 任务类型，如因果语言模型\n    use_dora=True          # 【关键】启用 DoRA\n)\n\n# 将配置应用到基础模型 (base_model 为你的 transformers 模型对象)\n# model = get_peft_model(base_model, config)\n```\n\n### 调优建议\n\n虽然直接复用 LoRA 的超参数通常能获得不错的结果，但为了发挥 DoRA 的最佳性能，建议尝试以下调整：\n\n1.  **降低学习率**：尝试使用比原 LoRA 训练稍低的学习率。\n2.  **减小秩 (Rank)**：DoRA 在低秩下表现优异，可尝试将 `r` 设置为原 LoRA 方案的一半（例如从 32 降至 16），往往能获得相当甚至更好的精度。\n3.  **扩散模型注意**：若在 Diffusion 模型上使用 DoRA，请注意其收敛速度可能慢于 LoRA，且在小秩（如 r=8）下质量提升最为明显，需相应调整训练步数和超参数。","某医疗科技公司的算法团队正致力于将通用的 LLaMA-3 大模型微调为专业的“临床辅助诊断助手”，需在有限的单卡 GPU 资源上快速迭代以适应复杂的医学术语和推理逻辑。\n\n### 没有 DoRA 时\n- **微调效果遭遇瓶颈**：使用传统 LoRA 技术时，模型在处理长尾罕见病症的推理任务上准确率停滞不前，难以捕捉预训练权重中细微的方向性特征。\n- **训练过程不稳定**：在尝试增大学习率以加速收敛时，模型容易出现梯度震荡甚至发散，导致需要频繁回滚检查点，严重拖慢研发进度。\n- **参数量与性能失衡**：为了逼近全量微调的效果，团队被迫增加适配器秩（Rank），导致可训练参数量激增，超出了消费级显卡的显存承受范围。\n\n### 使用 DoRA 后\n- **推理能力显著跃升**：DoRA 将权重分解为“幅度”和“方向”分别优化，使模型在同等参数量下更精准地调整知识方向，罕见病诊断准确率大幅提升。\n- **训练稳定性极大增强**：得益于解耦更新机制，团队可以使用更大的学习率而无需担心训练崩溃，收敛速度加快且过程平滑，实验迭代周期缩短了一半。\n- **高效利用计算资源**：在保持与 LoRA 相同的零推理延迟和低参数量优势下，DoRA 的性能表现竟能媲美甚至超越昂贵的全量微调，完美适配现有硬件。\n\nDoRA 通过创新的权重分解机制，在零增加推理成本的前提下，彻底解决了低秩微调和训练稳定性之间的权衡难题，让中小团队也能低成本打造行业顶尖的专用大模型。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FNVlabs_DoRA_7ed35654.png","NVlabs","NVIDIA Research Projects","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FNVlabs_fc20d641.jpg","",null,"http:\u002F\u002Fresearch.nvidia.com","https:\u002F\u002Fgithub.com\u002FNVlabs",[84,88,92,96,100,104,108],{"name":85,"color":86,"percentage":87},"Python","#3572A5",88.5,{"name":89,"color":90,"percentage":91},"Jupyter Notebook","#DA5B0B",8.8,{"name":93,"color":94,"percentage":95},"Shell","#89e051",2.1,{"name":97,"color":98,"percentage":99},"JavaScript","#f1e05a",0.3,{"name":101,"color":102,"percentage":103},"HTML","#e34c26",0.2,{"name":105,"color":106,"percentage":107},"CSS","#663399",0.1,{"name":109,"color":110,"percentage":111},"Makefile","#427819",0,955,63,"2026-03-31T07:22:08","NOASSERTION","未说明","需要 NVIDIA GPU（支持 bitsandbytes 量化及 CUDA），具体显存需求取决于模型大小（文中提及可在消费级显卡上通过 QDoRA\u002FFSDP 运行），CUDA 版本未明确说明",{"notes":119,"python":116,"dependencies":120},"DoRA 已集成至 HuggingFace PEFT 库（v0.10.0+），只需将 LoraConfig 中的 use_dora 设为 True 即可使用。支持 Linear、Conv1d、Conv2d 层及 bitsandbytes 量化层。在微调扩散模型时仍处于实验阶段，可能需要比 LoRA 更低的学习率，且在低秩（如 rank 8）设置下效果提升更显著。可通过 FSDP 和量化技术（QDoRA）在消费级 GPU 上微调大语言模型。",[121,122,123,124,125],"torch","peft>=0.10.0","transformers","bitsandbytes","diffusers (可选，用于扩散模型)",[13,26],[128,129,130,131,132,133,134,135,136,137],"commonsense-reasoning","deep-learning","deep-neural-networks","instruction-tuning","large-language-models","large-vision-language-models","lora","parameter-efficient-fine-tuning","parameter-efficient-tuning","vision-and-language","2026-03-27T02:49:30.150509","2026-04-06T05:35:38.424606",[141,146,150,155,160,165,170,175],{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},13331,"在常识推理任务中，不同秩（rank）设置对应的 lora_alpha 值是多少？","Alpha 值简单地设置为秩值的两倍。具体对应关系为：当 rank = [4, 8, 16, 64] 时，alpha = [8, 16, 32, 128]。","https:\u002F\u002Fgithub.com\u002FNVlabs\u002FDoRA\u002Fissues\u002F13",{"id":147,"question_zh":148,"answer_zh":149,"source_url":145},13332,"脚本中的 micro_batch_size 设置为 16 会导致显存溢出（OOM），应该设为多少？","micro_batch_size 可以设置为任何适合您 GPU 显存大小的值，这不会影响最终的实验结果。如果发生 OOM，请根据硬件情况减小该值（例如设为 4）。",{"id":151,"question_zh":152,"answer_zh":153,"source_url":154},13329,"为什么我无法复现 README 中 LLaMA2-7B 在常识推理任务上的准确率？","复现结果较低可能是由于过拟合导致的，特别是在较大秩（rank）设置下。维护者重新运行实验发现，r=32 的结果不如首次运行（可能因过拟合导致训练损失更低），而 r=16 的结果与首次运行大致相同。DoRA 增强了学习能力，因此在较大秩上更容易过拟合，较低秩的 DoRA 通常更稳定。建议参考相关论文或尝试调整超参数以避免过拟合。","https:\u002F\u002Fgithub.com\u002FNVlabs\u002FDoRA\u002Fissues\u002F9",{"id":156,"question_zh":157,"answer_zh":158,"source_url":159},13330,"微调过程中的随机种子对结果稳定性有多大影响？","如果不固定随机种子，测试准确率确实不太稳定，不同种子间的结果方差很大。维护者在使用相同超参数配置进行 5 次运行时观察到波动，其中某次运行虽然训练损失最低但评估分数也最低，这表明模型可能过拟合了。目前尚未进行广泛的超参数搜索来优化稳定性，建议在评估时注意种子设置或进行多次运行取平均。","https:\u002F\u002Fgithub.com\u002FNVlabs\u002FDoRA\u002Fissues\u002F2",{"id":161,"question_zh":162,"answer_zh":163,"source_url":164},13333,"加载 LLaMA3 模型时出现 tokenizer 解析错误（RuntimeError: Internal: src\u002Fsentencepiece_processor.cc...），如何解决？","这是由于之前添加 LLaMA3 支持时忘记更新 `commonsense_evaluate.py` 文件导致的。维护者已更新该文件，请拉取最新代码后重试。确保使用的是更新后的评估脚本。","https:\u002F\u002Fgithub.com\u002FNVlabs\u002FDoRA\u002Fissues\u002F6",{"id":166,"question_zh":167,"answer_zh":168,"source_url":169},13334,"Hugging Face PEFT 何时支持 QDoRA？目前如何使用 QDoRA？","目前 Hugging Face PEFT 对 QDoRA 的支持仍存在一些 bug。建议使用 FSDP 或 QLoRA 来运行 QDoRA。具体的逐步操作指南可以参考项目仓库中 `QDoRA` 文件夹下的说明文档。","https:\u002F\u002Fgithub.com\u002FNVlabs\u002FDoRA\u002Fissues\u002F8",{"id":171,"question_zh":172,"answer_zh":173,"source_url":174},13335,"自定义实现 DoRA 前向传播时遇到显存溢出（OOM），特别是使用 torch.linalg.norm 时，原因是什么？","您的实现方式不正确导致了额外的显存消耗。请参考论文第 4.2 节以及 Hugging Face PEFT 的官方实现代码（路径：`src\u002Fpeft\u002Ftuners\u002Flora\u002Flayer.py`）来修正您的前向传播逻辑，不要手动计算矩阵范数的方式如提问中所示。","https:\u002F\u002Fgithub.com\u002FNVlabs\u002FDoRA\u002Fissues\u002F4",{"id":176,"question_zh":177,"answer_zh":178,"source_url":179},13336,"如何在视觉指令微调（Visual Instruction Tuning）中使用 LLaMA-3-8B 测试 DoRA 性能？","目前 LLaVA 框架中尚未提供 LLaMA-3 的投影器权重（projector weight）。除非您自己训练投影器，否则暂时无法在 LLaVA 框架内直接使用 LLaMA-3。支持的模型列表请参阅 LLaVA Model Zoo 文档。","https:\u002F\u002Fgithub.com\u002FNVlabs\u002FDoRA\u002Fissues\u002F3",[]]