13 Commits

Author SHA1 Message Date
Jiejing
7416bb2e4d
Merge f6388940003e9c962337bcd1f8d0ba693d977f86 into 553741557a57df44a46fb3ab72b6aafeaf945337 2026-10-25 21:43:55 -07:00
Jiejing
f638894000 serve: default --prefill-any-interval to 30 (throughput over TTFT)
At AgentX c256 on one GB300 tray, 30 vs 2 gives +9% tok/s/GPU and 2.2x P90
interactivity, for +0.4 s TTFT p50. Use 2 for low TTFT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YNgkNrJL5oR1pZqVYzZMHW
2026-10-26 04:43:27 +00:00
Jiejing
8b1ed3f26a serve: document the --prefill-any-interval TTFT / decode-speed trade-off
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YNgkNrJL5oR1pZqVYzZMHW
2026-10-25 21:37:45 +00:00
Jiejing
83be1fa44c serve: drop the 32 redundant expert slots when EPLB is off
Without rearrangement they are fixed copies of experts 0-31 and only add expert weight per rank.
Decode SPS +4.8% / +3.9% at 4 / 16 requests per rank on GB300 (examples/benchmark.py, 128K context),
matching whn09's B200 numbers; 6 GiB less model memory per GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YNgkNrJL5oR1pZqVYzZMHW
2026-10-25 21:35:59 +00:00
Inference_
553741557a
fix: validate boolean environment variables with strict parsing (#218) 2026-10-25 19:59:27 +08:00
Jiejing
269a61f7c5 serve: exact fast prompt tokenization (fastokens or added-token segment cache), checked against tokenizer.encode
Agentic prompts are re-tokenized in full every turn; tokenizer.encode takes ~280 ms p50 on AgentX prompts
(p50 163K tokens) and dominates TTFT once the prefix cache hits. serve/prompt_tokenizer.py picks fastokens if
installed, else a dependency-free segment cache that splits at added tokens (where HF already encodes pieces
independently) and reuses earlier turns' pieces; both are enabled only after matching tokenizer.encode on
startup probes, and a sampled background re-check switches to hf on any mismatch.

Suggested by whn09 in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YNgkNrJL5oR1pZqVYzZMHW
2026-10-23 03:50:06 +00:00
Jiejing
d7844a221d serve: EPLB rearrangement off by default, --eplb-interval / --eplb-after-prefill flags
Hard-wired enable_eplb=True rearranged experts every 30 steps and after every
prefill step; under multi-turn traffic that fires almost continuously and
each rearrangement stalls all ranks for ~0.3 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TNVW4sqoaPqbNtSrgpA2zK
2026-10-22 17:17:22 +00:00
Jiejing
aaf1e62c9e serve: type annotations and B007 for ruff
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LFPG29daR1FhchJBTjiEKr
2026-10-21 22:26:07 +00:00
Shaoyuan CHEN
9bd9cf243f
Bump DeepEP to f6aa38fe and drop the SSH->HTTPS rewrite (#157)
DeepEP now records an HTTPS DeepJIT URL, so build_vendor no longer needs the git@github.com rewrite.

Co-authored-by: Shaoyuan Chen <chensy@deepseek.com>
2026-10-21 12:55:43 +08:00
Jiejing
eb1c7a51ab Add a minimal OpenAI-compatible chat server over the offline engine
serve/openai_server.py exposes /v1/chat/completions (streaming, tools,
usage) on top of LLMEngine: one engine process per GPU (attention DP + MoE
EP, the layout of examples/benchmark.py), prompts rendered with the
checkpoint's own encoding.py, conversation-affinity routing, a watchdog
that fails open requests if an engine rank dies, and /deepinfer/metrics.
serve/server.sh runs it as a process group so a stop also reaps the
engine's helper processes, which otherwise keep the GPUs.

It integrates the host prefix cache from deepinfer/hicache when present
(--hicache-size-gb, --hicache-state-slots, per-request "prefix_cache":
false bypass; serve/check_prefix_cache.py is the A/B check) and serves
without it otherwise. It also sets DEEPINFER_PREFILL_ANY_ATTEMPT_INTERVAL
to 2 by default (--prefill-any-interval): with the engine default of 100,
a rank whose peers are idle admits a waiting prompt only every 100 decode
steps, a ~1.4 s TTFT floor on every request in a serving setting.

Used to drive the InferenceX AgentX replay (aiperf) on 4x GB300.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TNVW4sqoaPqbNtSrgpA2zK
2026-10-21 03:11:38 +00:00
hkeee21
774ce244b8 update Q&A EN doc 2026-10-20 19:03:13 +08:00
Jiashi Li
8b16149741 update Q&A documentation 2026-10-20 17:06:57 +08:00
Jiashi Li
d585e6542c initial commit 2026-10-20 12:09:42 +08:00