[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-MoonshotAI--checkpoint-engine":3,"tool-MoonshotAI--checkpoint-engine":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",154349,2,"2026-04-13T23:32:16",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":76,"owner_website":77,"owner_url":78,"languages":79,"stars":84,"forks":85,"last_commit_at":86,"license":87,"difficulty_score":88,"env_os":89,"env_gpu":90,"env_ram":91,"env_deps":92,"category_tags":100,"github_topics":76,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":101,"updated_at":102,"faqs":103,"releases":132},7323,"MoonshotAI\u002Fcheckpoint-engine","checkpoint-engine","Checkpoint-engine is a simple middleware to update model weights in LLM inference engines","checkpoint-engine 是一款专为大语言模型推理引擎设计的轻量级中间件，核心功能是实现模型权重的快速原地更新。在强化学习等场景中，模型需要频繁迭代权重，传统方式往往耗时较长且影响服务连续性，而 checkpoint-engine 正是为了解决这一效率瓶颈而生。\n\n该工具主要面向 AI 基础设施开发者、大模型研究人员以及需要构建高可用推理系统的工程师。它提供了两种高效的更新模式：广播模式适用于大规模集群同步更新，速度极快；点对点（P2P）模式则利用 Mooncake 传输引擎，支持在不中断现有服务的前提下，动态向新加入的实例分发权重，非常适合弹性扩缩容场景。\n\n其技术亮点在于高度优化的数据传输流水线。通过将权重迁移划分为主机到设备、集群广播和引擎重载三个阶段，并采用通信与计算重叠的策略，极大提升了吞吐量。实测数据显示，即使在数千张 GPU 上更新万亿参数的 Kimi-K2 模型，也仅需约 20 秒。当显存资源紧张时，它还能自动降级为串行执行以确保稳定性。对于追求极致推理性能和灵活性的团队来说，这是一个非常实用的底层加速组件。","# Checkpoint Engine\nCheckpoint-engine is a simple middleware to update model weights in LLM inference engines -- a critical step in reinforcement learning.\nWe provide an efficient and lightweight implementation for inplace weight update:\nupdating our [Kimi-K2](https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002FKimi-K2) model (1 Trillion parameters) across thousands of GPUs takes about 20s.\n\n\n\u003Cdiv align=\"center\">\n  \u003Cpicture>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FMoonshotAI_checkpoint-engine_readme_b515d96d8834.png\" width=\"80%\" alt=\"ckpt-engine\">\n  \u003C\u002Fpicture>\n\u003C\u002Fdiv>\n\n## Architecture\n\nThe core weight update logic is in `ParameterServer` class, a service colocated with inference engines. It provides two implementations of weight update: Broadcast and P2P.\n\n- **Broadcast**: Used when a large number of inference instances need to update weights in synchronous. This is the fastest implementation and should be used as the default update method. See `_update_per_bucket` with `ranks == None or []`.\n- **P2P**: Used when new inference instances are dynamically added (due to restarts or dynamic availability) while the existing instances are already serving requests. Under this scenario, to avoid affecting the workloads on existing instances, we use the [`mooncake-transfer-engine`](https:\u002F\u002Fgithub.com\u002Fkvcache-ai\u002FMooncake?tab=readme-ov-file#use-python-package) to P2P send weights from CPUs in existing instances to GPUs in new instances. See `_update_per_bucket` with `ranks` specified.\n\n### Optimized Weight Broadcast\nIn the *Broadcast* implementation, the checkpoint-engine holds references to sharded weights in CPU memory, and need to efficiently broadcast them to a cluster of inference instances, often under a different sharding pattern.\nWe arrange the data transfer into 3 stages:\n1. H2D: moving weights to GPU memory. These weights may come from disk or the training engine.\n2. broadcast: broadcast among checkpoint engine workers; the data results in a CUDA IPC buffer shared with inference engine.\n3. reload: inference engine decides what subset of weights to copy from the broadcasted data.\n\nCheckpoint-engine orchestrates the entire transfer process. It first gathers necessary metadata to create a plan, including deciding the proper bucket size for data transfer.\nIt then executes the transfer, where it controls the inference engine through a ZeroMQ socket. To maximize performance, it organizes the data transfers into a pipeline with overlapped communication and copy, illustrated below. The details can be found in [Kimi-K2 Technical Report](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.20534).\n\n\n\u003Cdiv align=\"center\">\n  \u003Cpicture>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FMoonshotAI_checkpoint-engine_readme_a61ac1d8948c.png\" width=\"80%\" alt=\"pipeline\">\n  \u003C\u002Fpicture>\n\u003C\u002Fdiv>\n\nPipelining naturally requires more GPU memory. When memory is not enough, checkpoint-engine will fallback to serial execution.\n\n### Optimized P2P Bucket Assignment\nIn the *P2P* implementation, checkpoint-engine needs to send weights from existing instances to new instances.\nTo minimize the overall transfer time, checkpoint-engine optimizes the bucket assignment for each sender-receiver pair.\nThe optimization goal is to make full use of the available network bandwidth for each sender and receiver.\nSee [issue #25](https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fissues\u002F25)\n\n## Benchmark\n\n| Model                                | Device Info  | GatherMetas | Update (Broadcast) | Update (P2P)            |\n| :----------------------------------- | :----------- | :---------- |:-------------------| :---------------------- |\n| GLM-4.5-Air (BF16)                   | 8xH800 TP8   | 0.12s       | 3.47s (3.02GiB)    | 4.12s (3.02GiB)         |\n| Qwen3-235B-A22B-Instruct-2507 (BF16) | 8xH800 TP8   | 0.33s       | 6.22s (2.67GiB)    | 7.10s (2.68GiB)         |\n| DeepSeek-V3.1 (FP8)                  | 16xH20 TP16  | 1.17s       | 10.19s (5.39GiB)   | 11.80s (5.41GiB)        |\n| Kimi-K2-Instruct (FP8)               | 16xH20 TP16  | 1.33s       | 14.36s (5.89GiB)   | 17.49s (5.91GiB)        |\n| DeepSeek-V3.1 (FP8)                  | 256xH20 TP16 | 0.80s       | 11.33s (8.00GiB)   | 11.81s (8.00GiB)        |\n| Kimi-K2-Instruct (FP8)               | 256xH20 TP16 | 1.22s       | 16.04s (8.00GiB)   | 16.75s (8.00GiB)        |\n\nAll results above are tested by [`examples\u002Fupdate.py`](.\u002Fexamples\u002Fupdate.py) and use [vLLM v0.10.2rc1](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm\u002Ftree\u002Fv0.10.2rc1) as inference engine. Some notes:\n\n* FP8 test needs additional vLLM patches, see [FP8 quantization](#fp8-quantization).\n* Device Info: we tested various combination of devices and parallelism setups. For example, a 256-GPU TP16 setup means that we deploy 16 vLLM instances, each with 16-way tensor parallelism.\n* Since update duration is related to IPC bucket size, we provide the bucket size in the table.\n* The P2P time were tested for updating no more than two nodes (16 GPUs) (`ParameterServer.update(ranks=range(0, 16))`) out of the entire cluster.\n* We bind each GPU to its corresponding NUMA node to ensure stable H2D transfer speeds.\n\n## Installation\n\nUse the fastest broadcast implementation\n\n```Bash\npip install checkpoint-engine\n```\n\nUse the flexible P2P implementation, notice this will install `mooncake-transfer-engine` to support RDMA transfer between different ranks.\n\n```Bash\npip install 'checkpoint-engine[p2p]'\n```\n\n## Getting Started\n\nPrepare an H800 or H20 machine with 8 GPUs with vLLM. Be sure to include [\u002Fcollective_rpc API endpoint](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm\u002Fcommit\u002Ff7cf5b512ee41f36613deb2471a44de5f304f70d) commit (available in main branch) since checkpoint-engine will use this endpoint to update weights. vLLM version `v0.10.2` is fully tested and recommended.\n\n```Bash\nmkdir -p \u002Fopt\u002FvLLM && cd \u002Fopt\u002FvLLM\nuv venv --python 3.12 --seed\nsource .venv\u002Fbin\u002Factivate\nuv pip install vllm==0.10.2\n```\n\nInstall checkpoint-engine\n\n```Bash\nuv pip install 'checkpoint-engine[p2p]'\n```\n\nWe use `Qwen\u002FQwen3-235B-A22B-Instruct-2507` (BF16) as the test model\n\n```Bash\nhf download Qwen\u002FQwen3-235B-A22B-Instruct-2507 --local-dir \u002Fopt\u002Fmodels\u002FQwen\u002FQwen3-235B-A22B-Instruct-2507\u002F\n```\n\nStart vLLM in dev mode and set `--load-format dummy`. Notice that we also set `--worker-extension-cls=checkpoint_engine.worker.VllmColocateWorkerExtension`\n\n```Bash\nVLLM_SERVER_DEV_MODE=1 python3 -m vllm.entrypoints.openai.api_server --host 0.0.0.0 --port 19730 --trust-remote-code \\\n    --tensor-parallel-size=8 --max-model-len 4096 --load-format dummy \\\n    --served-model-name checkpoint-engine-demo --model \u002Fopt\u002Fmodels\u002FQwen\u002FQwen3-235B-A22B-Instruct-2507\u002F \\\n    --worker-extension-cls checkpoint_engine.worker.VllmColocateWorkerExtension\n```\n\nMeanwhile, use this command to update weights by checkpoint-engine. No need to wait for vLLM to get ready.\n\n```Bash\ntorchrun --nproc-per-node 8 examples\u002Fupdate.py --update-method all --checkpoint-path \u002Fopt\u002Fmodels\u002FQwen\u002FQwen3-235B-A22B-Instruct-2507\u002F\n```\n\n### Reuse weights from existing instances\n\nNew checkpoint-engine instances can join existing instances and reuse their weights. This is simple to achieve.\n\nFirst, start the existing instances with `--save-metas-file global_metas.pkl` to save global metas to a file and use `--sleep-time 300` to make sure they stay alive.\n\n```Bash\ntorchrun --nproc-per-node 8 examples\u002Fupdate.py --checkpoint-path $MODEL_PATH \\\n    --sleep-time 300 --save-metas-file global_metas.pkl\n```\n\nAfter a checkpoint is registered, new instances can obtain a copy of the checkpoint by setting `--load-metas-file global_metas.pkl`.\n\n```Bash\ntorchrun --nproc-per-node 8 examples\u002Fupdate.py --load-metas-file global_metas.pkl\n```\n\n### FP8 quantization\n\nFP8 quantization currently do not natively work in vLLM when updating weights.\nWe provide a simple patch in [`patches\u002Fvllm_fp8.patch`](.\u002Fpatches\u002Fvllm_fp8.patch) to handle the correct weight update.\nNotice this patch is only tested in DeepSeek-V3.1 and Kimi-K2. Other models may meet some compatible issues.\n\nA [PR](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm\u002Fpull\u002F24488) is opened to the vLLM project and waiting to discuss and review.\n\n### Test\n\nRun a simple correctness test for checkpoint_engine\n\n```bash\npytest tests\u002Ftest_update.py\n```\n\n`test_update.py` are only designed to run with `pytest`. Please don't run it directly with `torchrun`.\n\nOther unit tests can also be done with pytest. Only test_update.py requires GPUs, other tests can be run on CPUs. Only to run CPU tests, use:\n\n```bash\npytest tests\u002F -m \"not gpu\"\n```\n\n### Environment Variables\n- `PS_MAX_BUCKET_SIZE_GB`: An integer is used to set the maximum bucket size for checkpoint-engine. If not set, 8GB is used as default.\n- `PS_P2P_STORE_RDMA_DEVICES`: Comma-separated RDMA devices' names for P2P transfer. If not set, checkpoint-engine will fall back to use `NCCL_IB_HCA` to detect RDMA devices.\n- `NCCL_IB_HCA`: Available patterns can be found from [NCCL documentation](https:\u002F\u002Fdocs.nvidia.com\u002Fdeeplearning\u002Fnccl\u002Fuser-guide\u002Fdocs\u002Fenv.html#id8). If also not set, all RDMA devices will be used and divided evenly among the ranks.\n\n## SGLang Integration\n\nCheckpoint Engine provides efficient distributed checkpoint loading for SGLang inference servers, significantly reducing model loading time for large models and multi-node setups.\n\n### Quick Start\n\n**1. Install checkpoint-engine:**\n```bash\npip install 'checkpoint-engine[p2p]'\n```\n\n**2. Launch SGLang server:**\n```bash\npython -m sglang.launch_server \\\n    --model-path $MODEL_PATH \\\n    --tp 8 \\\n    --load-format dummy \\\n    --wait-for-initial-weights\n```\n\n**3. Run checkpoint engine:**\n```bash\npython -m sglang.srt.checkpoint_engine.update \\\n    --update-method broadcast \\\n    --checkpoint-path $MODEL_PATH \\\n    --inference-parallel-size 8\n```\n\n### Multi-Node Setup\n\nFor 2-node setup, run the same commands on both nodes with appropriate `--host` and distributed training parameters.\n\n### Key Options\n\n**SGLang Server:**\n- `--wait-for-initial-weights`: Wait for checkpoint engine before becoming ready\n- `--load-format dummy`: Enable overlapping initialization tasks\n\n**Checkpoint Engine:**\n- `--update-method`: Choose `broadcast`, `p2p`, or `all`\n- `--inference-parallel-size`: Number of parallel processes\n- `--checkpoint-path`: Model checkpoint directory\n\n## Limitations and Future Work\n\n- This project is currently tested with vLLM and SGLang. Integration with other frameworks is planned for future releases.\n- The perfect three-stage pipeline mentioned in our paper is currently not implemented. This could be useful for architectures where H2D and broadcast do not conflict in PCIE.\n\n## Acknowledgments\n\nThis open source project uses the same vLLM interface in https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm\u002Fpull\u002F24295 . Thanks for the comments and insights from [youkaichao](https:\u002F\u002Fgithub.com\u002Fyoukaichao).\n","# 检查点引擎\nCheckpoint-engine 是一种简单的中间件，用于在 LLM 推理引擎中更新模型权重——这是强化学习中的关键步骤。\n我们提供了一种高效轻量级的原地权重更新实现：\n在数千张 GPU 上更新我们的 [Kimi-K2](https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002FKimi-K2) 模型（1 万亿参数）大约需要 20 秒。\n\n\n\u003Cdiv align=\"center\">\n  \u003Cpicture>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FMoonshotAI_checkpoint-engine_readme_b515d96d8834.png\" width=\"80%\" alt=\"ckpt-engine\">\n  \u003C\u002Fpicture>\n\u003C\u002Fdiv>\n\n## 架构\n\n核心权重更新逻辑位于 `ParameterServer` 类中，该服务与推理引擎部署在一起。它提供了两种权重更新实现：广播和 P2P。\n\n- **广播**：当大量推理实例需要同步更新权重时使用。这是最快的实现方式，应作为默认的更新方法。参见 `_update_per_bucket` 中 `ranks == None or []` 的情况。\n- **P2P**：当新的推理实例动态加入（由于重启或动态可用性）而现有实例已经在处理请求时使用。在这种情况下，为避免影响现有实例的工作负载，我们使用 [`mooncake-transfer-engine`](https:\u002F\u002Fgithub.com\u002Fkvcache-ai\u002FMooncake?tab=readme-ov-file#use-python-package) 将现有实例 CPU 上的权重通过 P2P 方式传输到新实例的 GPU 上。参见 `_update_per_bucket` 中指定了 `ranks` 的情况。\n\n### 优化的权重广播\n在 *广播* 实现中，checkpoint-engine 会持有 CPU 内存中分片权重的引用，并需要将它们高效地广播到一组推理实例上，这些实例通常采用不同的分片模式。\n我们将数据传输分为三个阶段：\n1. H2D：将权重移动到 GPU 内存。这些权重可能来自磁盘或训练引擎。\n2. 广播：在 checkpoint-engine 工作节点之间进行广播；数据结果是一个与推理引擎共享的 CUDA IPC 缓冲区。\n3. 重载：推理引擎决定从广播的数据中复制哪些权重子集。\nCheckpoint-engine 协调整个传输过程。它首先收集必要的元数据以制定计划，包括确定合适的数据传输桶大小。\n然后执行传输，期间通过 ZeroMQ 套接字控制推理引擎。为了最大化性能，它将数据传输组织成一个通信与拷贝重叠的流水线，如下图所示。详细信息可在 [Kimi-K2 技术报告](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.20534) 中找到。\n\n\n\u003Cdiv align=\"center\">\n  \u003Cpicture>\n      \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FMoonshotAI_checkpoint-engine_readme_a61ac1d8948c.png\" width=\"80%\" alt=\"pipeline\">\n  \u003C\u002Fpicture>\n\u003C\u002Fdiv>\n\n流水线操作自然需要更多的 GPU 内存。当内存不足时，checkpoint-engine 会回退到串行执行。\n\n### 优化的 P2P 分桶分配\n在 *P2P* 实现中，checkpoint-engine 需要将权重从现有实例发送到新实例。\n为了最小化整体传输时间，checkpoint-engine 会为每对发送方和接收方优化分桶分配。\n优化目标是充分利用每个发送方和接收方的可用网络带宽。\n详情请参阅 [issue #25](https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fissues\u002F25)。\n\n## 基准测试\n\n| 模型                                | 设备信息  | GatherMetas | 更新（广播） | 更新（P2P）            |\n| :----------------------------------- | :----------- | :---------- |:-------------------| :---------------------- |\n| GLM-4.5-Air (BF16)                   | 8xH800 TP8   | 0.12s       | 3.47s (3.02GiB)    | 4.12s (3.02GiB)         |\n| Qwen3-235B-A22B-Instruct-2507 (BF16) | 8xH800 TP8   | 0.33s       | 6.22s (2.67GiB)    | 7.10s (2.68GiB)         |\n| DeepSeek-V3.1 (FP8)                  | 16xH20 TP16  | 1.17s       | 10.19s (5.39GiB)   | 11.80s (5.41GiB)        |\n| Kimi-K2-Instruct (FP8)               | 16xH20 TP16  | 1.33s       | 14.36s (5.89GiB)   | 17.49s (5.91GiB)        |\n| DeepSeek-V3.1 (FP8)                  | 256xH20 TP16 | 0.80s       | 11.33s (8.00GiB)   | 11.81s (8.00GiB)        |\n| Kimi-K2-Instruct (FP8)               | 256xH20 TP16 | 1.22s       | 16.04s (8.00GiB)   | 16.75s (8.00GiB)        |\n\n以上所有结果均由 [`examples\u002Fupdate.py`](.\u002Fexamples\u002Fupdate.py) 测试，并使用 [vLLM v0.10.2rc1](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm\u002Ftree\u002Fv0.10.2rc1) 作为推理引擎。几点说明：\n\n* FP8 测试需要额外的 vLLM 补丁，详见 [FP8 量化](#fp8-quantization)。\n* 设备信息：我们测试了多种设备和并行化设置的组合。例如，256-GPU TP16 设置意味着我们部署了 16 个 vLLM 实例，每个实例都采用 16 路张量并行。\n* 由于更新时长与 IPC 桶大小有关，我们在表中提供了桶大小。\n* P2P 时间是在不超过两个节点（16 张 GPU）(`ParameterServer.update(ranks=range(0, 16))`) 的范围内测试的。\n* 我们将每张 GPU 绑定到其对应的 NUMA 节点，以确保稳定的 H2D 传输速度。\n\n## 安装\n\n使用最快的广播实现\n\n```Bash\npip install checkpoint-engine\n```\n\n使用灵活的 P2P 实现，请注意这将安装 `mooncake-transfer-engine` 以支持不同 Rank 之间的 RDMA 传输。\n\n```Bash\npip install 'checkpoint-engine[p2p]'\n```\n\n## 入门指南\n\n准备一台配备 8 张 GPU 和 vLLM 的 H800 或 H20 机器。务必包含 [\u002Fcollective_rpc API 端点](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm\u002Fcommit\u002Ff7cf5b512ee41f36613deb2471a44de5f304f70d) 提交（已在主分支中可用），因为 checkpoint-engine 将使用此端点来更新权重。vLLM 版本 `v0.10.2` 已经过全面测试并推荐使用。\n\n```Bash\nmkdir -p \u002Fopt\u002FvLLM && cd \u002Fopt\u002FvLLM\nuv venv --python 3.12 --seed\nsource .venv\u002Fbin\u002Factivate\nuv pip install vllm==0.10.2\n```\n\n安装 checkpoint-engine\n\n```Bash\nuv pip install 'checkpoint-engine[p2p]'\n```\n\n我们使用 `Qwen\u002FQwen3-235B-A22B-Instruct-2507` (BF16) 作为测试模型\n\n```Bash\nhf download Qwen\u002FQwen3-235B-A22B-Instruct-2507 --local-dir \u002Fopt\u002Fmodels\u002FQwen\u002FQwen3-235B-A22B-Instruct-2507\u002F\n```\n\n以开发模式启动 vLLM，并设置 `--load-format dummy`。请注意，我们还设置了 `--worker-extension-cls=checkpoint_engine.worker.VllmColocateWorkerExtension`\n\n```Bash\nVLLM_SERVER_DEV_MODE=1 python3 -m vllm.entrypoints.openai.api_server --host 0.0.0.0 --port 19730 --trust-remote-code \\\n    --tensor-parallel-size=8 --max-model-len 4096 --load-format dummy \\\n    --served-model-name checkpoint-engine-demo --model \u002Fopt\u002Fmodels\u002FQwen\u002FQwen3-235B-A22B-Instruct-2507\u002F \\\n    --worker-extension-cls checkpoint_engine.worker.VllmColocateWorkerExtension\n```\n\n与此同时，使用以下命令由 checkpoint-engine 更新权重。无需等待 vLLM 准备就绪。\n\n```Bash\ntorchrun --nproc-per-node 8 examples\u002Fupdate.py --update-method all --checkpoint-path \u002Fopt\u002Fmodels\u002FQwen\u002FQwen3-235B-A22B-Instruct-2507\u002F\n```\n\n### 重用现有实例的权重\n\n新的 checkpoint-engine 实例可以加入现有的实例，并重用它们的权重。实现起来非常简单。\n\n首先，使用 `--save-metas-file global_metas.pkl` 启动现有实例，将全局元数据保存到文件中，并通过 `--sleep-time 300` 确保它们保持运行状态。\n\n```Bash\ntorchrun --nproc-per-node 8 examples\u002Fupdate.py --checkpoint-path $MODEL_PATH \\\n    --sleep-time 300 --save-metas-file global_metas.pkl\n```\n\n在检查点注册完成后，新实例可以通过设置 `--load-metas-file global_metas.pkl` 来获取检查点的副本。\n\n```Bash\ntorchrun --nproc-per-node 8 examples\u002Fupdate.py --load-metas-file global_metas.pkl\n```\n\n### FP8 量化\n\n目前，在更新权重时，FP8 量化在 vLLM 中无法原生工作。我们提供了一个简单的补丁 [`patches\u002Fvllm_fp8.patch`](.\u002Fpatches\u002Fvllm_fp8.patch)，用于正确处理权重更新。请注意，此补丁仅在 DeepSeek-V3.1 和 Kimi-K2 上进行了测试，其他模型可能会遇到兼容性问题。\n\n我们已向 vLLM 项目提交了一个 [PR](https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm\u002Fpull\u002F24488)，目前正在等待讨论和审查。\n\n### 测试\n\n运行一个简单的 checkpoint_engine 正确性测试：\n\n```bash\npytest tests\u002Ftest_update.py\n```\n\n`test_update.py` 仅设计为与 pytest 一起运行，请勿直接使用 torchrun 运行。\n\n其他单元测试也可以使用 pytest 完成。只有 test_update.py 需要 GPU，其他测试可以在 CPU 上运行。如果仅需运行 CPU 测试，可使用以下命令：\n\n```bash\npytest tests\u002F -m \"not gpu\"\n```\n\n### 环境变量\n- `PS_MAX_BUCKET_SIZE_GB`：用于设置 checkpoint-engine 的最大分桶大小的整数。若未设置，则默认为 8GB。\n- `PS_P2P_STORE_RDMA_DEVICES`：用于 P2P 传输的 RDMA 设备名称，以逗号分隔。若未设置，checkpoint-engine 将回退到使用 `NCCL_IB_HCA` 自动检测 RDMA 设备。\n- `NCCL_IB_HCA`：可用模式可参考 [NCCL 文档](https:\u002F\u002Fdocs.nvidia.com\u002Fdeeplearning\u002Fnccl\u002Fuser-guide\u002Fdocs\u002Fenv.html#id8)。若也未设置，则会使用所有 RDMA 设备，并均匀分配给各个进程。\n\n## SGLang 集成\n\nCheckpoint Engine 为 SGLang 推理服务器提供了高效的分布式检查点加载功能，显著减少了大型模型和多节点部署下的模型加载时间。\n\n### 快速开始\n\n**1. 安装 checkpoint-engine：**\n```bash\npip install 'checkpoint-engine[p2p]'\n```\n\n**2. 启动 SGLang 服务器：**\n```bash\npython -m sglang.launch_server \\\n    --model-path $MODEL_PATH \\\n    --tp 8 \\\n    --load-format dummy \\\n    --wait-for-initial-weights\n```\n\n**3. 运行 checkpoint engine：**\n```bash\npython -m sglang.srt.checkpoint_engine.update \\\n    --update-method broadcast \\\n    --checkpoint-path $MODEL_PATH \\\n    --inference-parallel-size 8\n```\n\n### 多节点设置\n\n对于 2 节点设置，可在两个节点上分别运行相同的命令，并设置适当的 `--host` 和分布式训练参数。\n\n### 关键选项\n\n**SGLang 服务器：**\n- `--wait-for-initial-weights`：等待 checkpoint engine 完成后再进入就绪状态。\n- `--load-format dummy`：启用初始化任务的重叠执行。\n\n**Checkpoint Engine：**\n- `--update-method`：可选择 `broadcast`、`p2p` 或 `all`。\n- `--inference-parallel-size`：并行进程数。\n- `--checkpoint-path`：模型检查点目录。\n\n## 局限性与未来工作\n- 本项目目前仅在 vLLM 和 SGLang 上进行了测试。与其他框架的集成计划将在未来的版本中实现。\n- 我们论文中提到的完美三阶段流水线目前尚未实现。这可能对那些 H2D 和广播操作在 PCIE 总线上不会产生冲突的架构有所帮助。\n\n## 致谢\n本开源项目使用了与 https:\u002F\u002Fgithub.com\u002Fvllm-project\u002Fvllm\u002Fpull\u002F24295 相同的 vLLM 接口。感谢 [youkaichao](https:\u002F\u002Fgithub.com\u002Fyoukaichao) 提供的评论和见解。","# Checkpoint Engine 快速上手指南\n\nCheckpoint Engine 是一款专为大语言模型（LLM）推理引擎设计的轻量级中间件，用于在强化学习等场景中高效地**原地更新模型权重**。它支持广播（Broadcast）和点对点（P2P）两种更新模式，能在数千张 GPU 上于秒级完成万亿参数模型的权重更新。\n\n## 环境准备\n\n### 系统要求\n- **GPU**: 推荐 NVIDIA H800 或 H20（测试基于 8 卡或多节点集群）。\n- **Python**: 3.12+。\n- **推理框架**: \n  - **vLLM**: 推荐使用 `v0.10.2` 版本（需包含 `collective_rpc` API 支持）。\n  - **SGLang**: 支持分布式检查点加载。\n- **网络**: 若使用 P2P 模式，建议配置 RDMA 网络以获得最佳性能。\n\n### 前置依赖\n确保已安装基础深度学习环境（如 PyTorch, CUDA）。若使用国内网络，建议在 pip 命令中指定清华或阿里镜像源加速下载。\n\n## 安装步骤\n\n根据需求选择安装模式：\n\n**1. 基础模式（仅使用最快的广播更新）**\n```bash\npip install checkpoint-engine -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n**2. 完整模式（支持灵活的 P2P 更新，含 RDMA 传输支持）**\n*推荐安装此版本以兼容动态节点加入场景*\n```bash\npip install 'checkpoint-engine[p2p]' -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n## 基本使用\n\n以下以 **vLLM** 为例，演示如何启动推理服务并实时更新权重。\n\n### 第一步：准备模型与环境\n创建虚拟环境并安装指定版本的 vLLM：\n```bash\nmkdir -p \u002Fopt\u002FvLLM && cd \u002Fopt\u002FvLLM\nuv venv --python 3.12 --seed\nsource .venv\u002Fbin\u002Factivate\nuv pip install vllm==0.10.2 -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\nuv pip install 'checkpoint-engine[p2p]' -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n\n# 下载测试模型 (以 Qwen3 为例)\nhf download Qwen\u002FQwen3-235B-A22B-Instruct-2507 --local-dir \u002Fopt\u002Fmodels\u002FQwen\u002FQwen3-235B-A22B-Instruct-2507\u002F\n```\n\n### 第二步：启动 vLLM 推理服务\n启动时需设置 `--load-format dummy` 并加载 Checkpoint Engine 的 Worker 扩展类，以便接收权重更新指令：\n```bash\nVLLM_SERVER_DEV_MODE=1 python3 -m vllm.entrypoints.openai.api_server --host 0.0.0.0 --port 19730 --trust-remote-code \\\n    --tensor-parallel-size=8 --max-model-len 4096 --load-format dummy \\\n    --served-model-name checkpoint-engine-demo --model \u002Fopt\u002Fmodels\u002FQwen\u002FQwen3-235B-A22B-Instruct-2507\u002F \\\n    --worker-extension-cls checkpoint_engine.worker.VllmColocateWorkerExtension\n```\n\n### 第三步：执行权重更新\n在另一个终端运行更新脚本。无需等待 vLLM 完全就绪，该工具会自动协调权重传输：\n```bash\ntorchrun --nproc-per-node 8 examples\u002Fupdate.py --update-method all --checkpoint-path \u002Fopt\u002Fmodels\u002FQwen\u002FQwen3-235B-A22B-Instruct-2507\u002F\n```\n\n---\n\n### 进阶：SGLang 集成简述\n若使用 SGLang 框架，流程更为简化：\n\n1. **启动 SGLang 服务**：\n   ```bash\n   python -m sglang.launch_server \\\n       --model-path $MODEL_PATH \\\n       --tp 8 \\\n       --load-format dummy \\\n       --wait-for-initial-weights\n   ```\n\n2. **运行更新引擎**：\n   ```bash\n   python -m sglang.srt.checkpoint_engine.update \\\n       --update-method broadcast \\\n       --checkpoint-path $MODEL_PATH \\\n       --inference-parallel-size 8\n   ```\n\n### 常用环境变量\n- `PS_MAX_BUCKET_SIZE_GB`: 设置最大数据桶大小（默认 8GB），可根据显存调整。\n- `NCCL_IB_HCA`: 指定 RDMA 网卡设备，优化多节点传输性能。","某大型 AI 实验室正在基于 Kimi-K2 万亿参数模型进行高强度强化学习（RL）训练，需要频繁将最新权重同步至数千张 GPU 组成的推理集群以进行实时策略评估。\n\n### 没有 checkpoint-engine 时\n- **更新耗时过长**：传统方式在数千卡规模下全量更新权重往往需要数分钟甚至更久，导致 RL 训练循环被迫长时间停顿，严重拖慢迭代速度。\n- **动态扩容困难**：当部分推理节点因故障重启或需动态增加新实例时，难以在不干扰现有服务的情况下完成权重加载，常引发整体服务抖动。\n- **资源利用率低**：缺乏精细化的流水线调度，网络带宽与显存拷贝无法重叠执行，导致昂贵的 H800\u002FH20 显卡在数据搬运期间处于空闲等待状态。\n- **分片适配复杂**：训练端与推理端的权重分片策略往往不同，人工编写转换逻辑极易出错且难以维护，增加了工程落地门槛。\n\n### 使用 checkpoint-engine 后\n- **秒级权重同步**：利用优化的广播机制，即使在数千张 GPU 上更新万亿参数模型，全程也仅需约 20 秒，实现了近乎实时的 RL 反馈闭环。\n- **无感动态接入**：通过 P2P 模式，新加入的推理实例可直接从运行中的旧节点拉取权重，完全不影响现有业务的正常请求处理。\n- **极致流水线性能**：自动规划 H2D 传输、集群广播与重加载的三级流水线，最大化重叠通信与计算，充分榨干硬件带宽潜力。\n- **智能分片编排**：内置元数据收集与桶分配算法，自动处理不同分片模式间的数据映射，无需开发人员手动干预数据布局转换。\n\ncheckpoint-engine 通过将原本漫长的权重更新过程压缩至秒级，彻底消除了大规模强化学习训练中的同步瓶颈，让万亿参数模型的实时进化成为可能。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FMoonshotAI_checkpoint-engine_d18a4c17.png","MoonshotAI","Moonshot AI","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FMoonshotAI_691dfd9a.jpg","",null,"https:\u002F\u002Fmoonshot.ai","https:\u002F\u002Fgithub.com\u002FMoonshotAI",[80],{"name":81,"color":82,"percentage":83},"Python","#3572A5",100,940,82,"2026-04-10T09:03:04","MIT",4,"Linux","必需 NVIDIA GPU。测试环境包括 H800 和 H20。支持多卡并行（如 8xH800 TP8, 16xH20 TP16, 256xH20 TP16）。需绑定 GPU 到对应的 NUMA 节点以优化传输速度。若使用 P2P 模式，需支持 RDMA 的网卡设备。","未说明（但提到流水线模式需要更多显存，不足时会回退到串行执行；CPU 端需存储分片权重引用）",{"notes":93,"python":94,"dependencies":95},"1. vLLM 版本必须包含 `\u002Fcollective_rpc` API 端点（v0.10.2 已验证），FP8 量化模型更新需要额外应用补丁。2. 安装时若需灵活的 P2P 实现（支持动态节点加入），需安装 `checkpoint-engine[p2p]`，这将自动安装 `mooncake-transfer-engine` 以支持 RDMA 传输。3. 可通过环境变量 `PS_MAX_BUCKET_SIZE_GB` 设置最大桶大小（默认 8GB），通过 `PS_P2P_STORE_RDMA_DEVICES` 或 `NCCL_IB_HCA` 配置 RDMA 设备。4. 目前主要集成测试了 vLLM 和 SGLang 框架。5. 启动 vLLM 时需设置 `--load-format dummy` 并指定 `--worker-extension-cls=checkpoint_engine.worker.VllmColocateWorkerExtension`。","3.12",[96,97,98,99],"vllm==0.10.2 (推荐)","torch","mooncake-transfer-engine (仅 P2P 模式)","ZeroMQ (pyzmq)",[35,14],"2026-03-27T02:49:30.150509","2026-04-14T12:35:38.215531",[104,109,113,118,123,128],{"id":105,"question_zh":106,"answer_zh":107,"source_url":108},32888,"在没有启用 InfiniBand (IB) 网卡的机器上运行时报错 \"Failed to install RDMA transport\" 如何解决？","该错误通常是因为系统尝试初始化 RDMA 传输但找不到可用的 RNIC 设备。如果实验环境没有启用 IB 网卡，需要检查是否强制启用了 RDMA 相关配置。在某些情况下，确保网络拓扑发现正确或禁用特定的 RDMA 设备（如日志中提到的 `Disable device mlx5_3`）可能有助于回退到其他传输方式。此外，可以通过设置环境变量 `MC_TE_METRIC=1` 来启用指标报告以获取更多调试信息。如果必须使用非 IB 网络，请确认当前版本是否支持纯 TCP\u002FSocket 传输作为备选方案。","https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fissues\u002F1",{"id":110,"question_zh":111,"answer_zh":112,"source_url":108},32889,"Checkpoint-engine 的模型加载\u002F更新速度如何计算？为什么实际耗时比理论 H2D 传输时间长？","Checkpoint-engine 的耗时可以通过以下公式估算：\nduration = model_bytes × (1 \u002F (h2d_speed × world_size) + 1 \u002F broadcast_speed)\n\n例如，对于 Qwen32B 模型（约 64GB），在 8 卡环境下，假设单卡 PCIe 速度为 20GiB\u002Fs，广播速度为 20GiB\u002Fs，计算如下：\nduration = 64 × (1\u002F(20×8) + 1\u002F20) ≈ 3.6 秒。\n\n实际耗时较长（如约 4.6 秒或更多）的原因通常包括：\n1. `process_weights_after_loading` 等后处理步骤需要额外时间（约 1 秒）。\n2. 实际 PCIe 带宽可能未达到理论峰值（如 25GiB\u002Fs）。\n3. 广播速度受限于具体 GPU 型号和网络拓扑。\n\n建议使用官方提供的脚本测试实际广播带宽：\n```bash\ntorchrun --nproc_per_node 8 run_bench.py -b 10G -n 8 -c broadcast\n```\n（脚本地址：https:\u002F\u002Fgithub.com\u002Fsterow\u002Fdistributed_torch_bench\u002Fblob\u002Fmaster\u002Fbenchmarks\u002Frun_bench.py）",{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},32890,"如何在 H20 GPU 上解决 \"Failed to register memory: Bad address [14]\" 错误？","在 H20 GPU 上遇到此错误通常是因为缺少必要的内核模块支持。根据社区反馈，需要加载 `nvidia_peermem` 内核模块才能正常注册内存区域。\n\n解决步骤：\n1. 检查并加载模块：\n   ```bash\n   modprobe nvidia_peermem\n   ```\n2. 验证模块是否加载成功。\n3. 重新运行测试脚本。\n\n此外，确保已正确配置 NCCL 环境变量，例如：\n```bash\nexport NCCL_IB_HCA=mlx5_0,mlx5_1,mlx5_2,mlx5_4\nexport NCCL_IB_GID_INDEX=0\nexport NCCL_SOCKET_IFNAME=bond0\n```\n如果问题依旧，可以使用 `gdrcopy_copybw` 和 `gdrcopy_copylat` 工具进一步诊断 GPU 内存映射状态。","https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fissues\u002F34",{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},32891,"Checkpoint-engine 是否支持与 Verl 集成？在训推并行策略不一致时如何更新权重？","目前社区正在探讨与 Verl 的集成方案。关于权重更新的问题，核心难点在于 `named_tensors` 并非全量 tensor，而是分片后的部分 tensor（例如 8k 个 tensor 在 8 个 rank 下，每个 rank 只有 1k 个）。\n\n如果在本地 rank 调用 `full_tensor()` 获取完整 tensor 后直接调用 vllm 的 `update_weights` 接口，可能会导致其他机器上的 tensor 无法更新，特别是在训练（FSDP）和推理（vllm）并行策略不一致的情况下。\n\n目前的临时做法是参考 Verl 的 FSDP+vllm 实现，在本地构建完整 tensor 进行更新，但这可能存在更新不全的风险。建议关注后续版本是否提供针对异构并行策略的原生支持或更安全的权重同步机制。","https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fissues\u002F31",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},32892,"是否可以在 Checkpoint-engine 中引入 torch.distributed 以外的集合通信库（如 vllm\u002Fsglang 的 PyNcclCommunicator）？","社区倾向于保持库的通用性，不绑定特定框架。推荐的方案是采用插件化设计，允许第三方注册自己的通信实现，而不是直接硬编码依赖 vllm 或 sglang。\n\n具体建议：\n1. Checkpoint-engine 默认仍提供 `torch.distributed` 支持。\n2. 对于需要隔离通信域的场景（如训练和推理各自有独立的 global 通信组），可以利用 `StatelessProcessGroup`（类似 vllm\u002Fsglang 中的实现）来构建独立的通信域，避免污染全局状态。\n3. 开发者可以通过 PR 将不同后端（如 PyNcclCommunicator, PyHcclCommunicator）的接口映射出来，以插件形式接入。\n\n这种设计既能解决多通信域冲突问题，又能保持良好的扩展性和兼容性。","https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fissues\u002F71",{"id":129,"question_zh":130,"answer_zh":131,"source_url":108},32893,"Checkpoint-engine 当前是否支持通过 CUDA_VISIBLE_DEVICES 限制使用的 GPU 数量？","截至目前，Checkpoint-engine 尚未完全兼容少于整机设备数量的 GPU 配置（即不支持通过 `CUDA_VISIBLE_DEVICES` 灵活指定部分 GPU）。这是一个已知限制，维护者计划在未来的版本中修复此问题，以支持更灵活的 GPU 资源分配。在当前版本中，建议尽量使用整机的所有 GPU 资源以避免潜在的错误。",[133,138,143,148,153,158,163,168,173,178,183,188,193,198,203],{"id":134,"version":135,"summary_zh":136,"released_at":137},247568,"v0.4.0","## 变更内容\n* 重构：在 ParameterServer 中使用共享的 TCPStore，并由 @HubertZhang 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F82 中通过 PrefixStore 创建 ProcessGroup。\n* 功能：添加 StatelessProcessGroup，以扩展集体通信库，由 @kip-cxj 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F66 中实现。\n* 功能：在调用 update_weights_from_ipc 的 post_hook 之前释放 IPC 缓冲区，由 @HubertZhang 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F84 中实现。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.3.4...v0.4.0","2026-02-02T14:06:28",{"id":139,"version":140,"summary_zh":141,"released_at":142},247569,"v0.4.0-rc0","## 变更内容\n* 重构：在 ParameterServer 中使用共享的 TCPStore，并由 @HubertZhang 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F82 中通过 PrefixStore 创建 ProcessGroup。\n* 功能新增：添加 StatelessProcessGroup，以扩展集体通信库，由 @kip-cxj 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F66 中实现。\n* 功能新增：在调用 update_weights_from_ipc 的 post_hook 之前释放 IPC 缓冲区，由 @HubertZhang 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F84 中实现。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.3.4...v0.4.0-rc0","2026-02-02T11:23:22",{"id":144,"version":145,"summary_zh":146,"released_at":147},247570,"v0.3.4","## 变更内容\n* 由 @youzhedian 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F81 中添加了对 MTP 的支持\n\n## 新贡献者\n* @youzhedian 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F81 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.3.3...v0.3.4","2026-01-28T12:34:08",{"id":149,"version":150,"summary_zh":151,"released_at":152},247571,"v0.3.3","## 变更内容\n* 修复：由 @kip-cxj 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F78 中实现的 NPU 空闲主机缓存问题\n* 错误修复：由 @HubertZhang 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F79 中实现的在 inplace_pin_memory 中跳过空的 safetensors 文件\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.3.2...v0.3.3","2026-01-20T11:52:49",{"id":154,"version":155,"summary_zh":156,"released_at":157},247572,"v0.3.2","## 变更内容\n* 由 @ruizhang1230 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F76 中修复了在 disable_h2d_buffer 为 true 时的 P2P 更新错误。\n* 修复：由 @SongXiaoXi 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F77 中在 _inplace_pin_memory 函数中设置当前 CUDA 设备。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.3.1...v0.3.2","2026-01-09T12:24:25",{"id":159,"version":160,"summary_zh":161,"released_at":162},247573,"v0.3.1","与 v0.3.1-rc0 相同","2026-01-05T09:00:54",{"id":164,"version":165,"summary_zh":166,"released_at":167},247574,"v0.3.1-rc0","## 变更内容\n* 更新 ps.py 中环境变量的使用，由 @HubertZhang 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F73 中完成\n* 杂项：将 ps.py 文件拆分为多个文件，由 @specture724 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F64 中完成\n* 新功能：在 VllmWorkerExtension 中缓存设备 UUID，由 @kip-cxj 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F74 中完成\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.3.0-rc1...v0.3.1-rc0","2026-01-04T07:52:14",{"id":169,"version":170,"summary_zh":171,"released_at":172},247575,"v0.3.0-rc1","## 变更内容\n* 功能新增：为 `auto_pg` 添加了文档说明，并由 @specture724 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F65 中将 `auto_pg` 的默认值设置为 True。\n* 修复：由 @specture724 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F68 中添加了一个开关，用于禁用张量的就地固定。\n* 修复：由 @specture724 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F69 中修复了因就地固定内存而导致的 `cudaErrorHostMemoryAlreadyRegistered` 错误。\n* 修复：由 @specture724 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F70 中修复了使用基于存储的屏障时出现的 CUDA OOM 问题。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.3.0-rc0...v0.3.0-rc1","2025-12-23T11:21:30",{"id":174,"version":175,"summary_zh":176,"released_at":177},247576,"0.2.3","- 从 0.2.2 版本开始，默认禁用“原地固定内存”功能，因为它可能会导致问题。","2025-12-18T07:18:31",{"id":179,"version":180,"summary_zh":181,"released_at":182},247577,"v0.3.0-rc0","## 变更内容\n* 修复：使用 TCP 基于存储的屏障来控制 P2P 更新同步，由 @specture724 在 https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F51 中实现。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.2.2...v0.3.0-rc0","2025-12-11T09:48:35",{"id":184,"version":185,"summary_zh":186,"released_at":187},247578,"v0.2.2","## What's Changed\r\n* fix: propagate remote exception traceback to parameter server by @SongXiaoXi in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F59\r\n* misc: update README with environment variable instructions and vLLM version specified by @specture724 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F61\r\n* feat: reuse pin_memory when registering checkpoint by @specture724 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F56\r\n* feat: inplace pin memory for safetensors in \u002Fdev\u002Fshm\u002F by @specture724 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F58\r\n* feat: force unregister shared pin memory buffer supported by @specture724 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F62\r\n* feat: docs for force unregister by @specture724 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F63\r\n\r\n## New Contributors\r\n* @SongXiaoXi made their first contribution in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F59\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.2.1...v0.2.2","2025-12-11T09:33:21",{"id":189,"version":190,"summary_zh":191,"released_at":192},247579,"v0.2.1","## What's Changed\r\n* [Hardware] broadcast support for Huawei Ascend NPU by @kip-cxj in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F39\r\n* [Doc] add sglang usage document by @stmatengss in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F45\r\n* Fix ValueError handling and add device type check by @HubertZhang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F47\r\n* Fix wrong device_type, refine documents in worker.py by @HubertZhang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F52\r\n* Expose uds in UpdateRequest by @HubertZhang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F49\r\n* fix: test_update.py failed because _get_physical_gpu_id doesn't get 'device_manager' argument by @specture724 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F53\r\n* fix: add log to hint to set NCCL_IB_HCA env when _get_my_rdma_device raise an assertion failure by @specture724 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F54\r\n* fix: force ps to quit when error occur during updating by @specture724 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F43\r\n* [Hardware] p2p support for Huawei Ascend NPU by @kip-cxj in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F46\r\n* bugfix: reset global meta when gather meta by @HubertZhang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F57\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.2.0...v0.2.1","2025-11-24T13:29:09",{"id":194,"version":195,"summary_zh":196,"released_at":197},247580,"v0.2.0","## Feature\r\n\r\nSee https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fissues\u002F25. We speedup the P2P implementation and make it have the same speed of broadcast. Also, we bind each GPU to its corresponding NUMA node to ensure stable H2D transfer speeds, which will speedup the update duration. We update the test result.\r\n\r\n| Model                                | Device Info  | GatherMetas | Update (Broadcast) | Update (P2P)            |\r\n| :----------------------------------- | :----------- | :---------- |:-------------------| :---------------------- |\r\n| GLM-4.5-Air (BF16)                   | 8xH800 TP8   | 0.12s       | 3.47s (3.02GiB)    | 4.12s (3.02GiB)         |\r\n| Qwen3-235B-A22B-Instruct-2507 (BF16) | 8xH800 TP8   | 0.33s       | 6.22s (2.67GiB)    | 7.10s (2.68GiB)         |\r\n| DeepSeek-V3.1 (FP8)                  | 16xH20 TP16  | 1.17s       | 10.19s (5.39GiB)   | 11.80s (5.41GiB)        |\r\n| Kimi-K2-Instruct (FP8)               | 16xH20 TP16  | 1.33s       | 14.36s (5.89GiB)   | 17.49s (5.91GiB)        |\r\n| DeepSeek-V3.1 (FP8)                  | 256xH20 TP16 | 0.80s       | 11.33s (8.00GiB)   | 11.81s (8.00GiB)        |\r\n| Kimi-K2-Instruct (FP8)               | 256xH20 TP16 | 1.22s       | 16.04s (8.00GiB)   | 16.75s (8.00GiB)        |\r\n\r\n## What's Changed\r\n* fix: use correct type for _current_global_parameter_metas by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F33\r\n* A more reasonable way to obtain RDMA devices by @specture724 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F36\r\n* optimize _update_per_bucket_p2p logic by @specture724 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F28\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.1.3...v0.2.0","2025-10-30T02:27:57",{"id":199,"version":200,"summary_zh":201,"released_at":202},247581,"v0.1.3","## What's Changed\r\n* fix register_files fastapi parameter parse error by @ruizhang1230 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F27\r\n* fix destroy process group error when using p2p update by @ruizhang1230 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F30\r\n* feat: support configurable gpu count and memory fraction by @zxpdemonio in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F29\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcompare\u002Fv0.1.2...v0.1.3","2025-10-14T08:10:59",{"id":204,"version":205,"summary_zh":206,"released_at":207},247582,"v0.1.2","## What's Changed\r\n* feat: use zmq_addr_counter to make zmq_handle non-repeat for each update by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F4\r\n* feat: add pre-commit as lint config by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F5\r\n* feat: add pre-commit CI workflow by @specture724 in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F10\r\n* feat: make `ParameterMeta` JSON serializable by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F9\r\n* feat: rename `save_metas_file` -> `load_metas_file` in `join` method by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F11\r\n* chore: set `mooncake-transfer-engine>=0.3.5` by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F13\r\n* feat: support uds and use httpx instead of requests by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F18\r\n* feat: add rank and world_size args in ParameterServer by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F20\r\n* feat: use ibv_get_device_list to get rdma devices instead of getting from file by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F19\r\n* feat: use torch.cuda.get_device_properties() to get device_uuid instead of nvidia-smi -L by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F21\r\n* hotfix: use correct hca selector by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F22\r\n* feat: add _TorchTensor type for pydantic type validator by @weixiao-huang in https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fpull\u002F24\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002FMoonshotAI\u002Fcheckpoint-engine\u002Fcommits\u002Fv0.1.2","2025-09-22T14:26:01"]