Kimi K3.1 Pro Goes Open Today: 3T Weights + 1M-Token Context, and How to Actually Serve It

TL;DR: On 2026-11-04 Moonshot released the full weights of Kimi K3.1 Pro -- a 3T-scale model with a 1,000,000-token context window. Put those two numbers on one open-weight model and the first deployment wall is not compute, it is a VRAM bill: the KV cache for 1M context often costs more than the weights themselves (sources: Jiqizhixin open-source digest 2026-11-04, Moonshot release notes).

Do the math first: 1M context KV cache is the real cost

3T weights at BF16 are roughly 6TB; quantization or sparse MoE activation brings that down. But the KV cache for 1M context is a different, recurring bill: every token you generate keeps the K and V vectors of every earlier token in VRAM. The formula is simple:

# KV cache footprint for 1M context on one GPU (BF16)
kv_per_token_bytes = 2 * num_layers * hidden_size * 2   # K and V, BF16 = 2 bytes
kv_1m_bytes       = kv_per_token_bytes * 1_000_000
kv_1m_gb          = kv_1m_bytes / (1024**3)

Plug in num_hidden_layers and hidden_size from the model config.json. Example: a 64-layer, 5120-hidden config needs about 1.25MB per token, so 1M tokens is roughly 1.2TB -- before any batching or concurrency. The takeaway is blunt: what survives 1M context is not "the biggest single GPU" but "the framework that spreads KV across GPUs and compresses the repeated parts with paging and prefix caching".

Serve it with vLLM

vLLM's PagedAttention is built for exactly this. KV is paged by block, and prefixes shared across requests (system prompt, a long document) can be reused. This command starts the service using the official repo id (example moonshotai/Kimi-K3.1-Pro; use whatever id Moonshot publishes):

vllm serve moonshotai/Kimi-K3.1-Pro \
  --tensor-parallel-size 8 \
  --max-model-len 1000000 \
  --kv-cache-dtype fp8_e5m2 \
  --gpu-memory-utilization 0.90 \
  --enable-prefix-caching \
  --enable-chunked-prefill

Key switches: --kv-cache-dtype fp8_e5m2 halves KV from BF16 to FP8; --enable-prefix-caching is nearly free for RAG with "one long doc + many questions"; --enable-chunked-prefill stops a single 1M-token prefill from spiking latency.

How to fit 3T weights into VRAM

Weights are easier than KV: even if not pure MoE, a 3T model runs on tensor + pipeline parallelism. Practical rules:

  • FP8 weights: 6TB to about 3TB, fits on 8x80GB cards;
  • INT4 / GPTQ: about 1.5TB, four cards is enough;
  • MoE sparse activation: if only tens of B activate per step, peak VRAM is driven by "one expert's size + KV", not the full 3T.

vLLM takes --quantization for FP8 / AWQ / GPTQ. Before deploying, build a table with the KV formula plus weight size -- do not wait for OOM.

3.1 A runnable KV-budget script

Save this as kv_budget.py and point it at a model directory:

import json, sys

cfg = json.load(open(f"{sys.argv[1]}/config.json"))
L = cfg["num_hidden_layers"]; H = cfg["hidden_size"]
ctx = int(sys.argv[2]) if len(sys.argv) > 2 else 1_000_000
per_tok = 2 * L * H * 2                      # K+V, BF16
total_gb = per_tok * ctx / (1024**3)
print(f"layers={L} hidden={H} ctx={ctx}")
print(f"KV per token : {per_tok/1024/1024:.3f} MB")
print(f"KV @1M       : {total_gb:.1f} GB (BF16)")
print(f"KV @1M (FP8) : {total_gb/2:.1f} GB")

Run: python kv_budget.py /models/Kimi-K3.1-Pro 1000000. The FP8 column is the number you should plan VRAM against.

Highspeed variant: do not force full Pro for interactive use

Moonshot also ships Kimi K3.1 Pro Highspeed, 2-3x faster than Pro. It fits online, user-waits-for-a-response scenarios; full Pro fits offline long-document analysis and batch agentic jobs. Same weight ecosystem, pick by latency budget.

Landing checklist

  • Run kv_budget.py for a VRAM baseline before choosing FP8 vs INT4;
  • For long-doc RAG always enable --enable-prefix-caching to reuse the document prefix;
  • Never open 1M context bare: chunked prefill plus a sane max-num-seqs together;
  • Use Highspeed online, full Pro offline;
  • Pull weights from the official repo and verify sha256 before production -- do not grab from a mirror and ship.

At the end of the day, the 3T + 1M combo turns "long-context serving" from a research problem into an engineering one. Plan the bill and it is a great long-doc / agentic base; skip the math and 6TB of weights and 1TB of KV will teach you the lesson together.

Further reading

Comentarios

Este sitio es solo frontal: sin backend ni cuentas. Los comentarios van a GitHub Issues, Discussions o correo.

Pega esto en el issue o correo para ayudarme a localizar el problema; no incluye nada de lo que escribiste

También:Ver comentarios existentes · Comentarios por correo (sin cuenta de GitHub):278975598@qq.com