[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-project-baize--baize-chatbot":3,"tool-project-baize--baize-chatbot":64},[4,17,27,35,48,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},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 真正成长为懂上",145895,2,"2026-04-08T11:32:59",[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 将是理想的起点。",85052,"2026-04-08T11:03:08",[26,43,44,45,14,46,15,13,47],"数据工具","视频","插件","其他","音频",{"id":49,"name":50,"github_repo":51,"description_zh":52,"stars":53,"difficulty_score":23,"last_commit_at":54,"category_tags":55,"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",[14,26,13,15,46],{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":23,"last_commit_at":62,"category_tags":63,"status":16},519,"PaddleOCR","PaddlePaddle\u002FPaddleOCR","PaddleOCR 是一款基于百度飞桨框架开发的高性能开源光学字符识别工具包。它的核心能力是将图片、PDF 等文档中的文字提取出来，转换成计算机可读取的结构化数据，让机器真正“看懂”图文内容。\n\n面对海量纸质或电子文档，PaddleOCR 解决了人工录入效率低、数字化成本高的问题。尤其在人工智能领域，它扮演着连接图像与大型语言模型（LLM）的桥梁角色，能将视觉信息直接转化为文本输入，助力智能问答、文档分析等应用场景落地。\n\nPaddleOCR 适合开发者、算法研究人员以及有文档自动化需求的普通用户。其技术优势十分明显：不仅支持全球 100 多种语言的识别，还能在 Windows、Linux、macOS 等多个系统上运行，并灵活适配 CPU、GPU、NPU 等各类硬件。作为一个轻量级且社区活跃的开源项目，PaddleOCR 既能满足快速集成的需求，也能支撑前沿的视觉语言研究，是处理文字识别任务的理想选择。",75149,"2026-04-08T11:09:19",[15,26,13,46],{"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":81,"owner_twitter":80,"owner_website":80,"owner_url":82,"languages":83,"stars":88,"forks":89,"last_commit_at":90,"license":91,"difficulty_score":92,"env_os":93,"env_gpu":94,"env_ram":95,"env_deps":96,"category_tags":106,"github_topics":80,"view_count":10,"oss_zip_url":80,"oss_zip_packed_at":80,"status":16,"created_at":107,"updated_at":108,"faqs":109,"releases":150},5598,"project-baize\u002Fbaize-chatbot","baize-chatbot","Let ChatGPT teach your own chatbot in hours with a single GPU!","Baize 是一个开源的对话模型项目，旨在让开发者在仅拥有一块 GPU 的情况下，也能快速训练出属于自己的智能聊天机器人。它主要解决了高质量对话数据稀缺以及大模型微调门槛高、资源消耗大的痛点。\n\nBaize 的核心创新在于其独特的数据构建方式：通过让 ChatGPT“自己与自己对话”，自动生成了约 10 万条高质量的对话数据，并结合 Alpaca 数据集进行增强。在技术实现上，Baize 基于 LLaMA 架构，采用高效的 LoRA（低秩适应）微调技术，成功发布了 7B、13B 乃至 30B 参数的多个版本，甚至包含专门的医疗领域模型。这种设计大幅降低了显存需求和训练时间，使得在消费级硬件上进行大模型定制成为可能。\n\n该项目非常适合 AI 研究人员、大模型开发者以及希望探索垂直领域对话应用的技术团队使用。无论是需要快速验证想法的研究者，还是希望构建特定场景（如医疗问答）机器人的工程师，都能利用 Baize 提供的代码和数据集轻松上手。此外，Baize 已兼容 FastChat 框架，支持便捷的命令行交互与 API 部署。需要注意的是，目前发布的模型权重和数据仅限学术研究使用，严禁商业用","Baize 是一个开源的对话模型项目，旨在让开发者在仅拥有一块 GPU 的情况下，也能快速训练出属于自己的智能聊天机器人。它主要解决了高质量对话数据稀缺以及大模型微调门槛高、资源消耗大的痛点。\n\nBaize 的核心创新在于其独特的数据构建方式：通过让 ChatGPT“自己与自己对话”，自动生成了约 10 万条高质量的对话数据，并结合 Alpaca 数据集进行增强。在技术实现上，Baize 基于 LLaMA 架构，采用高效的 LoRA（低秩适应）微调技术，成功发布了 7B、13B 乃至 30B 参数的多个版本，甚至包含专门的医疗领域模型。这种设计大幅降低了显存需求和训练时间，使得在消费级硬件上进行大模型定制成为可能。\n\n该项目非常适合 AI 研究人员、大模型开发者以及希望探索垂直领域对话应用的技术团队使用。无论是需要快速验证想法的研究者，还是希望构建特定场景（如医疗问答）机器人的工程师，都能利用 Baize 提供的代码和数据集轻松上手。此外，Baize 已兼容 FastChat 框架，支持便捷的命令行交互与 API 部署。需要注意的是，目前发布的模型权重和数据仅限学术研究使用，严禁商业用途。正如其名源自中国神话中通晓万物、能说人言的神兽“白泽”，Baize 致力于成为用户身边无所不知的智能对话伙伴。","\u003Cp align=\"center\">\n\u003Cimg width=\"500px\" alt=\"Project Baize\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fproject-baize_baize-chatbot_readme_67630f47a2e3.png\">\n\u003C\u002Fp>\n\u003Cp align=\"center\">\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.01196\">[📄 Paper]\u003C\u002Fa> | \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fproject-baize\u002FBaize-7B\">[🤗 Demo]\u003C\u002Fa> | \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot#cli-and-api\">[🔧 CLI & API]\u003C\u002Fa> \u003C\u002Fp>\n\u003Chr>\n\n## News\n- **[May 23, 2023]** We are releasing Baize v2! Check out the [7B](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-v2-7b) and [13B](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-v2-13b) model. Code coming soon!\n- **[Apr. 27, 2023]** [Fastchat](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat) now supports Baize. Try the new [CLI and API](https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot#cli-and-api)!\n- **[Apr. 21, 2023]** We now have a [script](https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot#merge-lora-into-llama) to merge LoRA weights into standard HF model so you can use it everywhere HF is supported!\n\n## What's Baize?\nBaize is an open-source chat model trained with [LoRA](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FLoRA). It uses 100k dialogs generated by letting ChatGPT chat with itself. We also use Alpaca's data to improve its performance. We have released 7B, 13B and 30B models. Please refer to the [paper](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2304.01196.pdf) for more details.\n\n## Why it's called Baize?\nBaize (pronounced as By-zor; Simplified Chinese 白泽, Traditional Chinese 白澤, Japanese 白沢, はくたく) is a mythical creature in Chinese folklore, who speaks human languages and knows everything. This is exactly what we expect from a chat model.\n\n## Overview\n⚠️ The code is released under [GPL-3.0](.\u002FLICENSE). All model weights and data are for **research use ONLY**. Commercial use is **strictly prohibited**. We accept **NO responsibility or liability** for any use of our data, code or weights.\n\nThis is the repo for the Baize project, which aims to build a chat model with LLaMA. This repository contains:\n\n- 54K\u002F57K\u002F47K [dialogs](data) from Quora, StackOverFlow and MedQuAD questions\n- The code for collecting self-chat data: [v1](collect.py), [v2](collect_v2.py)\n- The [code](finetune.py) for training Baize\n- The [code](demo\u002Fapp.py) for chat model demo (forked from [ChuanhuChatGPT](https:\u002F\u002Fgithub.com\u002FGaiZhenbiao\u002FChuanhuChatGPT))\n\n### Model Release\n#### V1\n- [Baize-v1-7B (LoRA weights)](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-lora-7B)\n- [Baize-v1-13B (LoRA weights)](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-lora-13B)\n- [Baize-v1-30B (LoRA weights)](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-lora-30B)\n- [Baize Healthcare-7B (LoRA weights)](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-healthcare-lora-7b)\n\n#### V2\n- [Baize-v2-7B](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-v2-7b)\n- [Baize-v2-13B](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-v2-13b)\n\n### Community Models and Data\n- [Falcon-7B-Instruct](https:\u002F\u002Fhuggingface.co\u002Ftiiuae\u002Ffalcon-7b-instruct) and [Falcon-40B-Instruct](https:\u002F\u002Fhuggingface.co\u002Ftiiuae\u002Ffalcon-40b-instruct) are official Falcon models fine-tuned with Baize data. Falcon is the current state-of-the-art open-source model developed by [TII](https:\u002F\u002Fwww.tii.ae\u002F).\n- [Fauno](https:\u002F\u002Fgithub.com\u002FRSTLess-research\u002FFauno-Italian-LLM\u002F) is an Italian version of Baize.\n- [Dutch Data](https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F34): Baize data translated into Dutch.\n\n## CLI and API\nNow you can use Baize with [Fastchat](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat) for the CLI and API provided by Fastchat!\n\nFirst, install the latest version of Fastchat:\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fpeft.git\npip install git+https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat.git\n```\n\n(For v1 models only): Merge Baize's LoRA weights into LLaMA. Take 7B checkpoint as an example.\n```bash\n# Note you have to include \"baize\" in the target directory so Fastchat can recognize Baize.\npython3 -m fastchat.model.apply_lora --base huggyllama\u002Fllama-7b --target .\u002Fmodel_weights\u002Fbaize-7b --lora project-baize\u002Fbaize-lora-7B\n```\n\nNow, run the CLI in your terminal! More options and configs can be found [here](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat#inference-with-command-line-interface).\n```bash\n# Optional: Add `--style rich` for better style.\npython -m fastchat.serve.cli --model-path .\u002Fmodel_weights\u002Fbaize-7b\n```\n\nYou can use Baize with OpenAI API or Hugging Face API following the instruction [here](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat#api).\n\n## Demo\n[![Open in Spaces](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fbadges\u002Fraw\u002Fmain\u002Fopen-in-hf-spaces-md.svg)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fproject-baize\u002FBaize-7B) \n[![Duplicate this Space](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fbadges\u002Fraw\u002Fmain\u002Fduplicate-this-space-md.svg)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fproject-baize\u002FBaize-7B?duplicate=true)\n\n\u003Cp align=\"center\">\n  \u003Cimg alt=\"Demo\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fproject-baize_baize-chatbot_readme_9ba38125cfc9.gif\">\n\u003C\u002Fp>\n\nYou can either host it on your local machine or access the [online demo](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fproject-baize\u002FBaize-7B). The demo fetches the [LLaMA](https:\u002F\u002Fhuggingface.co\u002Fhuggyllama\u002Fllama-7b) model and the [LoRA weights](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-lora-7B) from the Hugging Face model hub, then runs a user-friendly Gradio interface for chatting.\n\n### How to Run Locally\n\nFirst, make sure your Python version is 3.8, and then install the required packages using the command below:\n\n```bash\ncd demo\npip install -r requirements.txt\n```\n\nYou can host the model on your local machine using the following command:\n\n```bash\n# We assume you have obtained access to use LLaMA. The following LLaMA weights are from a 3rd party.\nbase_model=huggyllama\u002Fllama-7b\nlora_model=project-baize\u002Fbaize-lora-7B\npython app.py $base_model $lora_model\n```\nFor v2 models (already merged), simply run:\n```bash\n# We assume you have obtained access to use LLaMA.\nbase_model=project-baize\u002Fbaize-v2-7b\npython app.py $base_model None\n```\n#### GPU VRAM Requirements\n|           | Inference (without int8) |\n|-----------|--------------------------|\n| Baize-7B  | 16GB                     |\n| Baize-13B | 28GB                     |\n| Baize-30B | 67GB                     |\n\nIf you have a GPU with smaller VRAM, you can do inference with `int8`, by passing the 8bit argument:\n\n```bash\npython app.py $base_model $lora_model 8bit\n```\n\n## How to Reproduce\n\n### Setup\n\n1. Install dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n2. If `bitsandbytes` doesn't work, [install it from source](https:\u002F\u002Fgithub.com\u002FTimDettmers\u002Fbitsandbytes\u002Fblob\u002Fmain\u002Fcompile_from_source.md). Windows users can follow [these instructions](https:\u002F\u002Fgithub.com\u002Ftloen\u002Falpaca-lora\u002Fissues\u002F17).\n\n### Data Collecting\n\nYou can use our [released data](data) or collect the data from ChatGPT using the following command:\n\n```bash\nnum_process=10 # The number of processes to collect data\nmax_total_tokens=500000 # Set maximum numbers of tokens to collect data\napi_key=xxxxxxxxxxxxxxxxx # Set your openai api key\nfor ((i=0; i\u003C$num_process; i++))\ndo\n    python collect.py $api_key $max_total_tokens $i $num_process stackoverflow &\n    python collect.py $api_key $max_total_tokens $i $num_process quora &\n    python collect.py $api_key $max_total_tokens $i $num_process medical &\ndone\n```\n\nAfter collecting data, you use the following command to preprocess data:\n\n```bash\npython preprocess.py stackoverflow\npython preprocess.py quora\npython preprocess.py medical\n```\n\n### Use your own data\n\nIf there's a specific dataset you want to use as seeds for ChatGPT self-chatting, you can simply modify `collect.py` to load your own data. \n\n### Training\n\nThe fine-tuning code is designed to run on an A100-80G GPU. The `finetune.py` script accepts three parameters: foundation model size (i.e., 7B, 13B, or 30B), batch size, learning rate and datasets. Note the total batch size is fixed to 64 (can be modified [here](https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize\u002Fblob\u002Fcbcf39902fcdfab8d935b7ea771a4e7d452a1be0\u002Ffinetune.py#L24)) and the batch size here is the per device batch size before gradient accumulation. Set it to a smaller value if you are training on a GPU with smaller VRAM.\n\n```bash\n# For the 7B model (takes about 9 hours)\npython finetune.py 7b 32 0.0002 alpaca,stackoverflow,quora\n\n# For the 13B model (takes about 16 hours)\npython finetune.py 13b 16 0.0001 alpaca,stackoverflow,quora\n\n# For the 30B model (takes about 36 hours)\npython finetune.py 30b 8 0.00005 alpaca,stackoverflow,quora\n```\n#### GPU VRAM Consumption\nWith the settings **above**:\n\n|           | Training (with int8) |\n|-----------|----------------------|\n| Baize-7B  | 26GB                 |\n| Baize-13B | 25GB                 |\n| Baize-30B | 42GB                 |\n\nGot a question? See [this issue](https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F26).\n\n### Merge LoRA into LLaMA\nNow you can easily merge the trained LoRA weights into a LLaMA model so you can use it with everything that supports standard Hugging Face API!\n\nHere's an example for merging `baize-lora-7B` into LLaMA-7B.\n```bash\npython merge_lora.py \\\n--base huggyllama\u002Fllama-7b \\\n--target ~\u002Fmodel_weights\u002Fbaize-7b \\\n--lora project-baize\u002Fbaize-lora-7B\n```\n\n## Citation\n```bibtex\n@article{xu2023baize,\n  title={Baize: An Open-Source Chat Model with Parameter-Efficient Tuning on Self-Chat Data},\n  author={Xu, Canwen and Guo, Daya and Duan, Nan and McAuley, Julian},\n  journal={arXiv preprint arXiv:2304.01196},\n  year={2023}\n}\n```\n\u003Chr>\n\n[![Share to Community](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fbadges\u002Fraw\u002Fmain\u002Fpowered-by-huggingface-light.svg)](https:\u002F\u002Fhuggingface.co)\n","\u003Cp align=\"center\">\n\u003Cimg width=\"500px\" alt=\"Project Baize\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fproject-baize_baize-chatbot_readme_67630f47a2e3.png\">\n\u003C\u002Fp>\n\u003Cp align=\"center\">\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2304.01196\">[📄 论文]\u003C\u002Fa> | \u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fproject-baize\u002FBaize-7B\">[🤗 演示]\u003C\u002Fa> | \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot#cli-and-api\">[🔧 CLI & API]\u003C\u002Fa> \u003C\u002Fp>\n\u003Chr>\n\n## 新闻\n- **[2023年5月23日]** 我们发布了Baize v2！请查看 [7B](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-v2-7b) 和 [13B](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-v2-13b) 模型。代码即将发布！\n- **[2023年4月27日]** [Fastchat](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat) 现在支持Baize。快来试试新的 [CLI和API](https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot#cli-and-api) 吧！\n- **[2023年4月21日]** 我们现在提供了一个 [脚本](https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot#merge-lora-into-llama)，可以将LoRA权重合并到标准的HF模型中，这样你就可以在所有支持HF的地方使用它了！\n\n## Baize是什么？\nBaize是一个开源聊天模型，使用 [LoRA](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FLoRA) 进行训练。它使用了由ChatGPT与自身对话生成的10万条对话数据。我们还利用Alpaca的数据来提升其性能。目前我们已经发布了7B、13B和30B版本的模型。更多详细信息请参阅 [论文](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2304.01196.pdf)。\n\n## 为什么叫Baize？\nBaize（发音为By-zor；简体中文：白泽，繁体中文：白澤，日语：白沢，はくたく）是中国民间传说中的神兽，能说人话并通晓万物。这正是我们对一个聊天模型的期望。\n\n## 概述\n⚠️ 代码以 [GPL-3.0](.\u002FLICENSE) 协议发布。所有模型权重和数据仅用于 **科研用途**。商业用途 **严格禁止**。对于任何使用我们的数据、代码或权重的行为，我们 **不承担任何责任或义务**。\n\n这是Baize项目的仓库，旨在基于LLaMA构建一个聊天模型。该仓库包含：\n\n- 来自Quora、StackOverflow和MedQuAD问题的54K\u002F57K\u002F47K条 [对话](data)\n- 用于收集自我对话数据的代码：[v1](collect.py)、[v2](collect_v2.py)\n- 用于训练Baize的 [代码](finetune.py)\n- 用于聊天模型演示的 [代码](demo\u002Fapp.py)（基于 [ChuanhuChatGPT](https:\u002F\u002Fgithub.com\u002FGaiZhenbiao\u002FChuanhuChatGPT) 分支）\n\n### 模型发布\n#### V1\n- [Baize-v1-7B (LoRA权重)](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-lora-7B)\n- [Baize-v1-13B (LoRA权重)](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-lora-13B)\n- [Baize-v1-30B (LoRA权重)](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-lora-30B)\n- [Baize Healthcare-7B (LoRA权重)](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-healthcare-lora-7b)\n\n#### V2\n- [Baize-v2-7B](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-v2-7b)\n- [Baize-v2-13B](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-v2-13b)\n\n### 社区模型和数据\n- [Falcon-7B-Instruct](https:\u002F\u002Fhuggingface.co\u002Ftiiuae\u002Ffalcon-7b-instruct) 和 [Falcon-40B-Instruct](https:\u002F\u002Fhuggingface.co\u002Ftiiuae\u002Ffalcon-40b-instruct) 是官方的Falcon模型，使用Baize的数据进行了微调。Falcon是由[TII](https:\u002F\u002Fwww.tii.ae\u002F)开发的当前最先进的开源模型。\n- [Fauno](https:\u002F\u002Fgithub.com\u002FRSTLess-research\u002FFauno-Italian-LLM\u002F) 是Baize的意大利版本。\n- [荷兰语数据](https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F34)：Baize数据被翻译成荷兰语。\n\n## CLI和API\n现在你可以通过 [Fastchat](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat) 使用Baize，利用Fastchat提供的CLI和API功能！\n\n首先，安装最新版本的Fastchat：\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fpeft.git\npip install git+https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat.git\n```\n\n（仅适用于v1模型）：将Baize的LoRA权重合并到LLaMA中。以7B检查点为例。\n```bash\n# 注意，目标目录中必须包含“baize”，这样Fastchat才能识别Baize。\npython3 -m fastchat.model.apply_lora --base huggyllama\u002Fllama-7b --target .\u002Fmodel_weights\u002Fbaize-7b --lora project-baize\u002Fbaize-lora-7B\n```\n\n现在，你可以在终端中运行CLI！更多选项和配置可以参考 [这里](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat#inference-with-command-line-interface)。\n```bash\n# 可选：添加`--style rich`以获得更好的显示效果。\npython -m fastchat.serve.cli --model-path .\u002Fmodel_weights\u002Fbaize-7b\n```\n\n你也可以按照 [这里的说明](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat#api) 使用OpenAI API或Hugging Face API来调用Baize。\n\n## 演示\n[![在Spaces中打开](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fbadges\u002Fraw\u002Fmain\u002Fopen-in-hf-spaces-md.svg)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fproject-baize\u002FBaize-7B) \n[![复制此Space](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fbadges\u002Fraw\u002Fmain\u002Fduplicate-this-space-md.svg)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fproject-baize\u002FBaize-7B?duplicate=true)\n\n\u003Cp align=\"center\">\n  \u003Cimg alt=\"演示\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fproject-baize_baize-chatbot_readme_9ba38125cfc9.gif\">\n\u003C\u002Fp>\n\n你可以选择在本地主机上运行，或者访问 [在线演示](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fproject-baize\u002FBaize-7B)。演示会从Hugging Face模型库中获取 [LLaMA](https:\u002F\u002Fhuggingface.co\u002Fhuggyllama\u002Fllama-7b) 模型和 [LoRA权重](https:\u002F\u002Fhuggingface.co\u002Fproject-baize\u002Fbaize-lora-7B)，然后运行一个用户友好的Gradio界面来进行聊天。\n\n### 如何在本地运行\n\n首先，请确保你的Python版本是3.8，然后使用以下命令安装所需的软件包：\n\n```bash\ncd demo\npip install -r requirements.txt\n```\n\n你可以使用以下命令在本地主机上运行模型：\n\n```bash\n# 假设你已经获得了使用LLaMA的权限。以下LLaMA权重来自第三方。\nbase_model=huggyllama\u002Fllama-7b\nlora_model=project-baize\u002Fbaize-lora-7B\npython app.py $base_model $lora_model\n```\n对于v2模型（已合并），只需运行：\n```bash\n# 假设你已经获得了使用LLaMA的权限。\nbase_model=project-baize\u002Fbaize-v2-7b\npython app.py $base_model None\n```\n#### GPU显存需求\n|           | 推理（不使用int8） |\n|-----------|--------------------------|\n| Baize-7B  | 16GB                     |\n| Baize-13B | 28GB                     |\n| Baize-30B | 67GB                     |\n\n如果你的GPU显存较小，可以通过传递8bit参数来进行推理：\n\n```bash\npython app.py $base_model $lora_model 8bit\n```\n\n## 如何复现\n\n### 准备工作\n\n1. 安装依赖项\n\n```bash\npip install -r requirements.txt\n```\n\n2. 如果`bitsandbytes`无法正常工作，可以 [从源码安装](https:\u002F\u002Fgithub.com\u002FTimDettmers\u002Fbitsandbytes\u002Fblob\u002Fmain\u002Fcompile_from_source.md)。Windows用户可以参考 [这些说明](https:\u002F\u002Fgithub.com\u002Ftloen\u002Falpaca-lora\u002Fissues\u002F17)。\n\n### 数据收集\n\n您可以使用我们提供的[已发布数据](data)，也可以通过以下命令从 ChatGPT 收集数据：\n\n```bash\nnum_process=10 # 用于收集数据的进程数\nmax_total_tokens=500000 # 设置要收集的最大 token 数量\napi_key=xxxxxxxxxxxxxxxxx # 设置您的 OpenAI API 密钥\nfor ((i=0; i\u003C$num_process; i++))\ndo\n    python collect.py $api_key $max_total_tokens $i $num_process stackoverflow &\n    python collect.py $api_key $max_total_tokens $i $num_process quora &\n    python collect.py $api_key $max_total_tokens $i $num_process medical &\ndone\n```\n\n数据收集完成后，您可以使用以下命令对数据进行预处理：\n\n```bash\npython preprocess.py stackoverflow\npython preprocess.py quora\npython preprocess.py medical\n```\n\n### 使用您自己的数据\n\n如果您希望使用特定的数据集作为 ChatGPT 自我对话的种子数据，只需修改 `collect.py` 脚本以加载您自己的数据即可。\n\n### 训练\n\n微调代码设计为在 A100-80G GPU 上运行。`finetune.py` 脚本接受三个参数：基础模型大小（即 7B、13B 或 30B）、批量大小、学习率以及数据集。请注意，总批量大小固定为 64（可在[此处](https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize\u002Fblob\u002Fcbcf39902fcdfab8d935b7ea771a4e7d452a1be0\u002Ffinetune.py#L24)修改），而这里的批量大小是指梯度累积之前的每台设备的批量大小。如果您使用的 GPU 显存较小，请将其设置为较小的值。\n\n```bash\n# 对于 7B 模型（大约需要 9 小时）\npython finetune.py 7b 32 0.0002 alpaca,stackoverflow,quora\n\n# 对于 13B 模型（大约需要 16 小时）\npython finetune.py 13b 16 0.0001 alpaca,stackoverflow,quora\n\n# 对于 30B 模型（大约需要 36 小时）\npython finetune.py 30b 8 0.00005 alpaca,stackoverflow,quora\n```\n\n#### GPU 显存消耗\n按照**上述**设置：\n\n|           | 训练（使用 int8） |\n|-----------|----------------------|\n| Baize-7B  | 26GB                 |\n| Baize-13B | 25GB                 |\n| Baize-30B | 42GB                 |\n\n有问题吗？请参阅[此问题](https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F26)。\n\n### 将 LoRA 合并到 LLaMA 中\n现在您可以轻松地将训练好的 LoRA 权重合并到 LLaMA 模型中，以便与所有支持标准 Hugging Face API 的工具一起使用！\n\n以下是将 `baize-lora-7B` 合并到 LLaMA-7B 的示例：\n```bash\npython merge_lora.py \\\n--base huggyllama\u002Fllama-7b \\\n--target ~\u002Fmodel_weights\u002Fbaize-7b \\\n--lora project-baize\u002Fbaize-lora-7B\n```\n\n## 引用\n```bibtex\n@article{xu2023baize,\n  title={Baize: An Open-Source Chat Model with Parameter-Efficient Tuning on Self-Chat Data},\n  author={Xu, Canwen and Guo, Daya and Duan, Nan and McAuley, Julian},\n  journal={arXiv preprint arXiv:2304.01196},\n  year={2023}\n}\n```\n\u003Chr>\n\n[![分享到社区](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fhuggingface\u002Fbadges\u002Fraw\u002Fmain\u002Fpowered-by-huggingface-light.svg)](https:\u002F\u002Fhuggingface.co)","# Baize Chatbot 快速上手指南\n\nBaize 是一个基于 LLaMA 架构、使用 LoRA 技术微调的开源聊天模型。它利用 ChatGPT 自对话生成的数据及 Alpaca 数据进行训练，支持 7B、13B 和 30B 等多种规格。\n\n> **⚠️ 重要提示**：本项目代码遵循 GPL-3.0 协议，所有模型权重和数据**仅限学术研究使用**，严禁商业用途。使用前请确保您已获得 LLaMA 基础模型的访问权限。\n\n## 1. 环境准备\n\n### 系统要求\n- **操作系统**: Linux (推荐) 或 macOS\n- **Python 版本**: 3.8+\n- **GPU 显存要求**:\n  - **推理 (Inference)**: Baize-7B 需 16GB，Baize-13B 需 28GB，Baize-30B 需 67GB。\n    - *注：显存不足可使用 `int8` 量化模式降低需求。*\n  - **训练 (Training)**: 推荐使用 A100-80G GPU。若使用 int8 量化训练，7B\u002F13B\u002F30B 分别约需 26GB\u002F25GB\u002F42GB 显存。\n\n### 前置依赖\n确保已安装 CUDA 驱动（如需 GPU 加速），并准备好 Hugging Face 账号以访问模型权重。\n\n## 2. 安装步骤\n\n### 方案 A：通过 FastChat 使用 CLI 和 API（推荐）\n这是最便捷的使用方式，支持命令行交互和 API 调用。\n\n1. **安装依赖库**\n   ```bash\n   pip install git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fpeft.git\n   pip install git+https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat.git\n   ```\n   > **国内加速建议**：如果下载缓慢，可配置 pip 使用清华或阿里镜像源：\n   > `pip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple ...`\n\n2. **合并 LoRA 权重（仅针对 V1 模型）**\n   如果您使用的是 V1 版本的 LoRA 权重，需先将其合并到 LLaMA 基础模型中。V2 模型已合并，可跳过此步。\n   ```bash\n   # 注意：目标目录名称必须包含 \"baize\" 以便 FastChat 识别\n   python3 -m fastchat.model.apply_lora --base huggyllama\u002Fllama-7b --target .\u002Fmodel_weights\u002Fbaize-7b --lora project-baize\u002Fbaize-lora-7B\n   ```\n\n### 方案 B：本地部署 Gradio Demo\n如果您希望运行网页版聊天界面。\n\n1. **进入演示目录并安装依赖**\n   ```bash\n   cd demo\n   pip install -r requirements.txt\n   ```\n   *若 `bitsandbytes` 安装失败，请参考其官方文档从源码编译，或查看项目 Issue 中的 Windows 适配方案。*\n\n## 3. 基本使用\n\n### 方式一：命令行交互 (CLI)\n使用 FastChat 启动终端聊天界面。\n\n```bash\n# 启动 CLI，添加 --style rich 可获得更好的显示效果\npython -m fastchat.serve.cli --model-path .\u002Fmodel_weights\u002Fbaize-7b\n```\n*对于 V2 模型，请将 `--model-path` 指向 `project-baize\u002Fbaize-v2-7b`。*\n\n### 方式二：运行本地 Web Demo\n启动本地 Gradio 界面进行对话。\n\n**针对 V1 模型 (LoRA 未合并):**\n```bash\nbase_model=huggyllama\u002Fllama-7b\nlora_model=project-baize\u002Fbaize-lora-7B\npython app.py $base_model $lora_model\n```\n\n**针对 V2 模型 (已合并):**\n```bash\nbase_model=project-baize\u002Fbaize-v2-7b\npython app.py $base_model None\n```\n\n**显存优化选项**:\n如果您的 GPU 显存较小，可在命令末尾添加 `8bit` 参数启用量化推理：\n```bash\npython app.py $base_model $lora_model 8bit\n```\n\n启动成功后，终端会显示本地访问地址（通常为 `http:\u002F\u002Flocalhost:7860`），在浏览器打开即可开始对话。","某初创医疗科技公司希望快速构建一个面向患者的智能预问诊助手，以缓解人工客服压力并收集初步病史信息。\n\n### 没有 baize-chatbot 时\n- **数据获取成本极高**：团队难以收集到数万条高质量的医患对话数据用于训练，手动标注或爬取不仅耗时且存在隐私合规风险。\n- **算力门槛难以跨越**：从头训练或全量微调一个大语言模型通常需要多张高端 GPU 甚至集群资源，远超初创公司的硬件预算。\n- **开发周期漫长**：从数据清洗、模型选型到反复调优，整个流程往往需要数周甚至数月，无法快速响应业务上线需求。\n- **领域适应性差**：通用模型缺乏医疗语境理解，容易给出不专业甚至错误的建议，直接部署存在巨大的安全隐患。\n\n### 使用 baize-chatbot 后\n- **利用现成高质量语料**：直接复用 baize-chatbot 基于 ChatGPT 自对话生成的 10 万条对话数据及 MedQuAD 医疗数据集，瞬间解决了领域数据匮乏难题。\n- **单卡即可高效训练**：借助其集成的 LoRA 微调技术，仅需一张消费级 GPU 就能在几小时内完成 7B 或 13B 模型的定制化训练，大幅降低硬件投入。\n- **快速落地专属模型**：通过简单的脚本即可将训练好的权重合并为标准格式，配合 FastChat 迅速部署出具备医疗常识的 CLI 或 API 服务，将研发周期压缩至天级。\n- **专业度显著提升**：模型继承了白泽（Baize）“通晓万物”的特性，在医疗垂直场景下的回答逻辑更严密、语气更拟人，有效提升了患者信任度。\n\nbaize-chatbot 让资源有限的团队也能在极低成本下，拥有具备行业深度知识的专属大模型，真正实现了大模型应用的“平民化”。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fproject-baize_baize-chatbot_218d55f0.png","project-baize","Project Baize","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fproject-baize_12813045.png","",null,"project-baize@proton.me","https:\u002F\u002Fgithub.com\u002Fproject-baize",[84],{"name":85,"color":86,"percentage":87},"Python","#3572A5",100,3163,284,"2026-04-02T11:15:50","GPL-3.0",4,"Linux, macOS, Windows","必需 NVIDIA GPU。推理需求：Baize-7B 需 16GB，Baize-13B 需 28GB，Baize-30B 需 67GB（非 int8 模式）；若使用 int8 量化可降低显存需求。训练需求（int8 模式）：Baize-7B 需 26GB，Baize-13B 需 25GB，Baize-30B 需 42GB。官方推荐训练环境为 A100-80G。","未说明",{"notes":97,"python":98,"dependencies":99},"1. 代码基于 GPL-3.0 协议，模型权重和数据仅限研究用途，严禁商用。2. 使用前需自行获取 LLaMA 基础模型权重（因版权限制未直接提供）。3. Windows 用户若遇到 bitsandbytes 问题需参考特定教程安装。4. V1 版本模型需先将 LoRA 权重合并到 LLaMA 中才能使用，V2 版本已合并可直接使用。5. 依赖库主要通过 pip 安装 git 仓库版本，未指定具体版本号。","3.8",[100,101,102,103,104,105],"peft","fastchat","gradio","bitsandbytes","transformers","torch",[15],"2026-03-27T02:49:30.150509","2026-04-09T01:03:00.046855",[110,115,120,125,130,135,140,145],{"id":111,"question_zh":112,"answer_zh":113,"source_url":114},25397,"为什么本地运行的模型效果与在线演示不一致？","这通常是因为生成参数设置不同导致的随机性差异。请尝试将 Temperature 设置为 0.1，Top_p 设置为 1.0。在线演示的代码与本地位演示代码完全一致，调整参数后本地结果应与在线结果相同。","https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F28",{"id":116,"question_zh":117,"answer_zh":118,"source_url":119},25398,"为什么 13B 模型的显存占用（25GB）比 7B 模型（26GB）还低？这是数据错误吗？","这不是错误。报告中显示的显存占用是基于默认设置计算的。对于 13B 模型，默认使用的 batch size 是 7B 模型的一半，因此总显存消耗反而略低。如果您想在显存较小的设备（如 24GB 的 RTX 4090）上运行，可以通过减小 `finetune.py` 中的 `$BATCH_SIZE` 参数来适配。","https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F26",{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},25399,"运行 app.py 时出现 'IndexError: list index out of range' 或参数缺失错误怎么办？","这是因为启动脚本需要显式传入基础模型和 LoRA 模型的路径作为参数。在运行前必须先定义变量，例如：\nbase_model=decapoda-research\u002Fllama-7b-hf\nlora_model=project-baize\u002Fbaize-lora-7B\n然后执行：python app.py $base_model $lora_model","https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F13",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},25400,"安装依赖时遇到 'SentencePiece' 编译错误（如 cmake 或 pkg-config 找不到）如何解决？","这是一个环境配置问题。`sentencepiece` 库需要编译安装，您的环境中缺少必要的构建工具。请安装 cmake 和 pkg-config。如果使用 Conda，可以运行：conda install -c anaconda cmake。在 Ubuntu\u002FWSL 环境下，可能需要运行 sudo apt-get install cmake pkg-config。","https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F8",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},25401,"使用多显卡微调时报错 'module must have its parameters... on device cuda:0 but found... on cuda:1' 怎么办？","当前的微调代码默认针对单卡设计。如果要在特定单卡上运行以避免设备冲突，请指定可见设备：export CUDA_VISIBLE_DEVICES=0。目前官方未提供多卡数据并行流水线代码，如需使用多卡训练，需要用户自行实现数据并行逻辑。","https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F7",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},25402,"模型生成时出现重复回答或无限循环的情况如何处理？","这偶尔会发生，通常是生成过程中的一个小故障。解决方法是手动停止生成，并开启一个新的对话会话（start a new conversation），通常即可恢复正常。","https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F5",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},25403,"如何批量生成（Batch Generation）？为什么默认的 greedy_search 不支持批量输入？","默认的 demo 为了用户体验（避免等待所有推理完成）未启用批量生成。如果需要批量生成，可以参考 alpaca-lora 项目中的实现代码（github.com\u002Ftloen\u002Falpaca-lora\u002Fblob\u002Fmain\u002Fgenerate.py）。注意在使用 padding 时，过多的填充 token 可能会导致生成结果异常，建议检查 padding 策略。","https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F12",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},25404,"是否有社区贡献的其他语言数据集或相关资源？","有的。社区成员已经翻译并发布了荷兰语版本的 Quora、Stack Overflow 和 Alpaca 数据集，并转换为了 Baize 格式。这些资源托管在 Hugging Face Hub 上，可以在项目的 README 中找到专门的社区贡献章节获取链接。","https:\u002F\u002Fgithub.com\u002Fproject-baize\u002Fbaize-chatbot\u002Fissues\u002F34",[151],{"id":152,"version":153,"summary_zh":80,"released_at":154},162700,"baize-v2","2023-05-23T19:27:35"]