[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-open-compass--MixtralKit":3,"tool-open-compass--MixtralKit":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},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,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},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 真正成长为懂上",149489,2,"2026-04-10T11:32:46",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":77,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":86,"forks":87,"last_commit_at":88,"license":89,"difficulty_score":90,"env_os":91,"env_gpu":92,"env_ram":93,"env_deps":94,"category_tags":101,"github_topics":102,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":106,"updated_at":107,"faqs":108,"releases":129},6375,"open-compass\u002FMixtralKit","MixtralKit","A toolkit for inference and evaluation of 'mixtral-8x7b-32kseqlen' from Mistral AI","MixtralKit 是专为 Mistral AI 推出的 Mixtral-8x7B-32k 模型打造的开源工具包，核心功能聚焦于该模型的高效推理与性能评估。它有效解决了开发者在部署和测试这款先进混合专家（MoE）架构模型时，面临的环境配置复杂、评估标准不统一等痛点，提供了一套开箱即用的实验性代码实现。\n\n这套工具特别适合人工智能研究人员、算法工程师以及希望深入探索大模型能力的开发者使用。通过集成 OpenCompass 评估框架，MixtralKit 能够生成严谨的性能报告，帮助用户在 MMLU、GSM-8K 等多个权威基准上量化模型表现。其独特的技术亮点在于针对 Mixtral-8x7B 的稀疏激活特性进行了优化，在仅激活约 120 亿参数的情况下，即可展现出媲美甚至超越 700 亿参数稠密模型的强大能力，显著提升了推理效率。无论是进行学术研究对比，还是验证模型在具体业务场景中的落地潜力，MixtralKit 都能提供可靠的技术支持，助力用户轻松驾驭这一前沿开源模型。","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-compass_MixtralKit_readme_9d3336f32e4c.png\" width=\"500px\"\u002F>\n  \n  # MixtralKit\n\n  A Toolkit for Mixtral Model\n\n  \u003Ca href=\"#-performance\">📊Performance \u003C\u002Fa> •\n  \u003Ca href=\"#-resources\">✨Resources \u003C\u002Fa> •\n  \u003Ca href=\"#-model-architecture\">📖Architecture \u003C\u002Fa> •\n  \u003Ca href=\"#-model-weights\">📂Weights \u003C\u002Fa> •\n  \u003Ca href=\"#-install\"> 🔨 Install \u003C\u002Fa> •\n  \u003Ca href=\"#-inference\">🚀Inference \u003C\u002Fa> •\n  \u003Ca href=\"#-acknowledgement\">🤝 Acknowledgement \u003C\u002Fa>\n\n  \u003Cbr \u002F>\n  \u003Cbr \u002F>\n\n  English | [简体中文](README_zh-CN.md)\n\n\u003C\u002Fdiv>\n\n\n> [!Important]\n> \u003Cdiv align=\"center\">\n> \u003Cb>\n> 📢 Welcome to try \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass\">OpenCompass\u003C\u002Fa> for model evaluation 📢\n> \u003C\u002Fb>\n> \u003Cbr>\n> \u003Cb>\n> 🤗 Request for update your mixtral-related projects is open\u003C\u002Fa>!\n> \u003C\u002Fb>\n> \u003Cbr>\n> \u003Cb>\n> 🙏 This repo is an **experimental** implementation of inference code.\n> \u003C\u002Fb>\n> \u003C\u002Fdiv>\n\n\n\n\n\n# 📊 Performance\n\n## Comparison with Other Models\n\n- All data generated from [OpenCompass](https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass)\n\n> Performances generated from different evaluation toolkits are different due to the prompts, settings and implementation details.\n\n\n\n| Datasets        | Mode | Mistral-7B-v0.1 | Mixtral-8x7B(MoE) |  Llama2-70B | DeepSeek-67B-Base | Qwen-72B | \n|-----------------|------|-----------------|--------------|-------------|-------------------|----------|\n| Active Params   |  -   |      7B         |     12B      |     70B     |       67B         |   72B    |\n| MMLU            | PPL  | 64.1            | 71.3         | 69.7        | 71.9              | 77.3     |\n| BIG-Bench-Hard  | GEN  | 56.7            | 67.1         | 64.9        | 71.7              | 63.7     |\n| GSM-8K          | GEN  | 47.5            | 65.7         | 63.4        | 66.5              | 77.6     |\n| MATH            | GEN  | 11.3            | 22.7         | 12.0        | 15.9              | 35.1     |\n| HumanEval       | GEN  | 27.4            | 32.3         | 26.2        | 40.9              | 33.5     |\n| MBPP            | GEN  | 38.6            | 47.8         | 39.6        | 55.2              | 51.6     |\n| ARC-c           | PPL  | 74.2            | 85.1         | 78.3        | 86.8              | 92.2     |\n| ARC-e           | PPL  | 83.6            | 91.4         | 85.9        | 93.7              | 96.8     |\n| CommonSenseQA   | PPL  | 67.4            | 70.4         | 78.3        | 70.7              | 73.9     |\n| NaturalQuestion | GEN  | 24.6            | 29.4         | 34.2        | 29.9              | 27.1     |\n| TrivialQA       | GEN  | 56.5            | 66.1         | 70.7        | 67.4              | 60.1     |\n| HellaSwag       | PPL  | 78.9            | 82.0         | 82.3        | 82.3              | 85.4     |\n| PIQA            | PPL  | 81.6            | 82.9         | 82.5        | 82.6              | 85.2     |\n| SIQA            | GEN  | 60.2            | 64.3         | 64.8        | 62.6              | 78.2     |\n\n\n## Performance Mixtral-8x7b\n\n```markdown\ndataset                                 version    metric         mode    mixtral-8x7b-32k\n--------------------------------------  ---------  -------------  ------  ------------------\nmmlu                                    -          naive_average     ppl     71.34\nARC-c                                   2ef631     accuracy          ppl     85.08\nARC-e                                   2ef631     accuracy          ppl     91.36\nBoolQ                                   314797     accuracy          ppl     86.27\ncommonsense_qa                          5545e2     accuracy          ppl     70.43\ntriviaqa                                2121ce     score             gen     66.05\nnq                                      2121ce     score             gen     29.36\nopenbookqa_fact                         6aac9e     accuracy          ppl     85.40\nAX_b                                    6db806     accuracy          ppl     48.28\nAX_g                                    66caf3     accuracy          ppl     48.60\nhellaswag                               a6e128     accuracy          ppl     82.01\npiqa                                    0cfff2     accuracy          ppl     82.86\nsiqa                                    e8d8c5     accuracy          ppl     64.28\nmath                                    265cce     accuracy          gen     22.74\ngsm8k                                   1d7fe4     accuracy          gen     65.66\nopenai_humaneval                        a82cae     humaneval_pass@1  gen     32.32\nmbpp                                    1e1056     score             gen     47.80\nbbh                                     -          naive_average     gen     67.14\n```\n\n# ✨ Resources\n\n## Blog\n- [MoE Blog from Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fblog\u002Fmoe)\n- [Enhanced MoE Parallelism, Open-source MoE Model Training Can Be 9 Times More Efficient](https:\u002F\u002Fwww.hpc-ai.tech\u002Fblog\u002Fenhanced-moe-parallelism-open-source-moe-model-training-can-be-9-times-more-efficient)\n\n## Papers\n\n|  Title  |   Venue  |   Date   |   Code   |   Demo   |\n|:--------|:--------:|:--------:|:--------:|:--------:|\n|[Mixture-of-Experts Meets Instruction Tuning:A Winning Combination for Large Language Models](https:\u002F\u002Farxiv.org\u002Fabs\u002F2305.14705)           | Arxiv       | 23.05 | | \n|[MegaBlocks: Efficient Sparse Training with Mixture-of-Experts](https:\u002F\u002Farxiv.org\u002Fabs\u002F2211.15841)                                         | Arxiv       | 22.11 | [megablocks](https:\u002F\u002Fgithub.com\u002Fstanford-futuredata\u002Fmegablocks) | |\n|[ST-MoE: Designing Stable and Transferable Sparse Expert Models](https:\u002F\u002Farxiv.org\u002Fabs\u002F2202.08906)                                        | Arxiv       | 22.02 |\n|[Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity](https:\u002F\u002Farxiv.org\u002Fabs\u002F2101.03961)          | Arxiv       | 21.01 |\n|[GLaM: Efficient Scaling of Language Models with Mixture-of-Experts](https:\u002F\u002Farxiv.org\u002Fabs\u002F2112.06905)                                    | ICML 2022   | 21.12 |\n|[GShard: Scaling Giant Models with Conditional Computation and Automatic Sharding](https:\u002F\u002Farxiv.org\u002Fabs\u002F2006.16668)                      | Arxiv       | 20.06 |\n|[Learning Factored Representations in a Deep Mixture of Experts](https:\u002F\u002Farxiv.org\u002Fabs\u002F1312.4314)                                         | Arxiv       | 13.12 |\n|[FastMoE: A Fast Mixture-of-Expert Training System](https:\u002F\u002Farxiv.org\u002Fabs\u002F2103.13262)   | Arxiv | 21.03 | [FastMoE](https:\u002F\u002Fgithub.com\u002Flaekov\u002FFastMoE)|\n|[FasterMoE: Modeling and Optimizing Training of Large-scale Dynamic Pre-trained Models](https:\u002F\u002Fdl.acm.org\u002Fdoi\u002F10.1145\u002F3503221.3508418)   | ACM SIGPLAN PPoPP 2022 | 22.03 | [FasterMoE](https:\u002F\u002Fgithub.com\u002Flaekov\u002FFastMoE)|\n|[SmartMoE: Efficiently Training Sparsely-Activated Models through Combining Offline and Online Parallelization](https:\u002F\u002Fwww.usenix.org\u002Fconference\u002Fatc23\u002Fpresentation\u002Fzhai)   | USENIX ATC 2023 | 22.03 | [SmartMoE](https:\u002F\u002Fgithub.com\u002Fzms1999\u002FSmartMoE)|\n|[Adaptive Mixture of Local Experts](https:\u002F\u002Fwww.cs.toronto.edu\u002F~hinton\u002Fabsps\u002Fjjnh91.pdf)                                                  | Neural Computation | 1991 |\n\n## Evaluation\n\n- [x] Evaluation Toolkit: [OpenCompass](https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass)\n\n## Training\n- Megablocks: https:\u002F\u002Fgithub.com\u002Fstanford-futuredata\u002Fmegablocks\n- FairSeq: https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ffairseq\u002Ftree\u002Fmain\u002Fexamples\u002Fmoe_lm\n- OpenMoE: https:\u002F\u002Fgithub.com\u002FXueFuzhao\u002FOpenMoE\n- ColossalAI MoE: https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\u002Flanguage\u002Fopenmoe\n- FastMoE(FasterMoE): https:\u002F\u002Fgithub.com\u002Flaekov\u002FFastMoE\n- SmartMoE: https:\u002F\u002Fgithub.com\u002Fzms1999\u002FSmartMoE\n\n## Fine-tuning\n\n- [x] Finetuning script (Full-parameters or QLoRA) from [XTuner](https:\u002F\u002Fgithub.com\u002FInternLM\u002Fxtuner\u002Ftree\u002Fmain\u002Fxtuner\u002Fconfigs\u002Fmixtral) \n- [x] Finetuned Mixtral-8x7B from DiscoResearch: [DiscoLM-mixtral-8x7b-v2](https:\u002F\u002Fhuggingface.co\u002FDiscoResearch\u002FDiscoLM-mixtral-8x7b-v2)\n\n## Deployment\n\n- [x] [Inference with vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm)\n\n# 📖 Model Architecture\n\n>  The Mixtral-8x7B-32K MoE model is mainly composed of 32 identical MoEtransformer blocks. The main difference between the MoEtransformer block and the ordinary transformer block is that the FFN layer is replaced by the **MoE FFN** layer. In the MoE FFN layer, the tensor first goes through a gate layer to calculate the scores of each expert, and then selects the top-k experts from the 8 experts based on the expert scores. The tensor is aggregated through the outputs of the top-k experts, thereby obtaining the final output of the MoE FFN layer. Each expert consists of 3 linear layers. It is worth noting that all Norm Layers of Mixtral MoE also use RMSNorm, which is the same as LLama. In the attention layer, the QKV matrix in the Mixtral MoE has a Q matrix shape of (4096,4096) and K and V matrix shapes of (4096,1024).\n\nWe plot the architecture as the following:\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-compass_MixtralKit_readme_4a881c6f198b.png\" width=\"800px\"\u002F>\n\u003C\u002Fdiv>\n\n# 📂 Model Weights\n\n## Hugging Face Format\n\n- [Official Base Model](https:\u002F\u002Fhuggingface.co\u002Fmistralai\u002FMistral-7B-v0.1)\n- [Official Chat Model](https:\u002F\u002Fhuggingface.co\u002Fmistralai\u002FMixtral-8x7B-Instruct-v0.1)\n\n## Raw Format\n\nYou can download the checkpoints by magnet or Hugging Face\n\n### Download via HF\n\n- [mixtral-8x7b-32kseqlen](https:\u002F\u002Fhuggingface.co\u002Fsomeone13574\u002Fmixtral-8x7b-32kseqlen)\n\n> If you are unable to access Hugging Face, please try [hf-mirror](https:\u002F\u002Fhf-mirror.com\u002Fsomeone13574\u002Fmixtral-8x7b-32kseqlen)\n\n\n```bash\n# Download the Hugging Face\ngit lfs install\ngit clone https:\u002F\u002Fhuggingface.co\u002Fsomeone13574\u002Fmixtral-8x7b-32kseqlen\n\n# Merge Files(Only for HF)\ncd mixtral-8x7b-32kseqlen\u002F\n\n# Merge the checkpoints\ncat consolidated.00.pth-split0 consolidated.00.pth-split1 consolidated.00.pth-split2 consolidated.00.pth-split3 consolidated.00.pth-split4 consolidated.00.pth-split5 consolidated.00.pth-split6 consolidated.00.pth-split7 consolidated.00.pth-split8 consolidated.00.pth-split9 consolidated.00.pth-split10 > consolidated.00.pth\n```\n\n### Download via Magnet Link\n\nPlease use this link to download the original files\n```bash\nmagnet:?xt=urn:btih:5546272da9065eddeb6fcd7ffddeef5b75be79a7&dn=mixtral-8x7b-32kseqlen&tr=udp%3A%2F%http:\u002F\u002F2Fopentracker.i2p.rocks%3A6969%2Fannounce&tr=http%3A%2F%http:\u002F\u002F2Ftracker.openbittorrent.com%3A80%2Fannounce\n```\n### MD5 Validation\n\nPlease check the MD5 to make sure the files are completed.\n\n```bash\nmd5sum consolidated.00.pth\nmd5sum tokenizer.model\n\n# Once verified, you can delete the splited files.\nrm consolidated.00.pth-split*\n```\n\nOfficial MD5\n\n\n```bash\n ╓────────────────────────────────────────────────────────────────────────────╖\n ║                                                                            ║\n ║                               ·· md5sum ··                                 ║\n ║                                                                            ║\n ║        1faa9bc9b20fcfe81fcd4eb7166a79e6  consolidated.00.pth               ║\n ║        37974873eb68a7ab30c4912fc36264ae  tokenizer.model                   ║\n ╙────────────────────────────────────────────────────────────────────────────╜\n```\n\n# 🔨 Install\n\n```bash\nconda create --name mixtralkit python=3.10 pytorch torchvision pytorch-cuda -c nvidia -c pytorch -y\nconda activate mixtralkit\n\ngit clone https:\u002F\u002Fgithub.com\u002Fopen-compass\u002FMixtralKit\ncd MixtralKit\u002F\npip install -r requirements.txt\npip install -e .\n\nln -s path\u002Fto\u002Fcheckpoints_folder\u002F ckpts\n```\n\n# 🚀 Inference\n\n## Text Completion \n```bash\npython tools\u002Fexample.py -m .\u002Fckpts -t ckpts\u002Ftokenizer.model --num-gpus 2\n```\n\nExpected Results:\n\n```bash\n==============================Example START==============================\n\n[Prompt]:\nWho are you?\n\n[Response]:\nI am a designer and theorist; a lecturer at the University of Malta and a partner in the firm Barbagallo and Baressi Design, which won the prestig\nious Compasso d’Oro award in 2004. I was educated in industrial and interior design in the United States\n\n==============================Example END==============================\n\n==============================Example START==============================\n\n[Prompt]:\n1 + 1 -> 3\n2 + 2 -> 5\n3 + 3 -> 7\n4 + 4 ->\n\n[Response]:\n9\n5 + 5 -> 11\n6 + 6 -> 13\n\n#include \u003Ciostream>\n\nusing namespace std;\n\nint addNumbers(int x, int y)\n{\n        return x + y;\n}\n\nint main()\n{\n\n==============================Example END==============================\n\n```\n\n\n# 🏗️ Evaluation\n\n## Step-1: Setup OpenCompass\n\n- Clone and Install OpenCompass\n\n```bash\n# assume you have already create the conda env named mixtralkit \nconda activate mixtralkit\n\ngit clone https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass opencompass\ncd opencompass\n\npip install -e .\n```\n\n- Prepare Evaluation Dataset\n\n```bash\n# Download dataset to data\u002F folder\nwget https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass\u002Freleases\u002Fdownload\u002F0.1.8.rc1\u002FOpenCompassData-core-20231110.zip\nunzip OpenCompassData-core-20231110.zip\n```\n\n> If you need to evaluate the **humaneval**, please go to [Installation Guide](https:\u002F\u002Fopencompass.readthedocs.io\u002Fen\u002Flatest\u002Fget_started\u002Finstallation.html) for more information\n\n\n## Step-2: Pre-pare evaluation config and weights\n\n```bash\ncd opencompass\u002F\n# link the example config into opencompass\nln -s path\u002Fto\u002FMixtralKit\u002Fplayground playground\n\n# link the model weights into opencompass\nmkdir -p .\u002Fmodels\u002Fmixtral\u002F\nln -s path\u002Fto\u002Fcheckpoints_folder\u002F .\u002Fmodels\u002Fmixtral\u002Fmixtral-8x7b-32kseqlen\n```\n\nCurrently, you should have the files structure like:\n\n```bash\n\nopencompass\u002F\n├── configs\n│   ├── .....\n│   └── .....\n├── models\n│   └── mixtral\n│       └── mixtral-8x7b-32kseqlen\n├── data\u002F\n├── playground\n│   └── eval_mixtral.py\n│── ......\n```\n\n\n## Step-3: Run evaluation experiments\n\n```bash\nHF_EVALUATE_OFFLINE=1 HF_DATASETS_OFFLINE=1 TRANSFORMERS_OFFLINE=1 python run.py playground\u002Feval_mixtral.py\n```\n\n# 🤝 Acknowledgement\n\n- [llama-mistral](https:\u002F\u002Fgithub.com\u002Fdzhulgakov\u002Fllama-mistral)\n- [llama](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fllama)\n\n# 🖊️ Citation\n\n\n```latex\n@misc{2023opencompass,\n    title={OpenCompass: A Universal Evaluation Platform for Foundation Models},\n    author={OpenCompass Contributors},\n    howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass}},\n    year={2023}\n}\n```\n","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-compass_MixtralKit_readme_9d3336f32e4c.png\" width=\"500px\"\u002F>\n  \n  # MixtralKit\n\n  一个用于Mixtral模型的工具包\n\n  \u003Ca href=\"#-performance\">📊性能 \u003C\u002Fa> •\n  \u003Ca href=\"#-resources\">✨资源 \u003C\u002Fa> •\n  \u003Ca href=\"#-model-architecture\">📖架构 \u003C\u002Fa> •\n  \u003Ca href=\"#-model-weights\">📂权重 \u003C\u002Fa> •\n  \u003Ca href=\"#-install\"> 🔨 安装 \u003C\u002Fa> •\n  \u003Ca href=\"#-inference\">🚀 推理 \u003C\u002Fa> •\n  \u003Ca href=\"#-acknowledgement\">🤝 感谢 \u003C\u002Fa>\n\n  \u003Cbr \u002F>\n  \u003Cbr \u002F>\n\n  英文 | [简体中文](README_zh-CN.md)\n\n\u003C\u002Fdiv>\n\n\n> [!重要]\n> \u003Cdiv align=\"center\">\n> \u003Cb>\n> 📢 欢迎试用\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass\">OpenCompass\u003C\u002Fa>进行模型评估 📢\n> \u003C\u002Fb>\n> \u003Cbr>\n> \u003Cb>\n> 🤗 现已开放更新您与Mixtral相关的项目的请求！\n> \u003C\u002Fb>\n> \u003Cbr>\n> \u003Cb>\n> 🙏 此仓库是推理代码的**实验性**实现。\n> \u003C\u002Fb>\n> \u003C\u002Fdiv>\n\n\n\n\n\n# 📊 性能\n\n## 与其他模型的对比\n\n- 所有数据均来自[OpenCompass](https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass)\n\n> 由于提示、设置和实现细节的不同，不同评估工具生成的性能结果也会有所差异。\n\n\n\n| 数据集        | 模式 | Mistral-7B-v0.1 | Mixtral-8x7B(MoE) |  Llama2-70B | DeepSeek-67B-Base | Qwen-72B | \n|-----------------|------|-----------------|--------------|-------------|-------------------|----------|\n| 有效参数量   |  -   |      7B         |     12B      |     70B     |       67B         |   72B    |\n| MMLU            | PPL  | 64.1            | 71.3         | 69.7        | 71.9              | 77.3     |\n| BIG-Bench-Hard  | GEN  | 56.7            | 67.1         | 64.9        | 71.7              | 63.7     |\n| GSM-8K          | GEN  | 47.5            | 65.7         | 63.4        | 66.5              | 77.6     |\n| MATH            | GEN  | 11.3            | 22.7         | 12.0        | 15.9              | 35.1     |\n| HumanEval       | GEN  | 27.4            | 32.3         | 26.2        | 40.9              | 33.5     |\n| MBPP            | GEN  | 38.6            | 47.8         | 39.6        | 55.2              | 51.6     |\n| ARC-c           | PPL  | 74.2            | 85.1         | 78.3        | 86.8              | 92.2     |\n| ARC-e           | PPL  | 83.6            | 91.4         | 85.9        | 93.7              | 96.8     |\n| CommonSenseQA   | PPL  | 67.4            | 70.4         | 78.3        | 70.7              | 73.9     |\n| NaturalQuestion | GEN  | 24.6            | 29.4         | 34.2        | 29.9              | 27.1     |\n| TrivialQA       | GEN  | 56.5            | 66.1         | 70.7        | 67.4              | 60.1     |\n| HellaSwag       | PPL  | 78.9            | 82.0         | 82.3        | 82.3              | 85.4     |\n| PIQA            | PPL  | 81.6            | 82.9         | 82.5        | 82.6              | 85.2     |\n| SIQA            | GEN  | 60.2            | 64.3         | 64.8        | 62.6              | 78.2     |\n\n\n## Mixtral-8x7b性能\n\n```markdown\ndataset                                 version    metric         mode    mixtral-8x7b-32k\n--------------------------------------  ---------  -------------  ------  ------------------\nmmlu                                    -          naive_average     ppl     71.34\nARC-c                                   2ef631     accuracy          ppl     85.08\nARC-e                                   2ef631     accuracy          ppl     91.36\nBoolQ                                   314797     accuracy          ppl     86.27\ncommonsense_qa                          5545e2     accuracy          ppl     70.43\ntriviaqa                                2121ce     score             gen     66.05\nnq                                      2121ce     score             gen     29.36\nopenbookqa_fact                         6aac9e     accuracy          ppl     85.40\nAX_b                                    6db806     accuracy          ppl     48.28\nAX_g                                    66caf3     accuracy          ppl     48.60\nhellaswag                               a6e128     accuracy          ppl     82.01\npiqa                                    0cfff2     accuracy          ppl     82.86\nsiqa                                    e8d8c5     accuracy          ppl     64.28\nmath                                    265cce     accuracy          gen     22.74\ngsm8k                                   1d7fe4     accuracy          gen     65.66\nopenai_humaneval                        a82cae     humaneval_pass@1  gen     32.32\nmbpp                                    1e1056     score             gen     47.80\nbbh                                     -          naive_average     gen     67.14\n```\n\n# ✨ 资源\n\n## 博客\n- [Hugging Face的MoE博客](https:\u002F\u002Fhuggingface.co\u002Fblog\u002Fmoe)\n- [增强的MoE并行化：开源MoE模型训练效率可提升9倍](https:\u002F\u002Fwww.hpc-ai.tech\u002Fblog\u002Fenhanced-moe-parallelism-open-source-moe-model-training-can-be-9-times-more-efficient)\n\n## 论文\n\n| 标题 | 会议\u002F期刊 | 发表日期 | 代码链接 | 演示链接 |\n|:--------|:--------:|:--------:|:--------:|:--------:|\n|[专家混合模型与指令微调的结合：大型语言模型的制胜组合](https:\u002F\u002Farxiv.org\u002Fabs\u002F2305.14705)           | Arxiv       | 2023年5月 | | \n|[MegaBlocks：基于专家混合的高效稀疏训练](https:\u002F\u002Farxiv.org\u002Fabs\u002F2211.15841)                                         | Arxiv       | 2022年11月 | [megablocks](https:\u002F\u002Fgithub.com\u002Fstanford-futuredata\u002Fmegablocks) | |\n|[ST-MoE：设计稳定且可迁移的稀疏专家模型](https:\u002F\u002Farxiv.org\u002Fabs\u002F2202.08906)                                        | Arxiv       | 2022年2月 |\n|[Switch Transformers：通过简单高效的稀疏性扩展至万亿参数模型](https:\u002F\u002Farxiv.org\u002Fabs\u002F2101.03961)          | Arxiv       | 2021年1月 |\n|[GLaM：利用专家混合高效扩展语言模型](https:\u002F\u002Farxiv.org\u002Fabs\u002F2112.06905)                                    | ICML 2022   | 2021年12月 |\n|[GShard：通过条件计算和自动分片扩展巨型模型](https:\u002F\u002Farxiv.org\u002Fabs\u002F2006.16668)                      | Arxiv       | 2020年6月 |\n|[在深度专家混合模型中学习因子化表示](https:\u002F\u002Farxiv.org\u002Fabs\u002F1312.4314)                                         | Arxiv       | 2013年12月 |\n|[FastMoE：一种快速的专家混合训练系统](https:\u002F\u002Farxiv.org\u002Fabs\u002F2103.13262)   | Arxiv | 2021年3月 | [FastMoE](https:\u002F\u002Fgithub.com\u002Flaekov\u002FFastMoE)|\n|[FasterMoE：大规模动态预训练模型的建模与优化训练](https:\u002F\u002Fdl.acm.org\u002Fdoi\u002F10.1145\u002F3503221.3508418)   | ACM SIGPLAN PPoPP 2022 | 2022年3月 | [FasterMoE](https:\u002F\u002Fgithub.com\u002Flaekov\u002FFastMoE)|\n|[SmartMoE：通过结合离线与在线并行化高效训练稀疏激活模型](https:\u002F\u002Fwww.usenix.org\u002Fconference\u002Fatc23\u002Fpresentation\u002Fzhai)   | USENIX ATC 2023 | 2022年3月 | [SmartMoE](https:\u002F\u002Fgithub.com\u002Fzms1999\u002FSmartMoE)|\n|[局部专家的自适应混合](https:\u002F\u002Fwww.cs.toronto.edu\u002F~hinton\u002Fabsps\u002Fjjnh91.pdf)                                                  | Neural Computation | 1991年 |\n\n## 评估\n\n- [x] 评估工具包：[OpenCompass](https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass)\n\n## 训练\n\n- Megablocks：https:\u002F\u002Fgithub.com\u002Fstanford-futuredata\u002Fmegablocks\n- FairSeq：https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Ffairseq\u002Ftree\u002Fmain\u002Fexamples\u002Fmoe_lm\n- OpenMoE：https:\u002F\u002Fgithub.com\u002FXueFuzhao\u002FOpenMoE\n- ColossalAI MoE：https:\u002F\u002Fgithub.com\u002Fhpcaitech\u002FColossalAI\u002Ftree\u002Fmain\u002Fexamples\u002Flanguage\u002Fopenmoe\n- FastMoE（FasterMoE）：https:\u002F\u002Fgithub.com\u002Flaekov\u002FFastMoE\n- SmartMoE：https:\u002F\u002Fgithub.com\u002Fzms1999\u002FSmartMoE\n\n## 微调\n\n- [x] 微调脚本（全参数或QLoRA）来自[XTuner](https:\u002F\u002Fgithub.com\u002FInternLM\u002Fxtuner\u002Ftree\u002Fmain\u002Fxtuner\u002Fconfigs\u002Fmixtral) \n- [x] 来自DiscoResearch的微调版Mixtral-8x7B：[DiscoLM-mixtral-8x7b-v2](https:\u002F\u002Fhuggingface.co\u002FDiscoResearch\u002FDiscoLM-mixtral-8x7b-v2)\n\n## 部署\n\n- [x] [使用vLLM进行推理](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm)\n\n# 📖 模型架构\n\n> Mixtral-8x7B-32K MoE模型主要由32个相同的MoE Transformer块组成。MoE Transformer块与普通Transformer块的主要区别在于，FFN层被**MoE FFN**层取代。在MoE FFN层中，张量首先经过门控层计算每个专家的得分，然后根据专家得分从8个专家中选择前k个专家。张量通过这k个专家的输出聚合，从而得到MoE FFN层的最终输出。每个专家由3个线性层组成。值得注意的是，Mixtral MoE的所有归一化层也采用RMSNorm，这与LLama相同。在注意力层中，Mixtral MoE的QKV矩阵中，Q矩阵形状为(4096,4096)，而K和V矩阵形状均为(4096,1024)。\n\n我们用下图展示了该架构：\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-compass_MixtralKit_readme_4a881c6f198b.png\" width=\"800px\"\u002F>\n\u003C\u002Fdiv>\n\n# 📂 模型权重\n\n## Hugging Face格式\n\n- [官方基础模型](https:\u002F\u002Fhuggingface.co\u002Fmistralai\u002FMistral-7B-v0.1)\n- [官方对话模型](https:\u002F\u002Fhuggingface.co\u002Fmistralai\u002FMixtral-8x7B-Instruct-v0.1)\n\n## 原始格式\n\n您可以通过磁力链接或Hugging Face下载检查点。\n\n### 通过HF下载\n\n- [mixtral-8x7b-32kseqlen](https:\u002F\u002Fhuggingface.co\u002Fsomeone13574\u002Fmixtral-8x7b-32kseqlen)\n\n> 如果您无法访问Hugging Face，请尝试使用[hf镜像](https:\u002F\u002Fhf-mirror.com\u002Fsomeone13574\u002Fmixtral-8x7b-32kseqlen)\n\n\n```bash\n# 下载Hugging Face\ngit lfs install\ngit clone https:\u002F\u002Fhuggingface.co\u002Fsomeone13574\u002Fmixtral-8x7b-32kseqlen\n\n# 合并文件（仅适用于HF）\ncd mixtral-8x7b-32kseqlen\u002F\n\n# 合并检查点\ncat consolidated.00.pth-split0 consolidated.00.pth-split1 consolidated.00.pth-split2 consolidated.00.pth-split3 consolidated.00.pth-split4 consolidated.00.pth-split5 consolidated.00.pth-split6 consolidated.00.pth-split7 consolidated.00.pth-split8 consolidated.00.pth-split9 consolidated.00.pth-split10 > consolidated.00.pth\n```\n\n### 通过磁力链接下载\n\n请使用此链接下载原始文件\n```bash\nmagnet:?xt=urn:btih:5546272da9065eddeb6fcd7ffddeef5b75be79a7&dn=mixtral-8x7b-32kseqlen&tr=udp%3A%2F%http:\u002F\u002F2Fopentracker.i2p.rocks%3A6969%2Fannounce&tr=http%3A%2F%http:\u002F\u002F2Ftracker.openbittorrent.com%3A80%2Fannounce\n```\n### MD5校验\n\n请检查MD5以确保文件完整。\n\n```bash\nmd5sum consolidated.00.pth\nmd5sum tokenizer.model\n\n# 核实无误后，可以删除分割后的文件。\nrm consolidated.00.pth-split*\n```\n\n官方MD5\n\n\n```bash\n ╓────────────────────────────────────────────────────────────────────────────╖\n ║                                                                            ║\n ║                               ·· md5sum ··                                 ║\n ║                                                                            ║\n ║        1faa9bc9b20fcfe81fcd4eb7166a79e6  consolidated.00.pth               ║\n ║        37974873eb68a7ab30c4912fc36264ae  tokenizer.model                   ║\n ╙────────────────────────────────────────────────────────────────────────────╜\n```\n\n# 🔨 安装\n\n```bash\nconda create --name mixtralkit python=3.10 pytorch torchvision pytorch-cuda -c nvidia -c pytorch -y\nconda activate mixtralkit\n\ngit clone https:\u002F\u002Fgithub.com\u002Fopen-compass\u002FMixtralKit\ncd MixtralKit\u002F\npip install -r requirements.txt\npip install -e .\n\nln -s path\u002Fto\u002Fcheckpoints_folder\u002F ckpts\n```\n\n# 🚀 推理\n\n## 文本补全\n```bash\npython tools\u002Fexample.py -m .\u002Fckpts -t ckpts\u002Ftokenizer.model --num-gpus 2\n```\n\n预期结果：\n\n```bash\n==============================示例 START==============================\n[提示]:\n你是谁？\n\n[回应]:\n我是一名设计师和理论家，马耳他大学的讲师，同时也是Barbagallo and Baressi Design公司的合伙人。该公司于2004年荣获享有盛誉的金圆规奖。我在美国接受过工业设计和室内设计方面的教育。\n\n==============================示例 END==============================\n==============================示例 START==============================\n[提示]:\n1 + 1 -> 3\n2 + 2 -> 5\n3 + 3 -> 7\n4 + 4 ->\n\n[回应]:\n9\n5 + 5 -> 11\n6 + 6 -> 13\n\n#include \u003Ciostream>\n\nusing namespace std;\n\nint addNumbers(int x, int y)\n{\n        return x + y;\n}\n\nint main()\n{\n\n==============================示例 END==============================\n```\n\n# 🏗️ 评估\n\n## 步骤-1：设置 OpenCompass\n\n- 克隆并安装 OpenCompass\n\n```bash\n# 假设你已经创建了一个名为 mixtralkit 的 conda 环境\nconda activate mixtralkit\n\ngit clone https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass opencompass\ncd opencompass\n\npip install -e .\n```\n\n- 准备评估数据集\n\n```bash\n# 下载数据集到 data\u002F 文件夹\nwget https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass\u002Freleases\u002Fdownload\u002F0.1.8.rc1\u002FOpenCompassData-core-20231110.zip\nunzip OpenCompassData-core-20231110.zip\n```\n\n> 如果你需要评估 **humaneval**，请参阅 [安装指南](https:\u002F\u002Fopencompass.readthedocs.io\u002Fen\u002Flatest\u002Fget_started\u002Finstallation.html) 获取更多信息\n\n\n## 步骤-2：准备评估配置和权重\n\n```bash\ncd opencompass\u002F\n# 将示例配置链接到 opencompass\nln -s path\u002Fto\u002FMixtralKit\u002Fplayground playground\n\n# 将模型权重链接到 opencompass\nmkdir -p .\u002Fmodels\u002Fmixtral\u002F\nln -s path\u002Fto\u002Fcheckpoints_folder\u002F .\u002Fmodels\u002Fmixtral\u002Fmixtral-8x7b-32kseqlen\n```\n\n目前，你的文件结构应如下所示：\n\n```bash\n\nopencompass\u002F\n├── configs\n│   ├── .....\n│   └── .....\n├── models\n│   └── mixtral\n│       └── mixtral-8x7b-32kseqlen\n├── data\u002F\n├── playground\n│   └── eval_mixtral.py\n│── ......\n```\n\n\n## 步骤-3：运行评估实验\n\n```bash\nHF_EVALUATE_OFFLINE=1 HF_DATASETS_OFFLINE=1 TRANSFORMERS_OFFLINE=1 python run.py playground\u002Feval_mixtral.py\n```\n\n# 🤝 致谢\n\n- [llama-mistral](https:\u002F\u002Fgithub.com\u002Fdzhulgakov\u002Fllama-mistral)\n- [llama](https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fllama)\n\n# 🖊️ 引用\n\n\n```latex\n@misc{2023opencompass,\n    title={OpenCompass: 一个用于基础模型的通用评估平台},\n    author={OpenCompass 贡献者},\n    howpublished = {\\url{https:\u002F\u002Fgithub.com\u002Fopen-compass\u002Fopencompass}},\n    year={2023}\n}\n```","# MixtralKit 快速上手指南\n\nMixtralKit 是由 OpenCompass 团队提供的 Mixtral 模型推理工具包，支持高效的 MoE（混合专家）架构模型加载与推理。本指南将帮助你快速完成环境配置并运行首个推理示例。\n\n## 环境准备\n\n在开始之前，请确保你的开发环境满足以下要求：\n\n*   **操作系统**: Linux (推荐 Ubuntu 20.04+)\n*   **Python 版本**: 3.10\n*   **GPU**: 支持 CUDA 的 NVIDIA 显卡（建议显存充足以加载大模型）\n*   **依赖管理**: Conda (推荐)\n*   **网络**: 能够访问 GitHub 和 Hugging Face（若访问受限，建议使用国内镜像或代理）\n\n## 安装步骤\n\n### 1. 创建并激活 Conda 环境\n\n使用以下命令创建名为 `mixtralkit` 的虚拟环境，并安装 PyTorch 及相关依赖：\n\n```bash\nconda create --name mixtralkit python=3.10 pytorch torchvision pytorch-cuda -c nvidia -c pytorch -y\nconda activate mixtralkit\n```\n\n### 2. 克隆项目并安装依赖\n\n从 GitHub 克隆代码库并安装 Python 依赖包：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fopen-compass\u002FMixtralKit\ncd MixtralKit\u002F\npip install -r requirements.txt\npip install -e .\n```\n\n### 3. 准备模型权重\n\n你需要下载 Mixtral 模型权重。如果无法直接访问 Hugging Face，可以使用国内镜像站 `hf-mirror` 加速下载。\n\n**方式 A：通过 Hugging Face (或镜像) 下载**\n\n```bash\n# 初始化 git lfs\ngit lfs install\n\n# 使用官方源下载 (若网络不通，可将 huggingface.co 替换为 hf-mirror.com)\ngit clone https:\u002F\u002Fhuggingface.co\u002Fsomeone13574\u002Fmixtral-8x7b-32kseqlen\n\n# 进入目录并合并分片文件\ncd mixtral-8x7b-32kseqlen\u002F\ncat consolidated.00.pth-split0 consolidated.00.pth-split1 consolidated.00.pth-split2 consolidated.00.pth-split3 consolidated.00.pth-split4 consolidated.00.pth-split5 consolidated.00.pth-split6 consolidated.00.pth-split7 consolidated.00.pth-split8 consolidated.00.pth-split9 consolidated.00.pth-split10 > consolidated.00.pth\n\n# (可选) 验证 MD5 后删除分片文件\n# rm consolidated.00.pth-split*\n```\n\n**方式 B：建立软链接**\n\n安装完成后，将模型权重目录链接到项目根目录下的 `ckpts` 文件夹：\n\n```bash\n# 请将 path\u002Fto\u002Fcheckpoints_folder\u002F 替换为你实际下载模型的路径\nln -s path\u002Fto\u002Fcheckpoints_folder\u002F ckpts\n```\n\n> **注意**: 确保 `ckpts` 目录下包含 `consolidated.00.pth` 和 `tokenizer.model` 文件。\n\n## 基本使用\n\n完成安装和模型准备后，即可运行文本生成示例。以下命令演示了如何使用 2 张 GPU 进行推理：\n\n```bash\npython tools\u002Fexample.py -m .\u002Fckpts -t ckpts\u002Ftokenizer.model --num-gpus 2\n```\n\n**预期输出：**\n\n程序启动后将进入交互模式或直接输出示例结果，如下所示：\n\n```text\n==============================Example START==============================\n\n[Prompt]:\nWho are you?\n\n[Response]:\nI am a designer and theorist; a lecturer at the University of Malta and a partner in the firm Barbagallo and Baressi Design, which won the prestig\nious Compasso d'Oro award in 2004. I was\n\n...\n```\n\n你现在已成功运行 Mixtral 模型！你可以修改 `tools\u002Fexample.py` 中的提示词（Prompt）来测试不同的生成任务。","某金融科技公司的算法团队正急需部署一套高精度模型，用于自动化审核复杂的信贷报告并提取关键风险指标。\n\n### 没有 MixtralKit 时\n- **环境搭建繁琐**：团队需手动编写大量底层代码来适配 Mixtral-8x7B 独特的稀疏专家（MoE）架构，调试推理接口耗时数天。\n- **长文本处理困难**：面对长达数万字的信贷流水记录，缺乏原生支持 32k 上下文窗口的优化方案，导致信息截断或显存溢出。\n- **评估标准缺失**：难以快速复现官方基准测试数据，无法准确判断模型在金融逻辑推理（如 GSM-8K 类任务）上的真实性能是否达标。\n- **资源利用率低**：由于缺乏专用推理优化，相同硬件下推理速度缓慢，无法满足业务对实时性的要求。\n\n### 使用 MixtralKit 后\n- **一键部署推理**：直接调用 MixtralKit 封装好的推理接口，几分钟内即可完成模型加载，自动处理 MoE 路由逻辑，大幅降低开发门槛。\n- **原生长文支持**：利用工具对 32k 序列长度的专门优化，完整输入长篇信贷报告，精准捕捉分散在文档首尾的风险关联信息。\n- **权威性能对标**：内置与 OpenCompass 对齐的评估流程，快速验证模型在 MMLU 和数学推理任务上达到 71.3% 及 65.7% 的准确率，确立上线信心。\n- **高效算力释放**：借助优化的推理内核，在同等显卡配置下显著提升吞吐量，使批量审核效率提升数倍。\n\nMixtralKit 通过提供开箱即用的推理与评估闭环，让团队将原本用于基建的数周时间全部投入到核心业务逻辑的优化中。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fopen-compass_MixtralKit_9d3336f3.jpg","open-compass","OpenCompass","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fopen-compass_6ef39538.png","",null,"opencompass@pjlab.org.cn","OpenCompassX","opencompass.org.cn","https:\u002F\u002Fgithub.com\u002Fopen-compass",[82],{"name":83,"color":84,"percentage":85},"Python","#3572A5",100,772,75,"2026-03-26T19:59:41","Apache-2.0",4,"Linux","需要 NVIDIA GPU（安装命令包含 pytorch-cuda），具体型号和显存未说明，但运行示例需至少 2 张显卡 (--num-gpus 2)","未说明",{"notes":95,"python":96,"dependencies":97},"该项目是推理代码的实验性实现。建议使用 conda 创建名为 mixtralkit 的环境。安装后需要将模型检查点文件夹软链接为 'ckpts'。模型文件较大，需通过 Hugging Face 或磁力链接下载并合并分片文件。","3.10",[98,99,100],"pytorch","torchvision","pytorch-cuda",[14,35],[103,104,105],"llm","mistral","moe","2026-03-27T02:49:30.150509","2026-04-11T03:23:03.295270",[109,114,119,124],{"id":110,"question_zh":111,"answer_zh":112,"source_url":113},28849,"在 MMLU 基准测试中得分显著低于预期（例如只有 63.9%），可能是什么原因？","请检查评估脚本中的温度（temperature）参数设置。如果将 temperature 设置为 1 而不是 0，会导致生成结果随机性增加，从而显著降低准确率。将 temperature 设置为 0 通常能获得符合预期的基准测试分数。","https:\u002F\u002Fgithub.com\u002Fopen-compass\u002FMixtralKit\u002Fissues\u002F13",{"id":115,"question_zh":116,"answer_zh":117,"source_url":118},28846,"运行示例脚本时提示“在 .\u002Fckpts 中未找到检查点文件”怎么办？","这通常是因为模型路径参数设置错误。请确保将 `-m` 参数指向实际的模型权重文件夹，而不是空的检查点目录。正确的命令格式应类似于：`python tools\u002Fexample.py -m .\u002Fmodel -t .\u002Fmodel\u002Ftokenizer.model --num-gpus 2`（请将 `.\u002Fmodel` 替换为您实际的模型路径）。","https:\u002F\u002Fgithub.com\u002Fopen-compass\u002FMixtralKit\u002Fissues\u002F3",{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},28847,"Mistral 8x7B 32k 是预训练模型还是经过指令微调（SFT）的模型？","该项目支持两种版本的模型：\n1. 基座模型（Base，预训练）：https:\u002F\u002Fhuggingface.co\u002Fmistralai\u002FMixtral-8x7B-v0.1\n2. 对话模型（Chat\u002FInstruct，经过指令微调）：https:\u002F\u002Fhuggingface.co\u002Fmistralai\u002FMixtral-8x7B-Instruct-v0.1\n请根据您的需求选择对应的模型版本下载和使用。","https:\u002F\u002Fgithub.com\u002Fopen-compass\u002FMixtralKit\u002Fissues\u002F14",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},28848,"是否有用于训练（全量微调或 LoRA）的脚本或示例？","目前官方正在开发训练支持功能。在此之前，您可以参考 XTuner 项目中提供的 Mixtral 配置和训练示例，地址为：https:\u002F\u002Fgithub.com\u002FInternLM\u002Fxtuner\u002Ftree\u002Fmain\u002Fxtuner\u002Fconfigs\u002Fmixtral","https:\u002F\u002Fgithub.com\u002Fopen-compass\u002FMixtralKit\u002Fissues\u002F5",[]]