KTransformers

DeepSeek 模型

DeepSeek 页面按模型组织。DeepSeek-V2-Lite 有量化吞吐数据;DeepSeek V4-Flash 已完成限定配置的 0.7.2 微调与 adapter 加载 smoke,尚无可比较的吞吐数据。DeepSeek-V3.2 仍只有边界证据。

总览

模型InferenceTraining
DeepSeek-V2-LiteAMXINT8 已验证;Prefill best 为 GE40,Decode best 为 GE35BF16/KT LoRA SFT 已验证,但依赖 fused expert LoRA caveat
DeepSeek V4-Flash0.7.2 双 RTX 5090,TP2 加载 adapter 并生成;未测 TPS原生 MXFP4 LoRA,20-step 训练及产物重新加载通过;未测 TPS
DeepSeek-V3.2单卡 24GB 只有边界证据;tiny smoke 不进主表置灰:训练栈不识别 deepseek_v32

DeepSeek-V2-Lite

Inference

Inference 摘要展示 Prefill TPS 和 Decode TPS。这两个最高值来自两条独立实验。

MethodWinning configPrefill TPSDecode TPSPeak GPUPeak RSSEvidence
AMXINT8Prefill GE40 / Decode GE35, mem-fraction-static=0.85, max-running-requests=826558.49118.3520.14GB prefill / 18.36GB decode20.30GB prefill / 30.10GB decodePrefill-best sweep + Decode-best sweep

为何提供两条命令:GE40 的长 prompt prefill 最高,但 decode 阶段因为 token usage 和排队,Decode TPS 只有 40.94;GE35 的 Decode TPS 最高,为 118.35。因此这里分别提供 Prefill-best 和 Decode-best 两个命令变体。

Prefill-best GE40:

python -m sglang.launch_server \
  --host 127.0.0.1 \
  --port 19233 \
  --model-path /path/to/DeepSeek-V2-Lite-Chat \
  --served-model-name deepseek-v2-lite-amxint8-ge40-prefill \
  --trust-remote-code \
  --tp-size 1 \
  --context-length 4096 \
  --mem-fraction-static 0.85 \
  --max-total-tokens 8192 \
  --chunked-prefill-size 512 \
  --max-prefill-tokens 512 \
  --max-running-requests 8 \
  --watchdog-timeout 1800 \
  --attention-backend triton \
  --sampling-backend pytorch \
  --disable-cuda-graph \
  --disable-radix-cache \
  --skip-server-warmup \
  --disable-shared-experts-fusion \
  --log-requests \
  --show-time-cost \
  --enable-request-time-stats-logging \
  --kt-weight-path /path/to/DeepSeek-V2-Lite-INT8 \
  --kt-method AMXINT8 \
  --kt-num-gpu-experts 40 \
  --kt-cpuinfer 96 \
  --kt-threadpool-count 2

Decode-best GE35:

python -m sglang.launch_server \
  --host 127.0.0.1 \
  --port 19232 \
  --model-path /path/to/DeepSeek-V2-Lite-Chat \
  --served-model-name deepseek-v2-lite-amxint8-ge35-decode \
  --trust-remote-code \
  --tp-size 1 \
  --context-length 4096 \
  --mem-fraction-static 0.85 \
  --max-total-tokens 8192 \
  --chunked-prefill-size 512 \
  --max-prefill-tokens 512 \
  --max-running-requests 8 \
  --watchdog-timeout 1800 \
  --attention-backend triton \
  --sampling-backend pytorch \
  --disable-cuda-graph \
  --disable-radix-cache \
  --skip-server-warmup \
  --disable-shared-experts-fusion \
  --log-requests \
  --show-time-cost \
  --enable-request-time-stats-logging \
  --kt-weight-path /path/to/DeepSeek-V2-Lite-INT8 \
  --kt-method AMXINT8 \
  --kt-num-gpu-experts 35 \
  --kt-cpuinfer 96 \
  --kt-threadpool-count 2

Training

Training 摘要展示 Training TPS。当前可用路线是带 caveat 的 fused expert LoRA route;upstream-clean 路线仍需要补齐。

MethodRecipe关键参数Training TPSPeak GPURAMEvidence
BF16/KTLoRA SFTKT_FORCE_FUSED_EXPERT_LORA=1, training_shims/sitecustomize.py, lora_rank=8, batch=1, grad_accum=8, max_steps=12, 4 GPU FSDP223.324.26GB/GPU205.9GB12-step fused expert LoRA run

启动命令:

accelerate launch \
  --config_file /path/to/LLaMA-Factory/examples/ktransformers/accelerate/fsdp2_kt_bf16.yaml \
  /path/to/LLaMA-Factory/src/train.py \
  /path/to/training_cases/deepseek-v2-lite-bf16-training.yaml

这条训练路线需要同时理解下面的 caveat:

Caveat说明
KT_FORCE_FUSED_EXPERT_LORA=1把 KT MoE wrapper 切到 fused expert LoRA 路径,使 LoRA 参数能注入 optimizer
training_shims/sitecustomize.py处理当前包组合下的兼容问题;性能目标不依赖它
upstream-clean 失败no-shim/no-force 卡在 flash_attn import mapping;no-force+shim 卡在 No PEFT LoRA found on any expert

DeepSeek V4-Flash

Inference

在 0.7.2 的独立推理环境中,双 RTX 5090、TP2 已加载训练产物中的 43 层 expert LoRA,并完成一次生成请求。该验证只覆盖 adapter 加载与生成;尚无此配置的 Prefill/Decode TPS。

Training

0.7.2 在双 RTX 5090 上使用原生 MXFP4 routed expert 权重完成 20-step LoRA SFT(B1/GAS4/S1024),保存普通与 expert LoRA,并在独立推理进程重新加载。无需先把 expert 权重转换为 BF16。此前的 deepseek_v4 preflight blocker 属于旧训练环境。

Training TPS 尚未测量。安装和示例 YAML 见 DeepSeek V4 Flash LoRA 快速指南。

DeepSeek-V3.2

Inference

单卡 24GB GPU 只有边界证据,不能进入主推荐表。

Case结果页面状态
GE2 smoke初始化 OOM置灰
GE0 / mem-fraction-static=0.70权重加载后 KV cache 失败置灰
GE0 / mem-fraction-static=0.95 / 1024-token tiny smokeserver ready,但上下文极小只作为边界证据,不展示为正式 TPS

Training

Training tab 可见但置灰:当前 Training 环境不识别 deepseek_v32,preflight 在 tokenizer/config 阶段失败,GPU 峰值只有 3MiB,没有进入权重加载,也没有 Training TPS。

证据类型:training config preflight。