KTransformers

DeepSeek 模型

DeepSeek 页面按模型组织。当前主推数据来自 DeepSeek-V2-Lite;DeepSeek V4-Flash 和 DeepSeek-V3.2 已经测到明确 blocker,不属于“尚未测试”的空白状态。

总览

模型InferenceTraining
DeepSeek-V2-LiteAMXINT8 已验证;Prefill best 为 GE40,Decode best 为 GE35BF16/KT LoRA SFT 已验证,但依赖 fused expert LoRA caveat
DeepSeek V4-Flash当前 server 未 ready;CPUInfer load_weights_task segfault置灰:训练栈不识别 deepseek_v4
DeepSeek-V3.2单卡 24GB 只有边界证据;tiny smoke 不进主表置灰:训练栈不识别 deepseek_v32

DeepSeek-V2-Lite

Inference

Inference 摘要展示 Prefill TPSDecode 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

当前不能展示 Prefill/Decode TPS。已有验证状态是服务未 ready:

阶段结果
模型下载和路径检查通过
DSV4 source/env + no-tilelang + API shim能推进到 DSV4 loader
DSV4 FP8 loader key mappingCPUInfer 能看到 experts
最终 blockerAMX_FP8_MOE_TP.load_weights_taskkt_kernel/utils/amx.py:517 附近 C++ segfault

Training

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

证据类型:training config preflight。

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。