[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-microsoft--vidur":3,"tool-microsoft--vidur":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":79,"owner_email":80,"owner_twitter":81,"owner_website":82,"owner_url":83,"languages":84,"stars":97,"forks":98,"last_commit_at":99,"license":100,"difficulty_score":23,"env_os":101,"env_gpu":102,"env_ram":101,"env_deps":103,"category_tags":109,"github_topics":110,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":116,"updated_at":117,"faqs":118,"releases":146},4023,"microsoft\u002Fvidur","vidur","A large-scale simulation framework for LLM inference","Vidur 是一款高保真、可扩展的大语言模型（LLM）推理系统仿真框架。它旨在帮助开发者在无需大量占用昂贵 GPU 资源的情况下，精准预测模型在不同负载和硬件配置下的系统性能。\n\n在实际应用中，部署 LLM 往往面临硬件成本高、配置调优复杂等挑战。Vidur 通过模拟技术解决了这一痛点，让用户能够快速进行容量规划，寻找性价比最优的部署方案，并评估首字延迟（TTFT）、吞吐量等关键指标。此外，它还支持研究人员在不依赖真实集群的前提下，快速验证新的调度算法或推测解码等优化策略，仅需在初期进行少量性能剖析即可。\n\nVidur 特别适合 AI 基础设施工程师、系统研究人员以及需要规划模型部署的技术团队使用。其独特亮点在于支持多种主流模型（如 Llama 3、Qwen 等）与不同 GPU 拓扑（如 A100、H100 集群）的灵活组合，涵盖张量并行与流水线并行等多种场景。借助 Vidur，用户可以高效地在虚拟环境中完成从性能测试到架构选型的全流程，显著降低试错成本并加速研发迭代。","# Vidur: LLM Inference System Simulator\n\nVidur is a high-fidelity and extensible LLM inference system simulator. It can help you with:\n\n1. Study the system performance of models under different workloads and configurations.\n\n    | TTFT | TPOT | Request E2E Time | Batch Size |\n    | --- | --- | --- | --- |\n    | ![TTFT](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_df5675e10125.png) | ![TPOT](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_f70e5a44e460.png) | ![Request E2E Time](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_2a529b1946b3.png) | ![Batch Size](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_48b7675e449d.png) |\n\n    *`Llama-3-8B` running the [AzureLLMInferenceTrace2023_conv](https:\u002F\u002Fgithub.com\u002FAzure\u002FAzurePublicDataset\u002Fblob\u002Fmaster\u002Fdata\u002FAzureLLMInferenceTrace_conv.csv) trace on single `A100 80GB` at 6.45 QPS*\n\n1. Capacity planning and finding the best deployment configuration for your LLM deployments.\n   ![Config Search](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_2f5c2ddc4274.jpeg)\n*Capacity per dollar for different deployment configurations vs TTFT-P90 and TBT-P99 for LLaMA2-70B.*\n1. Quickly test new research ideas like new scheduling algorithms, optimizations like speculative decoding, etc.\n\n... all without access to GPUs except for a quick initial profiling phase 🎉. We highly recommend checking out our [MLSys'24 paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.05465) and [talk](https:\u002F\u002Fmlsys.org\u002Fvirtual\u002F2024\u002Fposter\u002F2667) for more details.\n\n\n## Supported Models\n\n__Instructions on adding a new model to existing or new SKUs can be found [here](docs\u002Fprofiling.md)__.\n\n| Model \u002F Device | A100 80GB DGX | H100 DGX | 4xA100 80GB Pairwise NVLink Node | 8xA40 Pairwise NVLink Node |\n| --- | --- | --- | --- | --- |\n| `meta-llama\u002FMeta-Llama-3-8B` | ✅ | ❌ | ✅ | ❌ |\n| `meta-llama\u002FMeta-Llama-3-70B` | ✅ | ❌ | ✅ | ❌ |\n| `meta-llama\u002FLlama-2-7b-hf` | ✅ | ✅ | ✅ | ✅ |\n| `codellama\u002FCodeLlama-34b-Instruct-hf\"` | ✅ | ✅ | ✅ | ✅ |\n| `meta-llama\u002FLlama-2-70b-hf` | ✅ | ✅ | ✅ | ✅ |\n| `internlm\u002Finternlm-20b` | ✅ | ✅ | ✅ | ✅ |\n| `Qwen\u002FQwen-72B` | ✅ | ✅ | ✅ | ✅ |\n\n* All models support a maximum context length of 4k except `Llama3-8B` and `Llama3-70B` which support 16k context length by passing additional CLI params:\n\n    ```text\n    --random_forrest_execution_time_predictor_config_prediction_max_prefill_chunk_size 16384 \\\n    --random_forrest_execution_time_predictor_config_prediction_max_batch_size 512 \\\n    --random_forrest_execution_time_predictor_config_prediction_max_tokens_per_request 16384\n    ```\n\n* Pipeline parallelism is supported for all models. The PP dimension should divide the number of layers in the model.\n* In DGX nodes, there are 8 GPUs, fully connected via NVLink. So TP1, TP2, TP4 and TP8 are supported.\n* In 4x pairwise NVLink nodes, there are 4 GPUs, so TP1, TP2 and TP4 are supported. TP4 here is less performant than TP4 in DGX nodes because (GPU1, GPU2) are connected via NVLink and (GPU3, GPU4) are connected via NVLink. but between these layers, the interconnect is slower.\n* You can use any combination of TP and PP. For example, you can run LLaMA2-70B on TP2-PP2 on a 4xA100 80GB Pairwise NVLink Node.\n\n## Setup\n\n### Using `mamba`\n\nTo run the simulator, create a mamba environment with the given dependency file.\n\n```sh\nmamba env create -p .\u002Fenv -f .\u002Fenvironment.yml\nmamba env update -f environment-dev.yml\n```\n\n### Using `venv`\n\n1. Ensure that you have Python 3.10 installed on your system. Refer \u003Chttps:\u002F\u002Fwww.bitecode.dev\u002Fp\u002Finstalling-python-the-bare-minimum>\n2. `cd` into the repository root\n3. Create a virtual environment using `venv` module using `python3.10 -m venv .venv`\n4. Activate the virtual environment using `source .venv\u002Fbin\u002Factivate`\n5. Install the dependencies using `python -m pip install -r requirements.txt`\n6. Run `deactivate` to deactivate the virtual environment\n\n### Using `conda` (Least recommended)\n\nTo run the simulator, create a conda environment with the given dependency file.\n\n```sh\nconda env create -p .\u002Fenv -f .\u002Fenvironment.yml\nconda env update -f environment-dev.yml\n```\n\n### Setting up wandb (Optional)\n\nFirst, setup your account on `https:\u002F\u002F\u003Cyour-org>.wandb.io\u002F` or public wandb, obtain the api key and then run the following command,\n\n```sh\nwandb login --host https:\u002F\u002F\u003Cyour-org>.wandb.io\n```\n\nTo opt out of wandb, pick any one of the following methods:\n\n1. `export WANDB_MODE=disabled` in your shell or add this in `~\u002F.zshrc` or `~\u002F.bashrc`. Remember to reload using `source ~\u002F.zshrc`.\n2. Set `wandb_project` and `wandb_group` as `\"\"` in `vidur\u002Fconfig\u002Fdefault.yml`. Also, remove these CLI params from the shell command with which the simulator is invoked.\n\n## Running the simulator\n\nTo run the simulator, execute the following command from the repository root,\n\n```sh\npython -m vidur.main\n```\n\nor a big example with all the parameters,\n\n```sh\npython -m vidur.main  \\\n--replica_config_device a100 \\\n--replica_config_model_name meta-llama\u002FMeta-Llama-3-8B \\\n--cluster_config_num_replicas 1 \\\n--replica_config_tensor_parallel_size 1 \\\n--replica_config_num_pipeline_stages 1 \\\n--request_generator_config_type synthetic \\\n--synthetic_request_generator_config_num_requests 512  \\\n--length_generator_config_type trace \\\n--trace_request_length_generator_config_max_tokens 16384 \\\n--trace_request_length_generator_config_trace_file .\u002Fdata\u002Fprocessed_traces\u002Fsplitwise_conv.csv \\\n--interval_generator_config_type poisson \\\n--poisson_request_interval_generator_config_qps 6.45 \\\n--replica_scheduler_config_type sarathi  \\\n--sarathi_scheduler_config_batch_size_cap 512  \\\n--sarathi_scheduler_config_chunk_size 512 \\\n--random_forrest_execution_time_predictor_config_prediction_max_prefill_chunk_size 16384 \\\n--random_forrest_execution_time_predictor_config_prediction_max_batch_size 512 \\\n--random_forrest_execution_time_predictor_config_prediction_max_tokens_per_request 16384\n```\n\nor to get information on all parameters,\n\n```sh\npython -m vidur.main -h\n```\n\n## Simulator Output\n\n* The metrics will be logged to wandb directly and a copy will be stored in the `simulator_output\u002F\u003CTIMESTAMP>` directory. __A description of all the logged metrics can be found [here](docs\u002Fmetrics.md).__\n* Vidur exports chrome traces of each simulation. The trace can be found in the `simulator_output` directory. The trace can be opened by navigating to `chrome:\u002F\u002Ftracing\u002F` or `edge:\u002F\u002Ftracing\u002F` and loading the trace.\n\n    ![Chrome Trace](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_978c5c821c7c.png)\n\n## Formatting Code\n\nTo format code, execute the following command:\n\n```sh\nmake format\n```\n\n## Using Canary Build\n\nWe have been working on several improvements for the simulator, including support for prefix caching, different routing policies, reducing memory requirements for the simulator, etc. However, there are some sharp edges that we are working on resolving. In the meantime, if you are looking for support for any of these features, please use the `canary` branch.\n\n## Contributing\n\nThis project welcomes contributions and suggestions.  Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https:\u002F\u002Fcla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002F).\nFor more information see the [Code of Conduct FAQ](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002Ffaq\u002F) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft \ntrademarks or logos is subject to and must follow \n[Microsoft's Trademark & Brand Guidelines](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Flegal\u002Fintellectualproperty\u002Ftrademarks\u002Fusage\u002Fgeneral).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n\n","# Vidur：LLM 推理系统模拟器\n\nVidur 是一款高保真且可扩展的 LLM 推理系统模拟器。它可以帮助您：\n\n1. 研究模型在不同工作负载和配置下的系统性能。\n\n    | TTFT | TPOT | 请求端到端时间 | 批量大小 |\n    | --- | --- | --- | --- |\n    | ![TTFT](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_df5675e10125.png) | ![TPOT](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_f70e5a44e460.png) | ![请求端到端时间](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_2a529b1946b3.png) | ![批量大小](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_48b7675e449d.png) |\n\n    *`Llama-3-8B` 在单个 `A100 80GB` 上以 6.45 QPS 的速率运行 [AzureLLMInferenceTrace2023_conv](https:\u002F\u002Fgithub.com\u002FAzure\u002FAzurePublicDataset\u002Fblob\u002Fmaster\u002Fdata\u002FAzureLLMInferenceTrace_conv.csv) 跟踪数据*\n\n1. 进行容量规划，并为您的 LLM 部署找到最佳部署配置。\n   ![配置搜索](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_2f5c2ddc4274.jpeg)\n*不同部署配置下每美元容量与 LLaMA2-70B 的 TTFT-P90 和 TBT-P99 的关系图。*\n1. 快速测试新的研究想法，例如新的调度算法、推测解码等优化技术。\n\n…所有这些都不需要访问 GPU，只需一个快速的初始性能分析阶段即可 🎉。我们强烈建议您查看我们的 [MLSys'24 论文](https:\u002F\u002Farxiv.org\u002Fabs\u002F2405.05465) 和 [演讲](https:\u002F\u002Fmlsys.org\u002Fvirtual\u002F2024\u002Fposter\u002F2667) 以获取更多详细信息。\n\n\n## 支持的模型\n\n__有关如何将新模型添加到现有或新 SKU 的说明，请参阅 [这里](docs\u002Fprofiling.md)__。\n\n| 模型 \u002F 设备 | A100 80GB DGX | H100 DGX | 4xA100 80GB 双向 NVLink 节点 | 8xA40 双向 NVLink 节点 |\n| --- | --- | --- | --- | --- |\n| `meta-llama\u002FMeta-Llama-3-8B` | ✅ | ❌ | ✅ | ❌ |\n| `meta-llama\u002FMeta-Llama-3-70B` | ✅ | ❌ | ✅ | ❌ |\n| `meta-llama\u002FLlama-2-7b-hf` | ✅ | ✅ | ✅ | ✅ |\n| `codellama\u002FCodeLlama-34b-Instruct-hf\"` | ✅ | ✅ | ✅ | ✅ |\n| `meta-llama\u002FLlama-2-70b-hf` | ✅ | ✅ | ✅ | ✅ |\n| `internlm\u002Finternlm-20b` | ✅ | ✅ | ✅ | ✅ |\n| `Qwen\u002FQwen-72B` | ✅ | ✅ | ✅ | ✅ |\n\n* 所有模型的最大上下文长度为 4k，除了 `Llama3-8B` 和 `Llama3-70B`，它们通过传递额外的 CLI 参数支持 16k 的上下文长度：\n\n    ```text\n    --random_forrest_execution_time_predictor_config_prediction_max_prefill_chunk_size 16384 \\\n    --random_forrest_execution_time_predictor_config_prediction_max_batch_size 512 \\\n    --random_forrest_execution_time_predictor_config_prediction_max_tokens_per_request 16384\n    ```\n\n* 所有模型都支持流水线并行。PP 维度应能整除模型的层数。\n* 在 DGX 节点中，有 8 个 GPU，通过 NVLink 完全连接。因此，支持 TP1、TP2、TP4 和 TP8。\n* 在 4x 双向 NVLink 节点中，只有 4 个 GPU，因此仅支持 TP1、TP2 和 TP4。这里的 TP4 性能不如 DGX 节点中的 TP4，因为 (GPU1, GPU2) 和 (GPU3, GPU4) 分别通过 NVLink 连接，而这两组之间则使用较慢的互连通道。\n* 您可以任意组合 TP 和 PP。例如，您可以在 4xA100 80GB 双向 NVLink 节点上以 TP2-PP2 的方式运行 LLaMA2-70B。\n\n## 设置\n\n### 使用 `mamba`\n\n要运行模拟器，需创建一个包含指定依赖文件的 mamba 环境。\n\n```sh\nmamba env create -p .\u002Fenv -f .\u002Fenvironment.yml\nmamba env update -f environment-dev.yml\n```\n\n### 使用 `venv`\n\n1. 确保您的系统已安装 Python 3.10。请参考 \u003Chttps:\u002F\u002Fwww.bitecode.dev\u002Fp\u002Finstalling-python-the-bare-minimum>\n2. 切换到仓库根目录\n3. 使用 `venv` 模块创建虚拟环境：`python3.10 -m venv .venv`\n4. 激活虚拟环境：`source .venv\u002Fbin\u002Factivate`\n5. 安装依赖项：`python -m pip install -r requirements.txt`\n6. 运行 `deactivate` 以停用虚拟环境。\n\n### 使用 `conda`（不推荐）\n\n要运行模拟器，需创建一个包含指定依赖文件的 conda 环境。\n\n```sh\nconda env create -p .\u002Fenv -f .\u002Fenvironment.yml\nconda env update -f environment-dev.yml\n```\n\n### 设置 wandb（可选）\n\n首先，在 `https:\u002F\u002F\u003Cyour-org>.wandb.io\u002F` 或公共 wandb 上注册账号，获取 API 密钥，然后运行以下命令：\n\n```sh\nwandb login --host https:\u002F\u002F\u003Cyour-org>.wandb.io\n```\n\n若要禁用 wandb，可选择以下任一方法：\n\n1. 在 shell 中设置 `export WANDB_MODE=disabled`，或将此设置添加到 `~\u002F.zshrc` 或 `~\u002F.bashrc` 文件中。记得使用 `source ~\u002F.zshrc` 重新加载配置。\n2. 将 `vidur\u002Fconfig\u002Fdefault.yml` 中的 `wandb_project` 和 `wandb_group` 设置为空字符串。同时，从调用模拟器的 shell 命令中移除这些 CLI 参数。\n\n## 运行模拟器\n\n要运行模拟器，从仓库根目录执行以下命令：\n\n```sh\npython -m vidur.main\n```\n\n或者使用包含所有参数的完整示例：\n\n```sh\npython -m vidur.main  \\\n--replica_config_device a100 \\\n--replica_config_model_name meta-llama\u002FMeta-Llama-3-8B \\\n--cluster_config_num_replicas 1 \\\n--replica_config_tensor_parallel_size 1 \\\n--replica_config_num_pipeline_stages 1 \\\n--request_generator_config_type synthetic \\\n--synthetic_request_generator_config_num_requests 512  \\\n--length_generator_config_type trace \\\n--trace_request_length_generator_config_max_tokens 16384 \\\n--trace_request_length_generator_config_trace_file .\u002Fdata\u002Fprocessed_traces\u002Fsplitwise_conv.csv \\\n--interval_generator_config_type poisson \\\n--poisson_request_interval_generator_config_qps 6.45 \\\n--replica_scheduler_config_type sarathi  \\\n--sarathi_scheduler_config_batch_size_cap 512  \\\n--sarathi_scheduler_config_chunk_size 512 \\\n--random_forrest_execution_time_predictor_config_prediction_max_prefill_chunk_size 16384 \\\n--random_forrest_execution_time_predictor_config_prediction_max_batch_size 512 \\\n--random_forrest_execution_time_predictor_config_prediction_max_tokens_per_request 16384\n```\n\n或者获取所有参数的信息：\n\n```sh\npython -m vidur.main -h\n```\n\n## 模拟器输出\n\n* 指标将直接记录到 wandb，并会在 `simulator_output\u002F\u003CTIMESTAMP>` 目录中保存一份副本。__所有记录指标的描述可在 [这里](docs\u002Fmetrics.md) 查看。__\n* Vidur 会导出每次模拟的 Chrome 跟踪文件。跟踪文件位于 `simulator_output` 目录中。您可以通过导航至 `chrome:\u002F\u002Ftracing\u002F` 或 `edge:\u002F\u002Ftracing\u002F` 并加载跟踪文件来查看。\n\n    ![Chrome 跟踪](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_readme_978c5c821c7c.png)\n\n## 格式化代码\n\n要格式化代码，执行以下命令：\n\n```sh\nmake format\n```\n\n## 使用 Canary 版本\n\n我们一直在对模拟器进行多项改进，包括支持前缀缓存、不同的路由策略、降低模拟器的内存需求等。然而，目前仍有一些未完全解决的问题。在此期间，如果您需要这些功能的支持，请使用 `canary` 分支。\n\n## 贡献\n\n本项目欢迎贡献和建议。大多数贡献都需要您签署贡献者许可协议（CLA），声明您有权且确实将您的贡献的使用权利授予我们。有关详细信息，请访问 https:\u002F\u002Fcla.opensource.microsoft.com。\n\n当您提交拉取请求时，CLA 机器人会自动判断您是否需要提供 CLA，并相应地为 PR 添加标记（例如状态检查、评论）。请按照机器人提供的指示操作。对于使用我们 CLA 的所有仓库，您只需执行此操作一次。\n\n本项目已采用 [微软开源行为准则](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002F)。如需更多信息，请参阅 [行为准则常见问题解答](https:\u002F\u002Fopensource.microsoft.com\u002Fcodeofconduct\u002Ffaq\u002F)，或发送电子邮件至 [opencode@microsoft.com](mailto:opencode@microsoft.com) 咨询更多问题或意见。\n\n## 商标\n\n本项目可能包含项目、产品或服务的商标或徽标。未经授权使用微软商标或徽标须遵守并遵循 [微软商标与品牌指南](https:\u002F\u002Fwww.microsoft.com\u002Fen-us\u002Flegal\u002Fintellectualproperty\u002Ftrademarks\u002Fusage\u002Fgeneral)。在本项目的修改版本中使用微软商标或徽标时，不得造成混淆或暗示微软的赞助关系。任何第三方商标或徽标的使用均应遵守该第三方的相关政策。","# Vidur 快速上手指南\n\nVidur 是一个高保真、可扩展的大语言模型（LLM）推理系统模拟器。它无需大量 GPU 资源，即可帮助开发者研究不同负载和配置下的系统性能、进行容量规划以及测试新的调度算法或优化策略（如推测解码）。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**：Linux 或 macOS（Windows 用户建议使用 WSL2）。\n*   **Python 版本**：必须安装 **Python 3.10**。\n    *   *提示：国内用户可使用 [清华大学开源软件镜像站](https:\u002F\u002Fmirrors.tuna.tsinghua.edu.cn\u002Fhelp\u002Fpypi\u002F) 加速 Python 包下载。*\n*   **依赖管理工具**（任选其一，推荐 `mamba` 或 `venv`）：\n    *   `mamba` (推荐，速度快)\n    *   `venv` (Python 内置)\n    *   `conda` (不推荐，速度较慢)\n\n## 安装步骤\n\n### 方式一：使用 Mamba（推荐）\n\nMamba 是 conda 的快速替代品，能显著缩短环境创建时间。\n\n```bash\n# 创建环境\nmamba env create -p .\u002Fenv -f .\u002Fenvironment.yml\n\n# 更新开发依赖\nmamba env update -f environment-dev.yml\n\n# 激活环境\nmamba activate .\u002Fenv\n```\n\n### 方式二：使用 Venv\n\n如果您偏好使用 Python 原生虚拟环境：\n\n```bash\n# 1. 进入项目根目录\ncd \u003Cvidur-repo-root>\n\n# 2. 创建虚拟环境 (确保 python 命令指向 3.10 版本)\npython3.10 -m venv .venv\n\n# 3. 激活环境\nsource .venv\u002Fbin\u002Factivate\n\n# 4. 安装依赖 (建议配置国内 pip 源)\n# export PIP_INDEX_URL=https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\npython -m pip install -r requirements.txt\n```\n\n### 可选：配置 WandB (实验追踪)\n\nVidur 默认将指标记录到 WandB。如需使用，请先登录：\n\n```bash\nwandb login --host https:\u002F\u002F\u003Cyour-org>.wandb.io\n```\n\n若不需要 WandB，可通过设置环境变量禁用：\n```bash\nexport WANDB_MODE=disabled\n```\n\n## 基本使用\n\n安装完成后，您可以直接运行模拟器。以下是几种常用的运行方式：\n\n### 1. 运行默认示例\n使用默认配置文件运行最简单的模拟：\n\n```bash\npython -m vidur.main\n```\n\n### 2. 运行自定义配置示例\n以下命令演示了如何模拟 `Llama-3-8B` 模型在单张 `A100` 显卡上，使用 `Sarathi` 调度器处理合成请求的场景：\n\n```bash\npython -m vidur.main  \\\n--replica_config_device a100 \\\n--replica_config_model_name meta-llama\u002FMeta-Llama-3-8B \\\n--cluster_config_num_replicas 1 \\\n--replica_config_tensor_parallel_size 1 \\\n--replica_config_num_pipeline_stages 1 \\\n--request_generator_config_type synthetic \\\n--synthetic_request_generator_config_num_requests 512  \\\n--length_generator_config_type trace \\\n--trace_request_length_generator_config_max_tokens 16384 \\\n--trace_request_length_generator_config_trace_file .\u002Fdata\u002Fprocessed_traces\u002Fsplitwise_conv.csv \\\n--interval_generator_config_type poisson \\\n--poisson_request_interval_generator_config_qps 6.45 \\\n--replica_scheduler_config_type sarathi  \\\n--sarathi_scheduler_config_batch_size_cap 512  \\\n--sarathi_scheduler_config_chunk_size 512 \\\n--random_forrest_execution_time_predictor_config_prediction_max_prefill_chunk_size 16384 \\\n--random_forrest_execution_time_predictor_config_prediction_max_batch_size 512 \\\n--random_forrest_execution_time_predictor_config_prediction_max_tokens_per_request 16384\n```\n\n### 3. 查看参数帮助\n查看所有可用的配置参数及其说明：\n\n```bash\npython -m vidur.main -h\n```\n\n### 查看结果\n*   **指标数据**：模拟结束后，指标会自动上传至 WandB（如果已启用），并在本地 `simulator_output\u002F\u003CTIMESTAMP>` 目录下保存副本。\n*   **性能轨迹**：生成的 Chrome Trace 文件位于 `simulator_output` 目录。您可以在 Chrome 或 Edge 浏览器地址栏输入 `chrome:\u002F\u002Ftracing\u002F` 或 `edge:\u002F\u002Ftracing\u002F` 并加载该文件，以可视化分析推理过程中的时间线。","某 AI 初创团队计划将 LLaMA-3-70B 模型部署到生产环境，需在有限的预算下确定最优的 GPU 集群配置与服务并发策略。\n\n### 没有 vidur 时\n- **试错成本极高**：团队必须租用昂贵的 A100\u002FH100 集群进行多轮物理压测，仅验证几种配置就耗费数万美元算力费。\n- **决策缺乏数据支撑**：面对复杂的张量并行（TP）与流水线并行（PP）组合，只能凭经验猜测，无法预知不同并发量下的首字延迟（TTFT）和吞吐量。\n- **新算法验证困难**：想要测试“投机采样”等优化策略的效果，需先投入大量工程时间修改底层推理代码并重新部署环境。\n- **容量规划盲目**：难以准确预估在特定服务质量（如 P99 延迟）要求下，系统到底能承载多少用户请求，容易导致上线后资源浪费或服务雪崩。\n\n### 使用 vidur 后\n- **零显卡成本仿真**：仅需少量初始性能剖析数据，vidur 即可在普通 CPU 上高保真模拟大规模集群表现，将配置验证成本降低近 100%。\n- **精准配置寻优**：通过运行仿真，团队快速定位到\"4xA100 节点上 TP2-PP2\"是性价比最高的部署方案，并清晰掌握了该配置在 6.45 QPS 下的延迟分布。\n- **敏捷科研迭代**：研究人员直接在配置文件中调整调度算法或开启投机解码参数，几分钟内即可对比出新策略对端到端延迟的具体提升幅度。\n- **科学容量规划**：基于 Azure 真实流量轨迹的模拟结果，团队精确计算出满足 SLA 所需的机器数量，避免了过度采购。\n\nvidur 让团队在不消耗一张额外 GPU 的前提下，以数据驱动的方式完成了从架构选型到性能调优的全链路决策。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmicrosoft_vidur_b2758ed2.png","microsoft","Microsoft","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmicrosoft_4900709c.png","Open source projects and samples from Microsoft",null,"opensource@microsoft.com","OpenAtMicrosoft","https:\u002F\u002Fopensource.microsoft.com","https:\u002F\u002Fgithub.com\u002Fmicrosoft",[85,89,93],{"name":86,"color":87,"percentage":88},"Python","#3572A5",99.4,{"name":90,"color":91,"percentage":92},"HTML","#e34c26",0.5,{"name":94,"color":95,"percentage":96},"Makefile","#427819",0.1,573,105,"2026-04-05T13:13:07","MIT","未说明","模拟器运行本身不需要 GPU（仅在初始性能分析阶段需要）。支持分析的硬件包括：NVIDIA A100 80GB, H100, A40。支持单卡或多卡配置（如 4xA100, 8xA100），支持 NVLink 互联。",{"notes":104,"python":105,"dependencies":106},"1. 核心特性：这是一个高保真 LLM 推理系统模拟器，除了快速的初始性能分析阶段外，运行模拟无需访问物理 GPU。\n2. 环境搭建：推荐使用 mamba 创建环境，也可使用 venv（必须 Python 3.10）或 conda。\n3. 模型支持：内置支持 Llama-3 (8B\u002F70B), Llama-2, CodeLlama, InternLM, Qwen 等模型在 A100\u002FH100\u002FA40 上的配置。\n4. 并行策略：支持张量并行 (TP) 和流水线并行 (PP)，具体支持的 TP 度数取决于节点类型（DGX 节点支持 TP1\u002F2\u002F4\u002F8，4 卡节点支持 TP1\u002F2\u002F4）。\n5. 上下文长度：默认最大上下文为 4k，Llama-3 系列可通过 CLI 参数扩展至 16k。\n6. 输出：指标可记录到 wandb 或本地目录，并导出 Chrome Trace 文件用于可视化分析。","3.10",[107,108],"mamba\u002Fconda (环境管理)","wandb (可选，用于日志记录)",[54,13,26],[111,112,113,114,115],"inference","llm","simulation","transformer","vllm","2026-03-27T02:49:30.150509","2026-04-06T08:38:27.617788",[119,124,129,134,138,142],{"id":120,"question_zh":121,"answer_zh":122,"source_url":123},18317,"遇到 'Error: can't register atexit after shutdown' 或 IPython.core.display 导入错误怎么办？","该问题通常由 `kaleido` 依赖引起。解决方法有两种：\n1. 降级 `kaleido` 到 0.2.1 版本：运行命令 `pip install -U kaleido==0.2.1`。\n2. 升级到 Vidur 的最新主要版本（见 PR #56），新版本已改用基于 `matplotlib` 的 `seaborn`，不再依赖 `kaleido`，从而彻底解决此问题。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvidur\u002Fissues\u002F38",{"id":125,"question_zh":126,"answer_zh":127,"source_url":128},18318,"如何运行参数量超过 30B 的大模型（如 Llama-2-70b）？","运行大模型时需注意张量并行度（tensor parallel degree）的配置。例如，Llama-2-70b 的配置文件目前仅记录了张量并行度为 4 的性能数据。请在配置文件（如 default.yml）中设置 `num_tensor_parallel_workers: 4` 即可成功运行。项目计划支持更多模型和并行组合，但目前需匹配已有的性能分析数据配置。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvidur\u002Fissues\u002F9",{"id":130,"question_zh":131,"answer_zh":132,"source_url":133},18319,"vLLM 调度器中 prefill token 数量的估算逻辑是乘以最大值还是求和？","在 Vidur 的 vLLM 调度器实现中（`vidur\u002Fscheduler\u002Freplica_scheduler\u002Fvllm_replica_scheduler.py`），prefill 阶段的 token 数量估算采用了 `len(new_num_tokens) * max(new_num_tokens)` 的方式。这是因为 vLLM 在某个时间点引入了填充（padding）机制，因此使用最大值乘以数量而非求和，以模拟 vLLM 的实际行为。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fvidur\u002Fissues\u002F74",{"id":135,"question_zh":136,"answer_zh":137,"source_url":128},18320,"项目支持哪些大语言模型和硬件配置组合？","项目原则上没有根本性的限制，但支持的完整性取决于已有的性能分析数据（profiling data）。目前核心支持约 5-10 个主流模型的各种 SKU 和并行组合。如果某些模型\u002F硬件\u002F并行度的组合缺少分析数据，可能无法直接运行。社区可以贡献额外的数据来扩展支持范围，建议查阅最新文档了解当前支持的核心模型集。",{"id":139,"question_zh":140,"answer_zh":141,"source_url":123},18321,"如何配置虚拟环境并安装 Vidur 的开发依赖？","可以使用 conda 创建环境并安装依赖。步骤如下：\n1. 创建环境：`conda env create -f environment-dev.yml`\n2. 激活环境后安装基础依赖：`pip install -r requirement.txt`\n3. 安装开发依赖：`pip install -r requirement_dev.txt`\n如果遇到绘图相关错误，可能需要额外处理 `kaleido` 版本或升级 Vidur。",{"id":143,"question_zh":144,"answer_zh":145,"source_url":128},18322,"Vidur 模拟器支持哪些请求生成器和间隔生成器配置？","Vidur 支持多种请求生成策略。在 YAML 配置文件中可指定：\n- 请求生成器 (`request_generator`)：支持 `synthetic`（合成）或基于 trace 的文件。\n- 长度生成器：支持 `trace`（基于轨迹文件）、`zipf` 分布或 `fixed`（固定长度）。\n- 间隔生成器：支持 `poisson`（泊松分布）、`gamma` 分布或基于 `trace` 文件的时间间隔。\n用户需在配置文件中明确指定对应的 provider 及相关参数（如 qps, theta, trace_file 路径等）。",[]]