[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-Xwin-LM--Xwin-LM":3,"tool-Xwin-LM--Xwin-LM":65},[4,17,27,35,48,57],{"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 真正成长为懂上",151314,2,"2026-04-11T23:32:58",[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":10,"last_commit_at":33,"category_tags":34,"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":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":10,"last_commit_at":41,"category_tags":42,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",85092,"2026-04-10T11:13:16",[26,43,44,45,14,46,15,13,47],"数据工具","视频","插件","其他","音频",{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":54,"last_commit_at":55,"category_tags":56,"status":16},5784,"funNLP","fighting41love\u002FfunNLP","funNLP 是一个专为中文自然语言处理（NLP）打造的超级资源库，被誉为\"NLP 民工的乐园”。它并非单一的软件工具，而是一个汇集了海量开源项目、数据集、预训练模型和实用代码的综合性平台。\n\n面对中文 NLP 领域资源分散、入门门槛高以及特定场景数据匮乏的痛点，funNLP 提供了“一站式”解决方案。这里不仅涵盖了分词、命名实体识别、情感分析、文本摘要等基础任务的标准工具，还独特地收录了丰富的垂直领域资源，如法律、医疗、金融行业的专用词库与数据集，甚至包含古诗词生成、歌词创作等趣味应用。其核心亮点在于极高的全面性与实用性，从基础的字典词典到前沿的 BERT、GPT-2 模型代码，再到高质量的标注数据和竞赛方案，应有尽有。\n\n无论是刚刚踏入 NLP 领域的学生、需要快速验证想法的算法工程师，还是从事人工智能研究的学者，都能在这里找到急需的“武器弹药”。对于开发者而言，它能大幅减少寻找数据和复现模型的时间；对于研究者，它提供了丰富的基准测试资源和前沿技术参考。funNLP 以开放共享的精神，极大地降低了中文自然语言处理的开发与研究成本，是中文 AI 社区不可或缺的宝藏仓库。",79857,1,"2026-04-08T20:11:31",[15,43,46],{"id":58,"name":59,"github_repo":60,"description_zh":61,"stars":62,"difficulty_score":54,"last_commit_at":63,"category_tags":64,"status":16},6590,"gpt4all","nomic-ai\u002Fgpt4all","GPT4All 是一款让普通电脑也能轻松运行大型语言模型（LLM）的开源工具。它的核心目标是打破算力壁垒，让用户无需依赖昂贵的显卡（GPU）或云端 API，即可在普通的笔记本电脑和台式机上私密、离线地部署和使用大模型。\n\n对于担心数据隐私、希望完全掌控本地数据的企业用户、研究人员以及技术爱好者来说，GPT4All 提供了理想的解决方案。它解决了传统大模型必须联网调用或需要高端硬件才能运行的痛点，让日常设备也能成为强大的 AI 助手。无论是希望构建本地知识库的开发者，还是单纯想体验私有化 AI 聊天的普通用户，都能从中受益。\n\n技术上，GPT4All 基于高效的 `llama.cpp` 后端，支持多种主流模型架构（包括最新的 DeepSeek R1 蒸馏模型），并采用 GGUF 格式优化推理速度。它不仅提供界面友好的桌面客户端，支持 Windows、macOS 和 Linux 等多平台一键安装，还为开发者提供了便捷的 Python 库，可轻松集成到 LangChain 等生态中。通过简单的下载和配置，用户即可立即开始探索本地大模型的无限可能。",77307,"2026-04-11T06:52:37",[15,13],{"id":66,"github_repo":67,"name":68,"description_en":69,"description_zh":70,"ai_summary_zh":70,"readme_en":71,"readme_zh":72,"quickstart_zh":73,"use_case_zh":74,"hero_image_url":75,"owner_login":68,"owner_name":68,"owner_avatar_url":76,"owner_bio":77,"owner_company":77,"owner_location":77,"owner_email":77,"owner_twitter":77,"owner_website":77,"owner_url":78,"languages":79,"stars":88,"forks":89,"last_commit_at":90,"license":77,"difficulty_score":23,"env_os":91,"env_gpu":92,"env_ram":93,"env_deps":94,"category_tags":97,"github_topics":77,"view_count":10,"oss_zip_url":77,"oss_zip_packed_at":77,"status":16,"created_at":98,"updated_at":99,"faqs":100,"releases":131},6787,"Xwin-LM\u002FXwin-LM","Xwin-LM","Xwin-LM: Powerful, Stable, and Reproducible LLM Alignment","Xwin-LM 是一个专注于大语言模型（LLM）对齐技术的开源项目，旨在通过监督微调、奖励建模及人类反馈强化学习（RLHF）等方法，让模型输出更稳定、强大且可复现。它主要解决了开源模型在理解人类意图和生成高质量回答方面难以媲美顶尖闭源模型的难题。\n\n该项目基于 LLaMA-2 架构构建，其最显著的技术亮点在于卓越的基准测试表现：Xwin-LM 曾是首个在 AlpacaEval 评测中超越 GPT-4 的开源模型，并在数学推理（如 MATH、GSM8K）及代码生成任务中多次刷新同量级模型的纪录，部分版本甚至达到了与 GPT-3.5-Turbo 相当的水平。此外，项目详细公开了对齐技术细节，强调了 RLHF 在提升模型性能中的关键作用，具有极高的研究参考价值。\n\nXwin-LM 非常适合 AI 研究人员深入探索模型对齐机制，也适合开发者直接调用或微调以构建高性能应用。无论是需要强大推理能力的学术实验，还是追求极致效果的生产环境，Xwin-LM 都提供了一个经过验证的强力基座。","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FXwin-LM_Xwin-LM_readme_f8dac4dccdd1.png\" style=\"width: 70%\">\n\u003C\u002Fdiv>\n\n\u003Ch3 align=\"center\">\nPowerful, Stable, and Reproducible LLM Alignment\n\u003C\u002Fh3>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Models-blue\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\n\n**Step up your LLM alignment with Xwin-LM!**\n\nXwin-LM aims to develop and open-source alignment technologies for large language models, including supervised fine-tuning (SFT), reward models (RM), reject sampling, reinforcement learning from human feedback (RLHF), etc. Our first release, built-upon on the Llama2 base models, ranked **TOP-1** on [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F). Notably, it's **the first to surpass GPT-4** on this benchmark. The project will be continuously updated.\n\n## News\n\n- :boom: [May, 2024] The [Xwin-Math-70B-V1.1](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-70B-V1.1) and [Xwin-Math-7B-V1.1](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-7B-V1.1) model achieve **51.9 and 44.7 pass@1 on the MATH benchmark** and **90.6 and 84.4 pass@1 on the GSM8K benchmark**. These are new SoTA models based on LLaMA-2!\n- :boom: [Jan, 2024] We update [XwinLM-V0.3](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F) on [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F), ranking as **top-1** among open-source models.\n- :boom: [Nov, 2023] The [Xwin-Math-70B-V1.0](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-70B-V1.0) model achieves **31.8 pass@1 on the MATH benchmark** and **87.0 pass@1 on the GSM8K benchmark**. This performance places it first amongst all open-source models!\n- :boom: [Nov, 2023] The [Xwin-Math-7B-V1.0](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-7B-V1.0) and [Xwin-Math-13B-V1.0](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-13B-V1.0) models achieve **66.6 and 76.2 pass@1 on the GSM8K benchmark**, ranking as top-1 among all LLaMA-2 based 7B and 13B open-source models, respectively!\n- :boom: [Nov, 2023] We released  [**XwinCoder-7B**](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-7B), [**XwinCoder-13B**](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-13B), [**XwinCoder-34B**](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-34B). Our XwinCoder-34B reached **74.2** on HumanEval and it **achieves comparable performance as GPT-3.5-turbo on 6 benchmarks.**\n- :boom: [Oct 12, 2023] [Xwin-LM-7B-V0.2](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-7B-V0.2) and [Xwin-LM-13B-V0.2](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-13B-V0.2) have been released, with improved comparison data and RL training (i.e., PPO). Their winrates v.s. GPT-4 have increased significantly, reaching **59.83%** (7B model) and **70.36%** (13B model) respectively. The 70B model will be released soon.\n- :boom: [Sep, 2023] We released [Xwin-LM-70B-V0.1](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-70B-V0.1), which has achieved a win-rate against Davinci-003 of **95.57%** on [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F) benchmark, ranking as **TOP-1** on AlpacaEval. **It was the FIRST model surpassing GPT-4** on [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F). Also note its winrate v.s. GPT-4 is **60.61**.\n- :mag: [Sep, 2023] RLHF plays crucial role in the strong performance of Xwin-LM-V0.1 release!\n- :boom: [Sep, 2023] We released [Xwin-LM-13B-V0.1](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-13B-V0.1), which has achieved **91.76%** win-rate on [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F), ranking as **top-1** among all 13B models.\n- :boom: [Sep, 2023] We released [Xwin-LM-7B-V0.1](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-7B-V0.1), which has achieved **87.82%** win-rate on [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F), ranking as **top-1** among all 7B models.\n\n\n## Model Card\n| Model        | Checkpoint | Report | License  |\n|------------|------------|-------------|------------------|\n|Xwin-LM-7B-V0.2| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-7B-V0.2\" target=\"_blank\">HF Link\u003C\u002Fa> | [📃**Paper Link**](https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.20335) | \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n|Xwin-LM-13B-V0.2| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-13B-V0.2\" target=\"_blank\">HF Link\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n|Xwin-LM-7B-V0.1| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-7B-V0.1\" target=\"_blank\">HF Link\u003C\u002Fa> |  | \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n|Xwin-LM-13B-V0.1| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-13B-V0.1\" target=\"_blank\">HF Link\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n|Xwin-LM-70B-V0.1| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-70B-V0.1\" target=\"_blank\">HF Link\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n|Xwin-Coder-7B| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-7B\" target=\"_blank\">HF Link\u003C\u002Fa> | [📃**Brief introduction**](.\u002FXwin-Coder\u002F\u002FREADME.md) |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n|Xwin-Coder-13B| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-13B\" target=\"_blank\">HF Link\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n|Xwin-Coder-34B| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-7B\" target=\"_blank\">HF Link\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n|Xwin-Math-7B-V1.1| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-7B-V1.1\" target=\"_blank\">HF Link\u003C\u002Fa> | [📃**Paper Link**](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2403.04706) |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n|Xwin-Math-70B-V1.1| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-70B-V1.1\" target=\"_blank\">HF Link\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License| \n|Xwin-Math-7B-V1.0| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-7B-V1.0\" target=\"_blank\">HF Link\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n|Xwin-Math-13B-V1.0| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-13B-V1.0\" target=\"_blank\">HF Link\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n|Xwin-Math-70B-V1.0| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-70B-V1.0\" target=\"_blank\">HF Link\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2 License|\n## Benchmarks\n\n### Xwin-LM performance on [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F).\n\nThe table below displays the performance of Xwin-LM on [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F), where evaluates its win-rate against Text-Davinci-003 across 805 questions. To provide a comprehensive evaluation, we present, for the first time, the win-rate against ChatGPT and GPT-4 as well. Our Xwin-LM model family establish a new state-of-the-art performance across all metrics. Notably, Xwin-LM-70B-V0.1 has eclipsed GPT-4 for the first time, achieving an impressive win-rate of **95.57%** to Text-Davinci-003 and **60.61%** to GPT-4.\n\n| **Model**                         | **AlpacaEval (winrate %)** | **AlpacaEval (winrate %)**  |**AlpacaEval (winrate %)** |\n|----------------------------------|------------|----------|-------------|\n|    | **v.s. Text-Davinci-003** | **v.s. ChatGPT** | **v.s. GPT4**|\n| **Xwin-LM-70B-V0.1**                   | **95.57**      | **87.50**          | **60.61**            |\n| GPT-4                          | 95.28  | 84.66     |  50.00      |\n| **Xwin-LM-13B-V0.2**          | **93.22**  | **87.14**  |  **70.36**    |\n| WizardLM-70B-V1.0           | 92.91  | 80.19     |  46.70      |\n| Llama-2-70B-Chat         | 92.66  | 81.97     |  51.19      |\n| **Xwin-LM-13B-V0.1**          | **91.76**  | **81.79**  |  **55.30**    |\n| ChatGPT                    | 89.37  | 50.00     |  16.60      |\n| **Xwin-LM-7B-V0.2**      | **89.31** | **79.60**    |  **59.83**     |\n| WizardLM-13B-V1.2         | 89.17  | 75.75     |  41.91      |\n| **Xwin-LM-7B-V0.1**      | **87.35** | **76.40**    |  **47.57**     |\n| Llama-2-13B-Chat     | 81.09  | 64.22     |  30.92      |\n\n\n### Case study on [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F)\n\n|   Prompts  |  GPT4 response   |  Xwin-LM response |\n|----------------|------------|--------|\n|I've put a plate on top of an apple, and take the plate from kitchen to dinning room. Where is the apple now|The apple is now in the dining room, as it was underneath the plate when you moved the plate from the kitchen to the dining room.|The apple is still in the kitchen, as you have only moved the plate. The apple is under the plate, so if you want to bring the apple to the dining room, you should either move the apple directly or put the apple on the plate and then move the plate to the dining room.|\n| Answer the following question.\u003Cbr> How do you say \"good evening\" in French. | In French, \"good evening\" is said as \"bonsoir.\" | In French, \"good evening\" is translated to \"bonsoir.\" This greeting is used in the evening and nighttime hours, typically after 6 p.m. It is a combination of \"bon,\" which means \"good,\" and \"soir,\" which means \"evening.\" To pronounce it, say \"bone-swahr.\" |\n\n\n### Xwin-LM performance on NLP foundation tasks.\n\nThe following table provides a comparison of Xwin-LMs with other LLMs on NLP foundation tasks in [Open LLM Leaderboard](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FHuggingFaceH4\u002Fopen_llm_leaderboard). \n\n| Model            | MMLU 5-shot | ARC 25-shot | TruthfulQA 0-shot | HellaSwag 10-shot | Average    |\n|------------------|-------------|-------------|-------------------|-------------------|------------|\n| Text-davinci-003 | 56.9 | **85.2**    | 59.3         | 82.2       | 70.9  |\n|Vicuna-13b 1.1   | 51.3        | 53.0        | 51.8              | 80.1              | 59.1       |\n|Guanaco 30B   | 57.6        | 63.7        | 50.7              | 85.1              | 64.3       |   \n| WizardLM-7B 1.0      | 42.7        | 51.6        | 44.7              | 77.7              | 54.2       |\n| WizardLM-13B 1.0     | 52.3        | 57.2        | 50.5              | 81.0              | 60.2       |\n| WizardLM-30B 1.0    | 58.8    | 62.5 | 52.4       | 83.3          | 64.2|\n| Llama-2-7B-Chat      | 48.3        | 52.9        | 45.6     | 78.6    | 56.4       |\n| Llama-2-13B-Chat      | 54.6        | 59.0        | 44.1     | 81.9    | 59.9       |\n| Llama-2-70B-Chat      | 63.9        | 64.6        | 52.8       | 85.9   | 66.8       |\n| **Xwin-LM-7B-V0.1**      | 49.7        | 56.2        | 48.1     | 79.5    | 58.4       |\n| **Xwin-LM-13B-V0.1**      | 56.6        | 62.4        | 45.5     | 83.0    | 61.9       |\n| **Xwin-LM-70B-V0.1**      | **69.6**        | 70.5        | **60.1**       | **87.1**   | **71.8**       |\n| **Xwin-LM-7B-V0.2**      | 50.0  | 56.4    |  49.5   |  78.9   |     58.7       |\n| **Xwin-LM-13B-V0.2**      | 56.6 |    61.5   |  43.8   | 82.9  |         61.2      |\n\n\n## Inference\n\n### Conversation Template\nTo obtain desired results, please strictly follow the conversation templates when utilizing our model for inference. Our model adopts the prompt format established by [Vicuna](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat) and is equipped to support **multi-turn** conversations.\n```\nA chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: Hi! ASSISTANT: Hello.\u003C\u002Fs>USER: Who are you? ASSISTANT: I am Xwin-LM.\u003C\u002Fs>......\n```\n\n### HuggingFace Example\n\n```python\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\n\nmodel = AutoModelForCausalLM.from_pretrained(\"Xwin-LM\u002FXwin-LM-7B-V0.1\")\ntokenizer = AutoTokenizer.from_pretrained(\"Xwin-LM\u002FXwin-LM-7B-V0.1\")\n(\n    prompt := \"A chat between a curious user and an artificial intelligence assistant. \"\n            \"The assistant gives helpful, detailed, and polite answers to the user's questions. \"\n            \"USER: Hello, can you help me? \"\n            \"ASSISTANT:\"\n)\ninputs = tokenizer(prompt, return_tensors=\"pt\")\nsamples = model.generate(**inputs, max_new_tokens=4096, temperature=0.7)\noutput = tokenizer.decode(samples[0][inputs[\"input_ids\"].shape[1]:], skip_special_tokens=True)\nprint(output) \n# Of course! I'm here to help. Please feel free to ask your question or describe the issue you're having, and I'll do my best to assist you.\n```\n\n\n### vLLM Example\nBecause Xwin-LM is based on Llama2, it also offers support for rapid inference using [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm). Please refer to [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm) for detailed installation instructions.\n```python\nfrom vllm import LLM, SamplingParams\n(\n    prompt := \"A chat between a curious user and an artificial intelligence assistant. \"\n            \"The assistant gives helpful, detailed, and polite answers to the user's questions. \"\n            \"USER: Hello, can you help me? \"\n            \"ASSISTANT:\"\n)\nsampling_params = SamplingParams(temperature=0.7, max_tokens=4096)\nllm = LLM(model=\"Xwin-LM\u002FXwin-LM-7B-V0.1\")\noutputs = llm.generate([prompt,], sampling_params)\n\nfor output in outputs:\n    prompt = output.prompt\n    generated_text = output.outputs[0].text\n    print(generated_text)\n```\n\n## TODO\n\n- [ ] Release the source code\n- [ ] Release more capabilities, such as math, reasoning, and etc.\n\n## Citation\nPlease consider citing our work if you use the data or code in this repo.\n```\n@software{xwin-lm,\n  title = {Xwin-LM},\n  author = {Xwin-LM Team},\n  url = {https:\u002F\u002Fgithub.com\u002FXwin-LM\u002FXwin-LM},\n  version = {pre-release},\n  year = {2023},\n  month = {9},\n}\n```\n\n## Acknowledgements\n\nThanks to [Llama 2](https:\u002F\u002Fai.meta.com\u002Fllama\u002F), [FastChat](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat), [AlpacaFarm](https:\u002F\u002Fgithub.com\u002Ftatsu-lab\u002Falpaca_farm), and [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm).\n","\u003Cdiv align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FXwin-LM_Xwin-LM_readme_f8dac4dccdd1.png\" style=\"width: 70%\">\n\u003C\u002Fdiv>\n\n\u003Ch3 align=\"center\">\n强大、稳定且可复现的大语言模型对齐技术\n\u003C\u002Fh3>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\">\n    \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Models-blue\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\n\n**用Xwin-LM提升你的大语言模型对齐水平！**\n\nXwin-LM致力于开发并开源大型语言模型的对齐技术，包括监督微调（SFT）、奖励模型（RM）、拒绝采样、人类反馈强化学习（RLHF）等。我们的首个版本基于Llama2基础模型，在[AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F)上排名**TOP-1**。值得注意的是，它是**首个在该基准上超越GPT-4的模型**。该项目将持续更新。\n\n## 新闻\n\n- :boom: [2024年5月] 模型[Xwin-Math-70B-V1.1](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-70B-V1.1)和[Xwin-Math-7B-V1.1](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-7B-V1.1)在MATH基准测试中分别取得了**51.9和44.7的pass@1分数**，在GSM8K基准测试中则分别达到**90.6和84.4的pass@1分数**。这些都是基于LLaMA-2的最新SOTA模型！\n- :boom: [2024年1月] 我们在[AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F)上更新了[XwinLM-V0.3](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F)，在所有开源模型中排名第一。\n- :boom: [2023年11月] 模型[Xwin-Math-70B-V1.0](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-70B-V1.0)在MATH基准测试中达到了**31.8的pass@1分数**，在GSM8K基准测试中则为**87.0的pass@1分数**。这一表现使其成为所有开源模型中的第一名！\n- :boom: [2023年11月] 模型[Xwin-Math-7B-V1.0](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-7B-V1.0)和[Xwin-Math-13B-V1.0](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-13B-V1.0)在GSM8K基准测试中分别取得了**66.6和76.2的pass@1分数**，分别位居所有基于LLaMA-2的7B和13B开源模型中的第一名！\n- :boom: [2023年11月] 我们发布了[**XwinCoder-7B**](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-7B)、[**XwinCoder-13B**](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-13B)和[**XwinCoder-34B**](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-34B)。其中，XwinCoder-34B在HumanEval上的得分为**74.2**，并且在6个基准测试中**与GPT-3.5-turbo的表现相当**。\n- :boom: [2023年10月12日] [Xwin-LM-7B-V0.2](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-7B-V0.2)和[Xwin-LM-13B-V0.2](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-13B-V0.2)已发布，改进了对比数据和强化学习训练（即PPO）。它们对阵GPT-4的胜率显著提高，分别达到**59.83%**（7B模型）和**70.36%**（13B模型）。70B模型也将很快发布。\n- :boom: [2023年9月] 我们发布了[Xwin-LM-70B-V0.1](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-70B-V0.1)，在[AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F)基准测试上，其对阵Davinci-003的胜率为**95.57%**，在AlpacaEval中排名第一。**这是首个在AlpacaEval上超越GPT-4的模型**。此外，它对阵GPT-4的胜率为**60.61%**。\n- :mag: [2023年9月] RLHF在Xwin-LM-V0.1版本的强大性能中发挥了关键作用！\n- :boom: [2023年9月] 我们发布了[Xwin-LM-13B-V0.1](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-13B-V0.1)，在[AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F)上的胜率为**91.76%**，在所有13B模型中排名第一。\n- :boom: [2023年9月] 我们发布了[Xwin-LM-7B-V0.1](https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-7B-V0.1)，在[AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F)上的胜率为**87.82%**，在所有7B模型中排名第一。\n\n\n## 模型卡片\n| 模型        | 检查点 | 报告 | 许可证  |\n|------------|------------|-------------|------------------|\n|Xwin-LM-7B-V0.2| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-7B-V0.2\" target=\"_blank\">HF链接\u003C\u002Fa> | [📃**论文链接**](https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.20335) | \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-LM-13B-V0.2| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-13B-V0.2\" target=\"_blank\">HF链接\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-LM-7B-V0.1| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-7B-V0.1\" target=\"_blank\">HF链接\u003C\u002Fa> |  | \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-LM-13B-V0.1| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-13B-V0.1\" target=\"_blank\">HF链接\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-LM-70B-V0.1| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-LM-70B-V0.1\" target=\"_blank\">HF链接\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-Coder-7B| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-7B\" target=\"_blank\">HF链接\u003C\u002Fa> | [📃**简要介绍**](.\u002FXwin-Coder\u002F\u002FREADME.md) |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-Coder-13B| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-13B\" target=\"_blank\">HF链接\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-Coder-34B| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwinCoder-7B\" target=\"_blank\">HF链接\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-Math-7B-V1.1| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-7B-V1.1\" target=\"_blank\">HF链接\u003C\u002Fa> | [📃**论文链接**](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2403.04706) |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-Math-70B-V1.1| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-70B-V1.1\" target=\"_blank\">HF链接\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-Math-7B-V1.0| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-7B-V1.0\" target=\"_blank\">HF链接\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-Math-13B-V1.0| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-13B-V1.0\" target=\"_blank\">HF链接\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n|Xwin-Math-70B-V1.0| 🤗 \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002FXwin-LM\u002FXwin-Math-70B-V1.0\" target=\"_blank\">HF链接\u003C\u002Fa> |  |  \u003Ca href=\"https:\u002F\u002Fai.meta.com\u002Fresources\u002Fmodels-and-libraries\u002Fllama-downloads\u002F\" target=\"_blank\">Llama 2许可证|\n## 基准测试\n\n### Xwin-LM 在 [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F) 上的性能。\n\n下表展示了 Xwin-LM 在 [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F) 上的表现，该评测在 805 个问题上评估了其相对于 Text-Davinci-003 的胜率。为了进行全面评估，我们首次同时呈现了其与 ChatGPT 和 GPT-4 的胜率。我们的 Xwin-LM 模型系列在所有指标上均创下新的最先进水平。值得注意的是，Xwin-LM-70B-V0.1 首次超越了 GPT-4，对 Text-Davinci-003 的胜率为 **95.57%**，对 GPT-4 的胜率为 **60.61%**。\n\n| **模型**                         | **AlpacaEval（胜率 %）** | **AlpacaEval（胜率 %）**  |**AlpacaEval（胜率 %）** |\n|----------------------------------|------------|----------|-------------|\n|    | **对比 Text-Davinci-003** | **对比 ChatGPT** | **对比 GPT4**|\n| **Xwin-LM-70B-V0.1**                   | **95.57**      | **87.50**          | **60.61**            |\n| GPT-4                          | 95.28  | 84.66     |  50.00      |\n| **Xwin-LM-13B-V0.2**          | **93.22**  | **87.14**  |  **70.36**    |\n| WizardLM-70B-V1.0           | 92.91  | 80.19     |  46.70      |\n| Llama-2-70B-Chat         | 92.66  | 81.97     |  51.19      |\n| **Xwin-LM-13B-V0.1**          | **91.76**  | **81.79**  |  **55.30**    |\n| ChatGPT                    | 89.37  | 50.00     |  16.60      |\n| **Xwin-LM-7B-V0.2**      | **89.31** | **79.60**    |  **59.83**     |\n| WizardLM-13B-V1.2         | 89.17  | 75.75     |  41.91      |\n| **Xwin-LM-7B-V0.1**      | **87.35** | **76.40**    |  **47.57**     |\n| Llama-2-13B-Chat     | 81.09  | 64.22     |  30.92      |\n\n\n### [AlpacaEval](https:\u002F\u002Ftatsu-lab.github.io\u002Falpaca_eval\u002F) 案例研究\n\n|   提示词  |  GPT4 回答   |  Xwin-LM 回答 |\n|----------------|------------|--------|\n|我把一个盘子放在苹果上面，然后把盘子从厨房拿到餐厅。现在苹果在哪里？|苹果现在在餐厅里，因为当你把盘子从厨房搬到餐厅时，苹果就在盘子下面。|苹果仍然在厨房里，因为你只是移动了盘子而已。苹果在盘子下面，所以如果你想把苹果带到餐厅，你应该直接移动苹果，或者先把苹果放在盘子上，再把盘子一起搬到餐厅。|\n|回答以下问题。\u003Cbr>“晚上好”用法语怎么说？ | 法语中，“晚上好”说的是“bonsoir”。 | 法语中，“晚上好”翻译为“bonsoir”。这个问候语用于傍晚和夜间，通常在下午6点以后使用。它由“bon”（意为“好”）和“soir”（意为“晚上”）组成。发音时应念作“bone-swahr”。|\n\n\n### Xwin-LM 在 NLP 基础任务上的性能。\n\n下表提供了 Xwin-LMs 与其他 LLM 在 [Open LLM Leaderboard](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FHuggingFaceH4\u002Fopen_llm_leaderboard) 中 NLP 基础任务上的比较。\n\n| 模型            | MMLU 5-shot | ARC 25-shot | TruthfulQA 0-shot | HellaSwag 10-shot | 平均    |\n|------------------|-------------|-------------|-------------------|-------------------|------------|\n| Text-davinci-003 | 56.9 | **85.2**    | 59.3         | 82.2       | 70.9  |\n|Vicuna-13b 1.1   | 51.3        | 53.0        | 51.8              | 80.1              | 59.1       |\n|Guanaco 30B   | 57.6        | 63.7        | 50.7              | 85.1              | 64.3       |   \n| WizardLM-7B 1.0      | 42.7        | 51.6        | 44.7              | 77.7              | 54.2       |\n| WizardLM-13B 1.0     | 52.3        | 57.2        | 50.5              | 81.0              | 60.2       |\n| WizardLM-30B 1.0    | 58.8    | 62.5 | 52.4       | 83.3          | 64.2|\n| Llama-2-7B-Chat      | 48.3        | 52.9        | 45.6     | 78.6    | 56.4       |\n| Llama-2-13B-Chat      | 54.6        | 59.0        | 44.1     | 81.9    | 59.9       |\n| Llama-2-70B-Chat      | 63.9        | 64.6        | 52.8       | 85.9   | 66.8       |\n| **Xwin-LM-7B-V0.1**      | 49.7        | 56.2        | 48.1     | 79.5    | 58.4       |\n| **Xwin-LM-13B-V0.1**      | 56.6        | 62.4        | 45.5     | 83.0    | 61.9       |\n| **Xwin-LM-70B-V0.1**      | **69.6**        | 70.5        | **60.1**       | **87.1**   | **71.8**       |\n| **Xwin-LM-7B-V0.2**      | 50.0  | 56.4    |  49.5   |  78.9   |     58.7       |\n| **Xwin-LM-13B-V0.2**      | 56.6 |    61.5   |  43.8   | 82.9  |         61.2      |\n\n\n## 推理\n\n### 对话模板\n为获得理想结果，请在使用我们的模型进行推理时严格遵循对话模板。我们的模型采用 [Vicuna](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat) 制定的提示格式，并支持 **多轮** 对话。\n```\n一位好奇的用户与人工智能助手之间的对话。助手会针对用户的问题给出有帮助、详细且礼貌的回答。用户：你好！ 助手：您好。\u003C\u002Fs>用户：你是谁？ 助手：我是 Xwin-LM。\u003C\u002Fs>......\n```\n\n### HuggingFace 示例\n\n```python\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\n\nmodel = AutoModelForCausalLM.from_pretrained(\"Xwin-LM\u002FXwin-LM-7B-V0.1\")\ntokenizer = AutoTokenizer.from_pretrained(\"Xwin-LM\u002FXwin-LM-7B-V0.1\")\n(\n    prompt := \"一位好奇的用户与人工智能助手之间的对话。 \"\n            \"助手会针对用户的问题给出有帮助、详细且礼貌的回答。 \"\n            \"用户：你好，你能帮我吗？ \"\n            \"助手：\"\n)\ninputs = tokenizer(prompt, return_tensors=\"pt\")\nsamples = model.generate(**inputs, max_new_tokens=4096, temperature=0.7)\noutput = tokenizer.decode(samples[0][inputs[\"input_ids\"].shape[1]:], skip_special_tokens=True)\nprint(output) \n# 当然可以！我在这里帮助您。请随时提出您的问题或描述您遇到的问题，我会尽力为您提供帮助。\n```\n\n\n### vLLM 示例\n由于 Xwin-LM 基于 Llama2，它也支持使用 [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm) 进行快速推理。详细的安装说明请参阅 [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm)。\n```python\nfrom vllm import LLM, SamplingParams\n(\n    prompt := \"一位好奇的用户与人工智能助手之间的对话。 \"\n            \"助手会针对用户的问题给出有帮助、详细且礼貌的回答。 \"\n            \"用户：你好，你能帮我吗？ \"\n            \"助手：\"\n)\nsampling_params = SamplingParams(temperature=0.7, max_tokens=4096)\nllm = LLM(model=\"Xwin-LM\u002FXwin-LM-7B-V0.1\")\noutputs = llm.generate([prompt,], sampling_params)\n\nfor output in outputs:\n    prompt = output.prompt\n    generated_text = output.outputs[0].text\n    print(generated_text)\n```\n\n## 待办事项\n\n- [ ] 发布源代码\n- [ ] 发布更多能力，例如数学、推理等。\n\n## 引用\n如果您使用了本仓库中的数据或代码，请考虑引用我们的工作。\n```\n@software{xwin-lm,\n  title = {Xwin-LM},\n  author = {Xwin-LM 团队},\n  url = {https:\u002F\u002Fgithub.com\u002FXwin-LM\u002FXwin-LM},\n  version = {预发布},\n  year = {2023},\n  month = {9},\n}\n```\n\n## 致谢\n\n感谢 [Llama 2](https:\u002F\u002Fai.meta.com\u002Fllama\u002F)、[FastChat](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat)、[AlpacaFarm](https:\u002F\u002Fgithub.com\u002Ftatsu-lab\u002Falpaca_farm) 和 [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm)。","# Xwin-LM 快速上手指南\n\nXwin-LM 是一个专注于大语言模型（LLM）对齐技术的开源项目，涵盖监督微调（SFT）、奖励模型（RM）、拒绝采样及人类反馈强化学习（RLHF）等。其模型基于 Llama 2 构建，曾在 AlpacaEval 基准测试中超越 GPT-4，并在数学和代码领域表现卓越。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux (推荐 Ubuntu 20.04+) 或 macOS。\n*   **Python**: 版本 3.8 或更高。\n*   **GPU**: 推荐使用 NVIDIA GPU。\n    *   7B 模型：至少 16GB 显存（量化后可更低）。\n    *   13B 模型：至少 24GB 显存。\n    *   70B 模型：需要多卡并行或高显存服务器。\n*   **前置依赖**:\n    *   `torch` (PyTorch)\n    *   `transformers`\n    *   `accelerate`\n    *   `bitsandbytes` (可选，用于 4-bit\u002F8-bit 量化加载)\n\n建议创建独立的虚拟环境：\n```bash\npython -m venv xwin-env\nsource xwin-env\u002Fbin\u002Factivate\n```\n\n## 安装步骤\n\n通过 pip 安装必要的推理库。为了获得最佳兼容性，建议先安装 PyTorch（根据你的 CUDA 版本选择），然后安装 Hugging Face 生态工具。\n\n```bash\n# 安装 PyTorch (示例为 CUDA 11.8，请根据实际情况调整)\npip install torch torchvision torchaudio --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu118\n\n# 安装 Transformers, Accelerate 和 BitsAndBytes (用于量化加载)\npip install transformers accelerate bitsandbytes sentencepiece protobuf\n```\n\n> **提示**：国内开发者若遇到下载速度慢的问题，可配置 Hugging Face 镜像源：\n> ```bash\n> export HF_ENDPOINT=https:\u002F\u002Fhf-mirror.com\n> ```\n\n## 基本使用\n\nXwin-LM 采用与 **Vicuna** 相同的对话模板，支持多轮对话。在使用时，必须严格遵循特定的 Prompt 格式以获得最佳效果。\n\n### 1. Python 代码示例 (Hugging Face Transformers)\n\n以下是最简单的单轮\u002F多轮对话加载与推理示例：\n\n```python\nfrom transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig\nimport torch\n\n# 模型名称 (以 7B V0.2 为例，可替换为 13B 或 70B)\nmodel_name = \"Xwin-LM\u002FXwin-LM-7B-V0.2\"\n\n# 加载分词器和模型\n# 使用 device_map=\"auto\" 自动分配 GPU，load_in_4bit=True 可节省显存\ntokenizer = AutoTokenizer.from_pretrained(model_name)\nmodel = AutoModelForCausalLM.from_pretrained(\n    model_name,\n    device_map=\"auto\",\n    torch_dtype=torch.float16,\n    # load_in_4bit=True, # 如果显存不足，取消注释此行并安装 bitsandbytes\n)\n\n# 构建对话历史 (遵循 Vicuna 模板)\nconversation = [\n    {\"role\": \"user\", \"content\": \"Hi! Who are you?\"},\n]\n\n# 应用聊天模板\ninput_text = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)\ninputs = tokenizer(input_text, return_tensors=\"pt\").to(model.device)\n\n# 生成回复\ngeneration_config = GenerationConfig(\n    max_new_tokens=512,\n    temperature=0.7,\n    do_sample=True,\n    pad_token_id=tokenizer.eos_token_id\n)\n\noutputs = model.generate(**inputs, generation_config=generation_config)\nresponse = tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True)\n\nprint(response)\n```\n\n### 2. 对话模板规范\n\n如果您手动构建 Prompt 而不使用 `apply_chat_template`，请务必严格遵守以下格式（注意 `\u003Cs>` 和 `\u003C\u002Fs>` 标记）：\n\n```text\nA chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: Hi! ASSISTANT: Hello.\u003C\u002Fs>USER: Who are you? ASSISTANT: I am Xwin-LM.\u003C\u002Fs>\n```\n\n*   **系统提示语**：固定开头为 \"A chat between a curious user...\"。\n*   **角色标记**：用户输入前加 `USER: `，助手回答前加 `ASSISTANT: `。\n*   **结束标记**：每一轮助手回答结束后必须添加 `\u003C\u002Fs>`。\n*   **多轮对话**：重复 `USER: ... ASSISTANT: ...\u003C\u002Fs>` 结构。\n\n### 3. 可用模型列表\n\n您可以根据需求在 Hugging Face 上加载以下热门模型：\n\n*   **通用对话**: `Xwin-LM\u002FXwin-LM-7B-V0.2`, `Xwin-LM\u002FXwin-LM-13B-V0.2`, `Xwin-LM\u002FXwin-LM-70B-V0.1`\n*   **数学推理**: `Xwin-LM\u002FXwin-Math-7B-V1.1`, `Xwin-LM\u002FXwin-Math-70B-V1.1`\n*   **代码生成**: `Xwin-LM\u002FXwinCoder-7B`, `Xwin-LM\u002FXwinCoder-34B`\n\n只需将上述代码中的 `model_name` 替换为对应的模型路径即可。","某初创教育科技公司正致力于开发一款基于开源模型的智能数学辅导助手，旨在为中学生提供高准确率的解题步骤引导。\n\n### 没有 Xwin-LM 时\n- **数学推理能力不足**：基于原生 LLaMA-2 的模型在处理复杂代数或几何问题时，常出现逻辑断层或计算错误，无法达到商用标准。\n- **对齐效果难以复现**：团队尝试自行进行 RLHF（人类反馈强化学习）训练，但过程极不稳定，多次实验无法复现理想的指令遵循效果。\n- **过度依赖闭源 API**：为保证回答质量，被迫调用 GPT-4 等昂贵接口，导致单次服务成本过高，且面临数据隐私合规风险。\n- **代码生成辅助薄弱**：在需要生成解题代码（如 Python 绘图验证）时，模型生成的代码往往无法运行或逻辑混乱。\n\n### 使用 Xwin-LM 后\n- **数学性能显著提升**：部署 Xwin-Math-70B 版本后，模型在 GSM8K 和 MATH 基准测试中分别取得 90.6% 和 51.9% 的通过率，解题逻辑严密且步骤清晰。\n- **开箱即用的高稳定性**：直接采用经过严格对齐训练的 Xwin-LM 模型，无需重复昂贵的 RLHF 试错过程，确保了生产环境输出的稳定与可控。\n- **实现低成本自主可控**：凭借超越 GPT-4 的 AlpacaEval 胜率，团队完全替换了闭源 API，在大幅降低运营成本的同时，将数据完全保留在本地服务器。\n- **代码与推理双强**：利用 XwinCoder 系列的强大能力，模型不仅能解题，还能生成可执行的正确代码来辅助可视化教学，提升了互动体验。\n\nXwin-LM 通过提供业界领先的开源对齐模型，帮助团队以极低的成本构建了具备 GPT-4 级数学推理能力的自主教育产品。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FXwin-LM_Xwin-LM_fd037fda.png","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FXwin-LM_acb6fbeb.png",null,"https:\u002F\u002Fgithub.com\u002FXwin-LM",[80,84],{"name":81,"color":82,"percentage":83},"Python","#3572A5",95.7,{"name":85,"color":86,"percentage":87},"Shell","#89e051",4.3,1037,44,"2026-03-31T08:21:27","","未说明（基于 LLaMA-2 架构，通常运行 7B\u002F13B\u002F70B 模型需要 NVIDIA GPU，显存需求视具体模型大小而定，70B 模型通常需要多卡或高显存）","未说明",{"notes":95,"python":93,"dependencies":96},"README 中未提供具体的安装指南、依赖列表或系统环境要求。该工具主要提供预训练模型权重（托管于 Hugging Face），用户需自行搭建基于 LLaMA-2 的推理环境（如使用 transformers, vLLM 等）。模型遵循 Llama 2 许可证。支持多轮对话，需严格遵循 Vicuna 格式的对话模板。",[],[15],"2026-03-27T02:49:30.150509","2026-04-12T13:11:51.240509",[101,106,111,116,121,126],{"id":102,"question_zh":103,"answer_zh":104,"source_url":105},30604,"Xwin-math 的扩展训练数据集会开源吗？","由于公司政策，目前的训练数据暂不公开。但您可以通过我们的研究论文详细了解合成数据的构建方法：https:\u002F\u002Farxiv.org\u002Fpdf\u002F2403.04706.pdf","https:\u002F\u002Fgithub.com\u002FXwin-LM\u002FXwin-LM\u002Fissues\u002F22",{"id":107,"question_zh":108,"answer_zh":109,"source_url":110},30605,"Xwin-LM 模型可以使用 FastChat 进行推理或微调吗？","可以。由于 Xwin-LM-V0.1 系列模型是基于 Llama2 预训练模型微调而成的，因此可以直接在 FastChat 仓库中进行推理或微调。请注意，您需要使用 README.md 中提到的完全相同的对话模板（实际上与 Vicuna 相同）。","https:\u002F\u002Fgithub.com\u002FXwin-LM\u002FXwin-LM\u002Fissues\u002F9",{"id":112,"question_zh":113,"answer_zh":114,"source_url":115},30606,"该模型遵循什么许可证？","所有发布的模型均遵循 Llama2 许可证。详细信息请参阅项目 README.md。","https:\u002F\u002Fgithub.com\u002FXwin-LM\u002FXwin-LM\u002Fissues\u002F16",{"id":117,"question_zh":118,"answer_zh":119,"source_url":120},30607,"如何使用 Xwin-LM 模型？","模型权重已在 Hugging Face 上开源。您可以直接根据 GitHub 项目 README.md 中的说明使用模型，请特别关注 README 中的“推理（Inference）”部分。","https:\u002F\u002Fgithub.com\u002FXwin-LM\u002FXwin-LM\u002Fissues\u002F7",{"id":122,"question_zh":123,"answer_zh":124,"source_url":125},30608,"是否提供 INT8\u002FINT4 量化指南或支持 GPTQ？","社区成员 TheBloke 已经提供了转换好的 GPTQ 版本模型，您可以直接使用以下链接：\n- Xwin-LM-7b-V0.1: https:\u002F\u002Fhuggingface.co\u002FTheBloke\u002FXwin-LM-7B-V0.1-GPTQ\n- Xwin-LM-13b-V0.1: https:\u002F\u002Fhuggingface.co\u002FTheBloke\u002FXwin-LM-13B-V0.1-GPTQ\n- Xwin-LM-70b-V0.1: https:\u002F\u002Fhuggingface.co\u002FTheBloke\u002FXwin-LM-70B-V0.1-GPTQ","https:\u002F\u002Fgithub.com\u002FXwin-LM\u002FXwin-LM\u002Fissues\u002F6",{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},30609,"模型会在 OpenCompass 或 Chatbot Arena 等榜单上进行评估吗？","团队计划在后续对更多基准测试进行评估，包括 OpenCompass 和 Chatbot Arena ELO 评级。目前欢迎关注社区的更多评估和反馈。","https:\u002F\u002Fgithub.com\u002FXwin-LM\u002FXwin-LM\u002Fissues\u002F4",[]]