[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-epfLLM--meditron":3,"tool-epfLLM--meditron":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 真正成长为懂上",153609,2,"2026-04-13T11:34: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 将是理想的起点。",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":71,"readme_en":72,"readme_zh":73,"quickstart_zh":74,"use_case_zh":75,"hero_image_url":76,"owner_login":77,"owner_name":78,"owner_avatar_url":79,"owner_bio":80,"owner_company":81,"owner_location":81,"owner_email":81,"owner_twitter":81,"owner_website":82,"owner_url":83,"languages":84,"stars":97,"forks":98,"last_commit_at":99,"license":100,"difficulty_score":101,"env_os":102,"env_gpu":103,"env_ram":104,"env_deps":105,"category_tags":114,"github_topics":81,"view_count":10,"oss_zip_url":81,"oss_zip_packed_at":81,"status":16,"created_at":115,"updated_at":116,"faqs":117,"releases":146},7127,"epfLLM\u002Fmeditron","meditron","Meditron is a suite of open-source medical Large Language Models (LLMs).","Meditron 是一套专为医疗领域打造的开源大语言模型系列，旨在让 AI 更懂医学知识。它基于强大的 Llama-2 架构，通过在包含精选 PubMed 论文摘要、国际权威临床指南及通用语料的庞大医疗数据集上进行持续预训练，显著提升了在医疗推理任务上的表现。实验显示，其 70B 版本在多项专业测试中超越了 Llama-2-70B、GPT-3.5 等主流模型。\n\nMeditron 主要解决了通用大模型在垂直医疗领域专业知识匮乏、推理能力不足的问题，为构建高质量的医疗 AI 应用提供了坚实的基座。其独特的技术亮点在于构建了名为\"GAP-Replay\"的专用训练语料库，巧妙融合了临床指南、论文摘要、全文文献及通用数据，实现了领域知识的深度注入。\n\n这款工具非常适合 AI 研究人员、医疗科技开发者以及需要处理医学文本分析的专业团队使用，可作为开发智能问诊辅助、文献检索系统或医学教育工具的底层引擎。不过需要特别注意的是，Meditron 目前仍处于研究阶段，尚未针对真实医疗场景的安全性和可操作性进行充分对齐验证。官方强烈建议不要将其直接用于临床诊断或患者服务，必须在经过严格的场景适配测试甚至随","Meditron 是一套专为医疗领域打造的开源大语言模型系列，旨在让 AI 更懂医学知识。它基于强大的 Llama-2 架构，通过在包含精选 PubMed 论文摘要、国际权威临床指南及通用语料的庞大医疗数据集上进行持续预训练，显著提升了在医疗推理任务上的表现。实验显示，其 70B 版本在多项专业测试中超越了 Llama-2-70B、GPT-3.5 等主流模型。\n\nMeditron 主要解决了通用大模型在垂直医疗领域专业知识匮乏、推理能力不足的问题，为构建高质量的医疗 AI 应用提供了坚实的基座。其独特的技术亮点在于构建了名为\"GAP-Replay\"的专用训练语料库，巧妙融合了临床指南、论文摘要、全文文献及通用数据，实现了领域知识的深度注入。\n\n这款工具非常适合 AI 研究人员、医疗科技开发者以及需要处理医学文本分析的专业团队使用，可作为开发智能问诊辅助、文献检索系统或医学教育工具的底层引擎。不过需要特别注意的是，Meditron 目前仍处于研究阶段，尚未针对真实医疗场景的安全性和可操作性进行充分对齐验证。官方强烈建议不要将其直接用于临床诊断或患者服务，必须在经过严格的场景适配测试甚至随机对照试验后，方可考虑实际部署。","\u003Cimg width=40% src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FepfLLM_meditron_readme_1f46d602ce37.png\" alt=\"MediTron logo\" title=\"Meditron-logo\">\n\nMeditron is a suite of open-source medical Large Language Models (LLMs).\n\nWe release Meditron-7B and Meditron-70B, which are adapted to the medical domain from Llama-2 through continued pretraining on a comprehensively curated medical corpus, including selected PubMed papers and abstracts, a new dataset of internationally-recognized medical guidelines, and a general domain corpus.\n\nMeditron-70B, finetuned on relevant data, outperforms Llama-2-70B, GPT-3.5 and Flan-PaLM on multiple medical reasoning tasks.\n\n\u003Cdetails open>\n  \u003Csummary>\u003Cstrong>Advisory Notice\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n  \u003Cblockquote style=\"background-color: #f2f2f2; padding: 10px; margin: 0 0 10px; border-left: 5px solid #ddd;\">\n    While Meditron is designed to encode medical knowledge from sources of high-quality evidence, it is not yet adapted to deliver this knowledge appropriately, safely, or within professional actionable constraints. We recommend against using Meditron in medical applications without extensive use-case alignment, as well as additional testing, specifically including randomized controlled trials in real-world practice settings.\n  \u003C\u002Fblockquote>\n\u003C\u002Fdetails>\n\n## Model Details\n\n- **Developed by:** [EPFL LLM Team](https:\u002F\u002Fhuggingface.co\u002Fepfl-llm)\n- **Model type:** Causal decoder-only transformer language model\n- **Language(s):** English (mainly)\n- **Model License:** [LLAMA 2 COMMUNITY LICENSE AGREEMENT](https:\u002F\u002Fai.meta.com\u002Fllama\u002Flicense\u002F)\n- **Code License:** [APACHE 2.0 LICENSE](LICENSE)\n- **Continue-pretrained from model:** [Llama-2-70B](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-2-70b)\n- **Context length:**  4k tokens\n- **Input:**  Text only data\n- **Output:**  Model generates text only\n- **Status:** This is a static model trained on an offline dataset. Future versions of the tuned models will be released as we enhance model's performance.\n- **Knowledge Cutoff:** August 2023\n- **Trainer:** [epflLLM\u002FMegatron-LLM](https:\u002F\u002Fgithub.com\u002FepfLLM\u002FMegatron-LLM)\n- **Paper:** *[Meditron-70B: Scaling Medical Pretraining for Large Language Models](https:\u002F\u002Farxiv.org\u002Fabs\u002F2311.16079)*\n\n## How to use\n\nYou can load the Meditron model directly from the [HuggingFace model hub](https:\u002F\u002Fhuggingface.co\u002Fepfl-llm\u002Fmeditron-70B) as follows:\n\n```python\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\n\ntokenizer = AutoTokenizer.from_pretrained(\"epfl-llm\u002Fmeditron-70b\")\nmodel = AutoModelForCausalLM.from_pretrained(\"epfl-llm\u002Fmeditron-70b\")\n```\n\n\u003Cimg width=100% src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FepfLLM_meditron_readme_efdf25416472.png\" alt=\"Pipeline\" title=\"Pipeline\">\n\n## Medical Training Data\n\nWe release code to download and pre-process the data used to train Meditron.\n\nMediTron’s domain-adaptive pre-training corpus *GAP-Replay* combines 48.1B tokens from four corpora:\n\n- **Clinical \u003Cu>G\u003C\u002Fu>uidelines**: a new corpus of 46K clinical practice guidelines from various healthcare-related sources, including hospitals and international organizations,\n- **Paper \u003Cu>A\u003C\u002Fu>bstracts**: 16.1M abstracts extracted from closed-access PubMed and PubMed Central papers,\n- **Medical \u003Cu>P\u003C\u002Fu>apers**: full-text articles extracted from 5M publicly available PubMed and PubMed Central papers.\n- **\u003Cu>Replay\u003C\u002Fu> dataset**: 400M tokens of general domain pretraining data sampled from [RedPajama-v1](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Ftogethercomputer\u002FRedPajama-Data-1T).\n\n### Download instructions\n\nYou can download and pre-process the entire GAP-Replay corpus by running `.\u002Fdownload.sh` in the `gap-replay` folder.\n\nYou can download 36K open-access articles from our *Guidelines* corpus from the [HuggingFace datasets hub](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fepfl-llm\u002Fguidelines).\n\n```python\nfrom datasets import load_dataset\n\ndataset = load_dataset(\"epfl-llm\u002Fguidelines\")\n```\n\nYou can scrape and clean all 46K guidelines (including closed-access sources) by running `.\u002Fdownload.sh` in the `guidelines` folder.\n\nMore details can be found in the [GAP-Replay documentation](gap-replay\u002FREADME.md).\n\n## Training Procedure\n\nWe used the [Megatron-LLM](https:\u002F\u002Fgithub.com\u002FepfLLM\u002FMegatron-LLM) distributed training library, a derivative of Nvidia's Megatron LM project, to optimize training efficiency.\nThe hardware consists of 16 nodes of 8x NVIDIA A100 (80GB) SXM GPUs connected by NVLink and NVSwitch with a single Nvidia ConnectX-6 DX network card and equipped with 2 x AMD EPYC 7543 32-Core Processors and 512 GB of RAM.\nThe nodes are connected via RDMA over Converged Ethernet.\n\nOur three-way parallelism scheme uses the following:\n\n- Data Parallelism (DP -- different GPUs process different subsets of the batches) of 2,\n- Pipeline Parallelism (PP -- different GPUs process different layers) of 8,\n- Tensor Parallelism (TP -- different GPUs process different subtensors for matrix multiplication) of 8.\n\n### Training Hyperparameters (7B)\n\n|  |  |\n| --- | ------ |\n| bf16 | true |\n| lr  | 3e-4 |\n| eps | 1e-5       |\n| betas | \\[0.9, 0.95\\] |\n| clip_grad | 1 |\n| weight decay | 0.1 |\n| DP size | 16 |\n| TP size | 4 |\n| PP size | 1 |\n| seq length | 2048 |\n| lr scheduler | cosine|\n| min lr | 1e-6 |\n| warmup iteration | 2000 |\n| micro batch size | 10 |\n| global batch size | 1600 |\n|  |  |\n\n### Training Hyperparameters (70B)\n\n|  |  |\n| --- | ------ |\n| bf16 | true |\n| lr  | 1.5e-4 |\n| eps | 1e-5       |\n| betas | \\[0.9, 0.95\\] |\n| clip_grad | 1 |\n| weight decay | 0.1 |\n| DP size | 2 |\n| TP size | 8 |\n| PP size | 8 |\n| seq length | 4096 |\n| lr scheduler | cosine|\n| min lr | 1e-6 |\n| warmup iteration | 2000 |\n| micro batch size | 2 |\n| global batch size | 512 |\n|  |  |\n\nYou can see the script we used to pretrain our models through Megatron-LLM here: [finetune.sh](.\u002Fpretrain\u002Ffinetune.sh)\n\n## Supervised Finetuning\n\nWe again used the [Megatron-LLM](https:\u002F\u002Fgithub.com\u002FepfLLM\u002FMegatron-LLM) distributed training library for supervised finetuning (sinlge-node and multi-node).\nWe made a file, `sft.py`, that automatically handles the tokenization and finetuning process through Megatron-LLM. To start a multi-node finetuning process, here is an example:\n\n```bash\ncd finetuning\npython sft.py \\\n    --checkpoint=baseline \\\n    --size=70 \\\n    --run_name=cotmedqa \\\n    --data \u002Fpure-mlo-scratch\u002Fzechen\u002Fmeditron\u002Fbenchmarks\u002Fft_preprocessed\u002Fmedqa_cot_train.jsonl \\\n    --val \u002Fpure-mlo-scratch\u002Fzechen\u002Fmeditron\u002Fbenchmarks\u002Fft_preprocessed\u002Fmedqa_cot_validation.jsonl \\\n    --micro_batch=4\n    --nodes=4 \\\n    --addr=\u003CRANK0_HOST_NAME> \\\n    --save_interval=200 \\\n    --pp=4 \\\n    --seq 4096 \\\n    --rank=\u003CCURRENT_RANK>\n```\n\nRun the above line of code at node rank-0, rank-1, rank-2, and rank3 to start a 4-node finetuning process.\n\n**Important!**: Make sure to have the proper paths defined in `sft.py` and `finetune_sft.sh`.\n\n### Finetuning Hyperparameters\n\n|  |  |\n| --- | ------ |\n| bf16 | true |\n| lr  | 2e-5 |\n| eps | 1e-5       |\n| betas | \\[0.9, 0.95\\] |\n| clip_grad | 1 |\n| weight decay | 0.1 |\n| DP size | 16 |\n| TP size | 4 |\n| PP size | 1 |\n| seq length | 2048 or 4096 |\n| lr scheduler | cosine|\n| min lr | 2e-6 |\n| warmup ratio | 0.1 |\n| added tokens | [\u003C\\|im_start\\|>, \u003C\\|im_end\\|>] |\n|  |  |\n\n## Uses\n\nMeditron-70B is being made available for further testing and assessment as an AI assistant to enhance clinical decision-making and democratize access to an LLM for healthcare use. Potential use cases may include but are not limited to:\n\n- Medical exam question answering\n- Supporting differential diagnosis\n- Disease information (symptoms, cause, treatment) query\n- General health information query\n\nIt is possible to use this model to generate text, which is useful for experimentation and understanding its capabilities. It should not be used directly for production or work that may impact people.\n\nWe do not recommend using this model for natural language generation in a production environment, finetuned or otherwise.\n\n### Downstream Use\n\nMeditron-70B and Meditron-7B are both foundation models without finetuning or instruction-tuning. They can be finetuned, instruction-tuned, or RLHF-tuned for specific downstream tasks and applications.\nThere are two ways we have used this model for downstream question-answering tasks.\n1. We apply in-context learning with k demonstrations (3 or 5 in our paper) added to the prompt.\n2. We finetuned the models for downstream question-answering tasks using specific training sets.\n\nWe encourage and look forward to the adaption of the base model for more diverse applications.\n\nIf you want a more interactive way to prompt the model, we recommend using a high-throughput and memory-efficient inference engine with a UI that supports chat and text generation.\n\nYou can check out our deployment guide below, where we used [FastChat](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat) with [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm). We collected generations for our qualitative analysis through an interactive UI platform, [BetterChatGPT](https:\u002F\u002Fgithub.com\u002Fztjhz\u002FBetterChatGPT). Here is the prompt format we used as an example:\n\n\u003Cimg width=70% src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FepfLLM_meditron_readme_8eb4596c6b82.png\" alt=\"qualitative-analysis-prompt\" title=\"Qualitative Analysis Prompt\">\n\n## Medical Benchmark Inference & Evaluation\n\n### Requirements\n\nBefore you start, please install the necessary packages:\n\n    vllm >= 0.2.1\n    transformers >= 4.34.0\n    datasets >= 2.14.6\n    torch >= 2.0.1\n\nFor detailed instructions to run inference and evaluation with medical benchmarks, please read the documentation here [inference & evaluation instructions](.\u002Fevaluation\u002FREADME.md).\n\n## Model Deployment\n\nFor detailed instructions to deploy meditron models and have an interactive chat session, please read the documentation here [Model Deployment](.\u002Fdeployment\u002FREADME.md)\n\n## Citation\n\nIf you use this software or our paper, please cite them:\n\u003Cpre>\n@misc{chen2023meditron70b,\n      title={MEDITRON-70B: Scaling Medical Pretraining for Large Language Models},\n      author={Zeming Chen and Alejandro Hernández-Cano and Angelika Romanou and Antoine Bonnet and Kyle Matoba and Francesco Salvi and Matteo Pagliardini and Simin Fan and Andreas Köpf and Amirkeivan Mohtashami and Alexandre Sallinen and Alireza Sakhaeirad and Vinitra Swamy and Igor Krawczuk and Deniz Bayazit and Axel Marmet and Syrielle Montariol and Mary-Anne Hartley and Martin Jaggi and Antoine Bosselut},\n      year={2023},\n      eprint={2311.16079},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL}\n}\n\n@software{epfmedtrn,\n  author = {Zeming Chen and Alejandro Hernández-Cano and Angelika Romanou and Antoine Bonnet and Kyle Matoba and Francesco Salvi and Matteo Pagliardini and Simin Fan and Andreas Köpf and Amirkeivan Mohtashami and Alexandre Sallinen and Alireza Sakhaeirad and Vinitra Swamy and Igor Krawczuk and Deniz Bayazit and Axel Marmet and Syrielle Montariol and Mary-Anne Hartley and Martin Jaggi and Antoine Bosselut},\n  title = {MediTron-70B: Scaling Medical Pretraining for Large Language Models},\n  month = November,\n  year = 2023,\n  url = {https:\u002F\u002Fgithub.com\u002FepfLLM\u002Fmeditron}\n}\n\u003C\u002Fpre>\n","\u003Cimg width=40% src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FepfLLM_meditron_readme_1f46d602ce37.png\" alt=\"MediTron logo\" title=\"Meditron-logo\">\n\nMeditron 是一套开源的医学大型语言模型（LLMs）。\n\n我们发布了 Meditron-7B 和 Meditron-70B，它们基于 Llama-2，在一个全面 curated 的医学语料库上进行了持续预训练，该语料库包括精选的 PubMed 论文和摘要、一套国际公认的医学指南数据集，以及通用领域的语料库，从而适配了医学领域。\n\n经过相关数据微调的 Meditron-70B，在多项医学推理任务中表现优于 Llama-2-70B、GPT-3.5 和 Flan-PaLM。\n\n\u003Cdetails open>\n  \u003Csummary>\u003Cstrong>咨询通知\u003C\u002Fstrong>\u003C\u002Fsummary>\n\n  \u003Cblockquote style=\"background-color: #f2f2f2; padding: 10px; margin: 0 0 10px; border-left: 5px solid #ddd;\">\n    尽管 Meditron 旨在从高质量证据来源中编码医学知识，但它尚未被调整为能够以适当、安全的方式，并在专业可操作的约束范围内提供这些知识。我们建议不要在没有进行广泛的用例对齐以及额外测试的情况下将 Meditron 用于医疗应用，尤其是需要在真实世界实践环境中进行随机对照试验的情况。\n  \u003C\u002Fblockquote>\n\u003C\u002Fdetails>\n\n## 模型详情\n\n- **开发团队:** [EPFL LLM 团队](https:\u002F\u002Fhuggingface.co\u002Fepfl-llm)\n- **模型类型:** 因果解码器-only 变压器语言模型\n- **语言:** 英语（主要）\n- **模型许可证:** [LLAMA 2 社区许可协议](https:\u002F\u002Fai.meta.com\u002Fllama\u002Flicense\u002F)\n- **代码许可证:** [APACHE 2.0 许可证](LICENSE)\n- **继续预训练自模型:** [Llama-2-70B](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-2-70b)\n- **上下文长度:** 4k tokens\n- **输入:** 仅文本数据\n- **输出:** 模型仅生成文本\n- **状态:** 这是一个基于离线数据集训练的静态模型。随着我们不断提升模型性能，未来还将发布经过微调的版本。\n- **知识截止日期:** 2023年8月\n- **训练者:** [epflLLM\u002FMegatron-LLM](https:\u002F\u002Fgithub.com\u002FepfLLM\u002FMegatron-LLM)\n- **论文:** *[Meditron-70B：面向大型语言模型的医学预训练扩展]* (https:\u002F\u002Farxiv.org\u002Fabs\u002F2311.16079)\n\n## 使用方法\n\n您可以直接从 [HuggingFace 模型中心](https:\u002F\u002Fhuggingface.co\u002Fepfl-llm\u002Fmeditron-70B) 加载 Meditron 模型，如下所示：\n\n```python\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\n\ntokenizer = AutoTokenizer.from_pretrained(\"epfl-llm\u002Fmeditron-70b\")\nmodel = AutoModelForCausalLM.from_pretrained(\"epfl-llm\u002Fmeditron-70b\")\n```\n\n\u003Cimg width=100% src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FepfLLM_meditron_readme_efdf25416472.png\" alt=\"Pipeline\" title=\"Pipeline\">\n\n## 医学训练数据\n\n我们发布了用于下载和预处理 Meditron 训练数据的代码。\n\nMeditron 的领域自适应预训练语料库 *GAP-Replay* 结合了来自四个语料库的 481 亿个 token：\n\n- **临床\u003Cu>G\u003C\u002Fu>uidelines**: 一套包含来自各类医疗机构及国际组织的 4.6 万份临床实践指南的新语料库，\n- **论文\u003Cu>A\u003C\u002Fu>bstracts**: 从封闭访问的 PubMed 和 PubMed Central 论文中提取的 1610 万个摘要，\n- **医学\u003Cu>P\u003C\u002Fu>apers**: 从 500 万篇公开可用的 PubMed 和 PubMed Central 论文中提取的全文文章。\n- **\u003Cu>Replay\u003C\u002Fu> 数据集**: 从 [RedPajama-v1](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Ftogethercomputer\u002FRedPajama-Data-1T) 中采样的 4 亿个通用领域预训练数据 token。\n\n### 下载说明\n\n您可以通过在 `gap-replay` 文件夹中运行 `.\u002Fdownload.sh` 来下载并预处理整个 GAP-Replay 语料库。\n\n您还可以从 [HuggingFace 数据集中心](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002Fepfl-llm\u002Fguidelines) 下载我们 *Guidelines* 语料库中的 3.6 万篇开放获取文章。\n\n```python\nfrom datasets import load_dataset\n\ndataset = load_dataset(\"epfl-llm\u002Fguidelines\")\n```\n\n您也可以通过在 `guidelines` 文件夹中运行 `.\u002Fdownload.sh` 来抓取并清洗所有 4.6 万份指南（包括封闭访问来源）。\n\n更多详细信息请参阅 [GAP-Replay 文档](gap-replay\u002FREADME.md)。\n\n## 训练流程\n\n我们使用了 [Megatron-LLM](https:\u002F\u002Fgithub.com\u002FepfLLM\u002FMegatron-LLM) 分布式训练库——它是 Nvidia 的 Megatron LM 项目的衍生版本——来优化训练效率。\n硬件由 16 个节点组成，每个节点配备 8 块 NVIDIA A100（80GB）SXM GPU，通过 NVLink 和 NVSwitch 相互连接，并配有单块 Nvidia ConnectX-6 DX 网卡，同时搭载 2 颗 AMD EPYC 7543 32 核处理器和 512GB 内存。\n这些节点通过 RDMA over Converged Ethernet 进行互联。\n\n我们的三重并行方案采用以下配置：\n\n- 数据并行（DP —— 不同 GPU 处理不同批次子集）为 2，\n- 流水线并行（PP —— 不同 GPU 处理不同层）为 8，\n- 张量并行（TP —— 不同 GPU 处理矩阵乘法的不同子张量）为 8。\n\n### 训练超参数（7B）\n\n|  |  |\n| --- | ------ |\n| bf16 | true |\n| lr  | 3e-4 |\n| eps | 1e-5       |\n| betas | \\[0.9, 0.95\\] |\n| clip_grad | 1 |\n| weight decay | 0.1 |\n| DP size | 16 |\n| TP size | 4 |\n| PP size | 1 |\n| seq length | 2048 |\n| lr scheduler | cosine|\n| min lr | 1e-6 |\n| warmup iteration | 2000 |\n| micro batch size | 10 |\n| global batch size | 1600 |\n|  |  |\n\n### 训练超参数（70B）\n\n|  |  |\n| --- | ------ |\n| bf16 | true |\n| lr  | 1.5e-4 |\n| eps | 1e-5       |\n| betas | \\[0.9, 0.95\\] |\n| clip_grad | 1 |\n| weight decay | 0.1 |\n| DP size | 2 |\n| TP size | 8 |\n| PP size | 8 |\n| seq length | 4096 |\n| lr scheduler | cosine|\n| min lr | 1e-6 |\n| warmup iteration | 2000 |\n| micro batch size | 2 |\n| global batch size | 512 |\n|  |  |\n\n您可以在这里查看我们通过 Megatron-LLM 对模型进行预训练所使用的脚本：[finetune.sh](.\u002Fpretrain\u002Ffinetune.sh)\n\n## 监督式微调\n\n我们再次使用了 [Megatron-LLM](https:\u002F\u002Fgithub.com\u002FepfLLM\u002FMegatron-LLM) 分布式训练库来进行监督式微调（单节点和多节点）。\n我们编写了一个名为 `sft.py` 的文件，它可以自动通过 Megatron-LLM 处理分词和微调过程。要启动多节点微调流程，可以参考以下示例：\n\n```bash\ncd finetuning\npython sft.py \\\n    --checkpoint=baseline \\\n    --size=70 \\\n    --run_name=cotmedqa \\\n    --data \u002Fpure-mlo-scratch\u002Fzechen\u002Fmeditron\u002Fbenchmarks\u002Fft_preprocessed\u002Fmedqa_cot_train.jsonl \\\n    --val \u002Fpure-mlo-scratch\u002Fzechen\u002Fmeditron\u002Fbenchmarks\u002Fft_preprocessed\u002Fmedqa_cot_validation.jsonl \\\n    --micro_batch=4\n    --nodes=4 \\\n    --addr=\u003CRANK0_HOST_NAME> \\\n    --save_interval=200 \\\n    --pp=4 \\\n    --seq 4096 \\\n    --rank=\u003CCURRENT_RANK>\n```\n\n在节点 rank-0、rank-1、rank-2 和 rank-3 上分别运行上述命令，即可启动一个 4 节点的微调进程。\n\n**重要提示！**: 请确保在 `sft.py` 和 `finetune_sft.sh` 中正确设置了路径。\n\n### 微调超参数\n\n|  |  |\n| --- | ------ |\n| bf16 | true |\n| lr  | 2e-5 |\n| eps | 1e-5       |\n| betas | \\[0.9, 0.95\\] |\n| clip_grad | 1 |\n| weight decay | 0.1 |\n| DP size | 16 |\n| TP size | 4 |\n| PP size | 1 |\n| seq length | 2048 或 4096 |\n| lr scheduler | cosine|\n| min lr | 2e-6 |\n| warmup ratio | 0.1 |\n| added tokens | [\u003C\\|im_start\\|>, \u003C\\|im_end\\|>] |\n|  |  |\n\n## 应用场景\n\nMeditron-70B 目前可供进一步测试和评估，旨在作为 AI 助手以增强临床决策能力，并使医疗领域的大规模语言模型更加普及化。潜在的应用场景包括但不限于：\n\n- 医学考试问答\n- 辅助鉴别诊断\n- 疾病相关信息查询（症状、病因、治疗等）\n- 健康常识查询\n\n该模型可用于生成文本，这对于实验研究及理解其功能特性非常有帮助。然而，不应将其直接用于生产环境或可能对人们产生影响的实际工作中。\n\n我们不建议在生产环境中使用此模型进行自然语言生成任务，无论是否经过微调。\n\n### 下游应用\n\nMeditron-70B 和 Meditron-7B 均为未经过微调或指令微调的基础模型。它们可以根据具体的下游任务和应用场景进行微调、指令微调或 RLHF 微调。\n\n我们曾采用两种方式将该模型应用于下游问答任务：\n1. 在提示中加入 k 个示例（我们的论文中使用了 3 或 5 个），实现上下文学习。\n2. 使用特定的训练数据集对该模型进行微调，以适应下游问答任务。\n\n我们鼓励并期待更多样化的应用场景能够基于该基础模型展开。\n\n如果您希望以更交互式的方式与模型对话，建议使用高吞吐量且内存高效的推理引擎，并配备支持聊天和文本生成的用户界面。\n\n您可以在下方的部署指南中查看我们的实践案例：我们使用了 [FastChat](https:\u002F\u002Fgithub.com\u002Flm-sys\u002FFastChat) 结合 [vLLM](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm)。为了进行定性分析，我们通过一个交互式 UI 平台 [BetterChatGPT](https:\u002F\u002Fgithub.com\u002Fztjhz\u002FBetterChatGPT) 收集了模型生成的内容。以下是我们使用的提示格式示例：\n\n\u003Cimg width=70% src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FepfLLM_meditron_readme_8eb4596c6b82.png\" alt=\"qualitative-analysis-prompt\" title=\"Qualitative Analysis Prompt\">\n\n## 医疗基准推理与评估\n\n### 必需条件\n\n在开始之前，请确保已安装以下必要的软件包：\n\n    vllm >= 0.2.1\n    transformers >= 4.34.0\n    datasets >= 2.14.6\n    torch >= 2.0.1\n\n有关如何使用医疗基准进行推理和评估的详细说明，请参阅此处的文档：[推理与评估说明](.\u002Fevaluation\u002FREADME.md)。\n\n## 模型部署\n\n有关如何部署 Meditron 模型并进行交互式对话的详细步骤，请参阅此处的文档：[模型部署](.\u002Fdeployment\u002FREADME.md)。\n\n## 引用信息\n\n如果您使用本软件或本文，请引用以下内容：\n\u003Cpre>\n@misc{chen2023meditron70b,\n      title={MEDITRON-70B: Scaling Medical Pretraining for Large Language Models},\n      author={Zeming Chen and Alejandro Hernández-Cano and Angelika Romanou and Antoine Bonnet and Kyle Matoba and Francesco Salvi and Matteo Pagliardini and Simin Fan and Andreas Köpf and Amirkeivan Mohtashami and Alexandre Sallinen and Alireza Sakhaeirad and Vinitra Swamy and Igor Krawczuk and Deniz Bayazit and Axel Marmet and Syrielle Montariol and Mary-Anne Hartley and Martin Jaggi and Antoine Bosselut},\n      year={2023},\n      eprint={2311.16079},\n      archivePrefix={arXiv},\n      primaryClass={cs.CL}\n}\n\n@software{epfmedtrn,\n  author = {Zeming Chen and Alejandro Hernández-Cano and Angelika Romanou and Antoine Bonnet and Kyle Matoba and Francesco Salvi and Matteo Pagliardini and Simin Fan and Andreas Köpf and Amirkeivan Mohtashami and Alexandre Sallinen and Alireza Sakhaeirad and Vinitra Swamy and Igor Krawczuk and Deniz Bayazit and Axel Marmet and Syrielle Montariol and Mary-Anne Hartley and Martin Jaggi and Antoine Bosselut},\n  title = {MediTron-70B: Scaling Medical Pretraining for Large Language Models},\n  month = November,\n  year = 2023,\n  url = {https:\u002F\u002Fgithub.com\u002FepfLLM\u002Fmeditron}\n}\n\u003C\u002Fpre>","# Meditron 快速上手指南\n\nMeditron 是由 EPFL LLM 团队开发的一套开源医疗大语言模型（LLM），基于 Llama-2 进行持续预训练，专为医疗领域优化。本指南将帮助您快速在本地加载和使用 Meditron 模型。\n\n## 环境准备\n\n### 系统要求\n- **操作系统**: Linux (推荐) 或 macOS\n- **GPU**: 建议使用 NVIDIA GPU（运行 7B 版本至少需要 16GB 显存，70B 版本需要多卡或多节点环境）\n- **Python**: 3.8 或更高版本\n\n### 前置依赖\n请确保已安装以下核心库：\n```bash\npip install torch>=2.0.1\npip install transformers>=4.34.0\npip install datasets>=2.14.6\npip install vllm>=0.2.1  # 如需高性能推理\n```\n\n> **提示**：国内开发者可使用清华源或阿里源加速安装：\n> ```bash\n> pip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple torch transformers datasets vllm\n> ```\n\n## 安装步骤\n\nMeditron 模型托管在 Hugging Face 上，无需克隆整个仓库即可直接通过代码加载。若需获取数据处理脚本或微调代码，可克隆官方仓库：\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FepfLLM\u002Fmeditron.git\ncd meditron\n```\n\n*注：模型权重将在首次运行时自动从 Hugging Face 下载。国内网络若不顺畅，建议配置 Hugging Face 镜像或使用代理。*\n\n## 基本使用\n\n以下是使用 `transformers` 库加载 Meditron-70B 模型并生成文本的最简示例。\n\n### 1. 加载模型与分词器\n\n```python\nfrom transformers import AutoTokenizer, AutoModelForCausalLM\n\n# 加载 70B 版本，如需 7B 版本请将 \"meditron-70b\" 改为 \"meditron-7b\"\nmodel_name = \"epfl-llm\u002Fmeditron-70b\"\n\ntokenizer = AutoTokenizer.from_pretrained(model_name)\nmodel = AutoModelForCausalLM.from_pretrained(\n    model_name,\n    device_map=\"auto\",          # 自动分配设备到 GPU\n    torch_dtype=\"auto\"          # 自动选择精度以节省显存\n)\n```\n\n### 2. 推理示例\n\n```python\ninput_text = \"User: What are the symptoms of diabetes?\\nAssistant:\"\ninputs = tokenizer(input_text, return_tensors=\"pt\").to(model.device)\n\noutputs = model.generate(\n    **inputs,\n    max_new_tokens=256,\n    do_sample=True,\n    temperature=0.7,\n    top_p=0.9\n)\n\nresponse = tokenizer.decode(outputs[0], skip_special_tokens=True)\nprint(response)\n```\n\n### ⚠️ 重要安全提示\nMeditron 是一个基础模型，**尚未针对临床实际应用进行安全对齐**。\n- **严禁**直接将其用于生产环境、临床诊断或提供具体的医疗建议。\n- 该模型仅适用于研究、实验及作为进一步微调的基础。\n- 在实际医疗场景使用前，必须进行严格的用例对齐测试及随机对照试验。","某三甲医院科研团队正在协助基层医生快速解读复杂的国际临床指南，以制定标准化诊疗方案。\n\n### 没有 meditron 时\n- 通用大模型对专业医学术语理解偏差大，常将“适应症”与“禁忌症”混淆，导致建议存在安全隐患。\n- 面对长达数十页的全英文临床指南，医生需人工逐段检索关键信息，耗时数小时且容易遗漏更新内容。\n- 模型缺乏对最新 PubMed 文献和权威指南的训练，无法回答涉及 2023 年前沿疗法的具体推理问题。\n- 输出内容过于泛泛而谈，缺乏基于具体病例场景的可操作性步骤，难以直接指导临床实践。\n\n### 使用 meditron 后\n- meditron 基于 46K 份临床指南和海量论文持续预训练，能精准区分复杂医学概念，显著降低误读风险。\n- 医生输入患者症状，meditron 可瞬间从国际指南中提取对应章节并总结关键诊疗路径，将检索时间缩短至分钟级。\n- 依托包含最新 PubMed 摘要的知识库，meditron 能准确回答关于新兴疗法的深度推理问题，提供循证依据。\n- 生成的回答严格遵循专业指南约束，输出结构化的分步操作建议，可直接作为基层医生的辅助决策参考。\n\nmeditron 通过将海量权威医学知识内化为模型能力，极大地提升了医疗信息检索的准确性与临床决策的支持效率。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FepfLLM_meditron_1f46d602.png","epfLLM","EPFL LLM team","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FepfLLM_567a2d8d.png","",null,"http:\u002F\u002Fepfl.ch\u002F","https:\u002F\u002Fgithub.com\u002FepfLLM",[85,89,93],{"name":86,"color":87,"percentage":88},"Python","#3572A5",83.1,{"name":90,"color":91,"percentage":92},"Shell","#89e051",9,{"name":94,"color":95,"percentage":96},"TypeScript","#3178c6",7.9,2163,207,"2026-04-12T01:58:39","Apache-2.0",4,"Linux","训练必需：NVIDIA A100 (80GB) SXM，需多卡集群（如 16 节点 x 8 卡）；推理建议：支持 vLLM 的 NVIDIA GPU，显存需求取决于模型版本（7B 需约 14GB+，70B 需约 140GB+ 或使用量化\u002F多卡并行），未明确指定 CUDA 版本但通常需配合 PyTorch 2.0.1+","训练：每节点 512GB；推理：未说明（建议根据模型大小配置充足内存）",{"notes":106,"python":107,"dependencies":108},"该工具主要面向大规模分布式训练环境，官方训练使用了 16 个节点（每节点 8 张 A100 80GB）。普通用户进行推理时建议使用 vLLM 或 FastChat 等高效引擎。模型分为 7B 和 70B 两个版本，70B 版本对硬件要求极高。代码许可证为 Apache 2.0，但模型权重遵循 Llama 2 社区许可协议。不建议直接用于生产环境的医疗应用，需经过额外的对齐测试。","未说明",[109,110,111,112,113],"vllm>=0.2.1","transformers>=4.34.0","datasets>=2.14.6","torch>=2.0.1","Megatron-LLM",[15],"2026-03-27T02:49:30.150509","2026-04-13T22:44:34.571160",[118,123,128,133,138,142],{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},32038,"为什么我的评估结果（如 PubMedQA）与论文中报告的结果不一致？","结果差异通常源于评估设置的不同：\n1. **微调 vs 预训练**：论文表 5 报告的是在训练集上**微调后**模型的性能，而非零样本或少样本的预训练模型。如果您测试的是预训练模型，请参考论文表 4（第 9 页）的少样本学习结果。\n2. **解码策略**：官方使用贪婪解码（greedy decoding），不进行 token 采样。\n3. **种子用途**：提到的种子（如 1234, 432, 32）仅用于从训练集中采样上下文学习演示（in-context learning demonstrations），表 4 的结果是这三个种子的平均值。\n4. **准确率计算**：无法解析的答案被视为错误答案。准确率 = 正确样本数 \u002F 测试集总样本数（分母包含所有样本，不仅仅是被计数的样本）。","https:\u002F\u002Fgithub.com\u002FepfLLM\u002Fmeditron\u002Fissues\u002F23",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},32039,"使用标准 Hugging Face 加载基础模型时遇到 CUDA 错误或 Tokenizer 不匹配问题怎么办？","这是一个已知的 Tokenizer 词汇表大小不一致问题。维护者已更新模型和 Tokenizer，使其具有一致的词汇表大小（32017）。\n解决方案：\n1. 确保您拉取了最新版本的模型和 Tokenizer（`epfl-llm\u002Fmeditron-7b` 等）。\n2. 如果问题仍然存在，检查本地缓存的 tokenizer 配置。基础模型不应包含 `\u003CCLS>`, `\u003CSEP>`, `\u003CEOD>`, `\u003CMASK>`, `\u003CPAD>` 等特殊 token（这些通常属于指令微调版本）。如有必要，请清除 Hugging Face 缓存并重新下载。","https:\u002F\u002Fgithub.com\u002FepfLLM\u002Fmeditron\u002Fissues\u002F8",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},32040,"运行数据爬取脚本（如 Drugs, GuidelineCentral, Magic）时失败或没有数据输出，如何解决？","这些爬取脚本非常脆弱，依赖于目标网站的动态结构，可能随时间失效（脚本仅在 2023 年 11 月验证过）。\n针对特定问题的建议：\n1. **GuidelineCentral**：如果在 WSL 或某些环境下运行，尝试禁用 `--headless` 模式，因为该选项可能导致点击操作失败。\n2. **通用方案**：由于网站结构变化，官方建议用户根据当前网站结构更新爬虫代码并提交 Pull Request。如果没有编程能力修复，可能需要寻找替代数据源。","https:\u002F\u002Fgithub.com\u002FepfLLM\u002Fmeditron\u002Fissues\u002F36",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},32041,"运行 PubMed 数据加载脚本后，生成的 JSONL 文件中只有元数据而没有文章全文内容，原因是什么？","这是因为 `papers-PubMed.jsonl` 仅包含元数据。要获取全文或摘要，必须完整运行 PubMed 管道的第一步（`download.sh`）。\n该脚本会从 Semantic Scholar API 下载三个独立数据集并合并：\n1. `pubmed`：包含文章元数据。\n2. `s2orc`：包含全文文章。\n3. `abstracts`：包含文章摘要。\n合并后的文件位于：\n- `\u002Fdata\u002Fabstracts-PubMed_metadata.jsonl`（带元数据的摘要）\n- `\u002Fdata\u002Fs2orc-PubMed_metadata.jsonl`（带元数据的全文）\n请检查是否运行了 `download.sh` 并在上述路径查找文件。","https:\u002F\u002Fgithub.com\u002FepfLLM\u002Fmeditron\u002Fissues\u002F25",{"id":139,"question_zh":140,"answer_zh":141,"source_url":122},32042,"论文表 5 中的 Top Token 选择方法使用了什么样的 Few-shot 策略和种子设置？","关于表 5（微调模型性能）的具体 Few-shot 设置（如 7B 模型用 3-shot，70B 模型用 5-shot）以及种子选择细节，请直接参考论文 **第 6.2 节 (Setup)**。官方回复指出所有详细信息均在该章节中描述，通常微调实验不涉及推理时的 Few-shot 演示，而是基于训练数据进行微调。",{"id":143,"question_zh":144,"answer_zh":145,"source_url":127},32043,"如何正确构建发送给 MEDITRON 模型的 Prompt 格式？","虽然基础模型主要关注续写，但如果需要遵循特定的对话格式（特别是在使用指令微调版本或模拟对话时），可以参考以下 ChatML 格式的构建方式：\n```python\ndef format_prompt(prompt):\n    system_msg = \"You are a helpful, respectful and honest assistant.\"\n    return f\"\u003C|im_start|> system\\n{system_msg}\u003C|im_end|>\\n\u003C|im_start|> user\\n{prompt}\u003C|im_end|>\\n\u003C|im_start|> assistant\\n\"\n```\n注意：对于基础模型（Base Model），请确保使用的 Tokenizer 版本与模型权重完全匹配，避免因特殊 token（如 `\u003C|im_start|>`）未定义而导致的嵌入层维度错误。",[]]