Intern-S2-Preview-397B-FP8部署指南:LMDeploy、vLLM、SGLang三大框架对比

📅 2026/7/19 15:03:24
Intern-S2-Preview-397B-FP8部署指南:LMDeploy、vLLM、SGLang三大框架对比
Intern-S2-Preview-397B-FP8部署指南LMDeploy、vLLM、SGLang三大框架对比【免费下载链接】Intern-S2-Preview-397B-FP8项目地址: https://ai.gitcode.com/InternLM/Intern-S2-Preview-397B-FP8Intern-S2-Preview-397B-FP8是一款功能强大的多模态基础模型专为科学智能和长程代理任务设计。本文将详细对比LMDeploy、vLLM和SGLang三大框架在部署该模型时的方法和效果帮助您快速选择最适合的部署方案。部署环境准备在开始部署之前请确保您的环境满足以下要求推荐使用H100x8或H200x8节点已安装相应的框架LMDeploy (0.14.0)、vLLM (v0.22.1) 或 SGLang (v0.5.13)已克隆模型仓库git clone https://gitcode.com/InternLM/Intern-S2-Preview-397B-FP8LMDeploy部署指南LMDeploy是一款高效的LLM部署框架支持多种优化策略。以下是使用LMDeploy部署Intern-S2-Preview-397B-FP8的方法基础部署无MTP# 启动代理服务器 lmdeploy serve proxy --server-name ${proxy_server_ip} --server-port ${proxy_server_port} # 启动API服务器 lmdeploy serve api_server \ internlm/Intern-S2-Preview-397B \ --trust-remote-code \ --backend pytorch \ --dp 4 \ --ep 8 \ --enable-prefix-caching \ --proxy-url http://${proxy_server_ip}:${proxy_server_port} \ --reasoning-parser default \ --tool-call-parser interns2-previewMTP推测解码部署lmdeploy serve api_server \ internlm/Intern-S2-Preview-397B \ --trust-remote-code \ --backend pytorch \ --dp 4 \ --ep 8 \ --enable-prefix-caching \ --proxy-url http://${proxy_server_ip}:${proxy_server_port} \ --reasoning-parser default \ --tool-call-parser interns2-preview \ --speculative-algorithm qwen3_5_mtp \ --speculative-num-draft-tokens 4 \ --max-batch-size 256长上下文部署对于长上下文推理需要配置--session-len和YaRN RoPE参数。以下示例使用512k上下文长度lmdeploy serve api_server \ internlm/Intern-S2-Preview-397B \ --trust-remote-code \ --backend pytorch \ --dp 4 \ --ep 8 \ --enable-prefix-caching \ --reasoning-parser default \ --tool-call-parser interns2-preview \ --session-len 512000 \ --max-batch-size 64 \ --hf-overrides {text_config: {rope_parameters: {mrope_interleaved: true, mrope_section: [11, 11, 10], rope_type: yarn, rope_theta: 10000000, partial_rotary_factor: 0.25, factor: 4.0, original_max_position_embeddings: 262144}}}vLLM部署指南vLLM是另一个高性能的LLM服务框架以其高效的PagedAttention技术而闻名。以下是使用vLLM部署Intern-S2-Preview-397B-FP8的方法基础部署无MTPexport VLLM_DEEP_GEMM_WARMUPskip export VLLM_USE_DEEP_GEMM0 export VLLM_FLASHINFER_MOE_BACKENDlatency vllm serve internlm/Intern-S2-Preview-397B \ --trust-remote-code \ --tensor-parallel-size 8 \ --enable-auto-tool-choice \ --tool-call-parser qwen3_coder \ --reasoning-parser qwen3 \ --mm-encoder-tp-mode dataMTP推测解码部署export VLLM_DEEP_GEMM_WARMUPskip export VLLM_USE_DEEP_GEMM0 export VLLM_FLASHINFER_MOE_BACKENDlatency vllm serve internlm/Intern-S2-Preview-397B \ --trust-remote-code \ --tensor-parallel-size 8 \ --enable-auto-tool-choice \ --tool-call-parser qwen3_coder \ --mm-encoder-tp-mode data \ --reasoning-parser qwen3 \ --speculative-config {method:mtp,num_speculative_tokens:3}长上下文部署VLLM_ALLOW_LONG_MAX_MODEL_LEN1 vllm serve internlm/Intern-S2-Preview-397B \ --tensor-parallel-size 8 \ --max-model-len 1010000 \ --reasoning-parser qwen3 \ --hf-overrides {text_config: {rope_parameters: {mrope_interleaved: true, mrope_section: [11, 11, 10], rope_type: yarn, rope_theta: 10000000, partial_rotary_factor: 0.25, factor: 4.0, original_max_position_embeddings: 262144}}}SGLang部署指南SGLang是一个专为LLM服务设计的高级框架提供了灵活的编程接口。以下是使用SGLang部署Intern-S2-Preview-397B-FP8的方法基础部署无MTPpython3 -m sglang.launch_server \ --model-path internlm/Intern-S2-Preview-397B \ --trust-remote-code \ --tp-size 8 \ --mem-fraction-static 0.8 \ --enable-flashinfer-allreduce-fusion \ --reasoning-parser qwen3 \ --tool-call-parser qwen3_coderMTP推测解码部署SGLANG_ENABLE_SPEC_V21 \ python3 -m sglang.launch_server \ --model-path internLM/Intern-S2-Preview-397B \ --trust-remote-code \ --tp-size 8 \ --reasoning-parser qwen3 \ --tool-call-parser qwen3_coder \ --mem-fraction-static 0.8 \ --mamba-scheduler-strategy extra_buffer \ --enable-flashinfer-allreduce-fusion \ --speculative-algo NEXTN \ --speculative-eagle-topk 1 \ --speculative-num-steps 3 \ --speculative-num-draft-tokens 4三大框架对比分析性能表现LMDeploy在时间序列推理方面表现突出目前是唯一支持该功能的框架。vLLM以其高效的PagedAttention技术著称在批量处理和内存效率方面有优势。SGLang提供了灵活的编程接口适合需要定制化部署的场景。易用性LMDeploy配置选项丰富但需要较多的参数调整。vLLM部署流程相对简单环境变量配置直观。SGLang提供了Python API适合开发人员进行深度定制。功能支持LMDeploy支持时间序列推理、MTP推测解码、长上下文等功能。vLLM支持MTP推测解码、长上下文具有良好的多模态支持。SGLang支持MTP推测解码提供了灵活的调度策略。快速开始使用无论您选择哪个框架部署完成后都可以通过以下方式快速测试curl http://0.0.0.0:23333/v1/chat/completions \ -H Content-Type: application/json \ -H Authorization: Bearer EMPTY \ -d { model: internlm/Intern-S2-Preview-397B, messages: [ {role: user, content: Hello} ], temperature: 0.8, top_p: 0.95 }总结LMDeploy、vLLM和SGLang都是部署Intern-S2-Preview-397B-FP8的优秀选择各有其优势。如果您需要时间序列推理功能LMDeploy是最佳选择如果您注重批量处理效率vLLM可能更适合如果您需要高度定制化的部署方案SGLang会是不错的选择。详细的部署步骤和更多高级用法请参考项目中的Model Deployment Guide。【免费下载链接】Intern-S2-Preview-397B-FP8项目地址: https://ai.gitcode.com/InternLM/Intern-S2-Preview-397B-FP8创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考