Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
189c8ad
feat(moe): serve NVFP4 and MXFP4 experts fused through the expert ban…
jason-fxz Oct 4, 2026
581fdca
fix(server): report the backend kv page size in stats (#599)
yunwei37 Oct 5, 2026
93b0a59
fix(server): keep Anthropic inline system messages in place for prefi…
xinze-zheng Oct 5, 2026
555efd8
fix(kvcache): clone inserted radix keys to release request buffers (#…
taking-lying-flat Oct 5, 2026
c1a504a
perf(moe): Improved `fast_index_copy_multi_jit` for NVLink-C2C hosts …
SuperHotDogCat Oct 7, 2026
1c183e7
perf(moe): spin-wait the cpu moe pool between layers (#619)
jason-fxz Oct 7, 2026
127c856
feat(deepseek-v41): support text and vision serving (#603)
jason-fxz Oct 7, 2026
377a3bc
ci: auto-label amd issues and prs by title (#620)
jason-fxz Oct 7, 2026
e84952c
merge #408: nvfp4 kv quantization
gdevenyi Sep 23, 2026
eee9faf
test(kvcache): give the qsa fp8 pool fakes the mrope flag main now reads
gdevenyi Sep 14, 2026
407f3b3
merge #435: resolve JSON Schema refs and union types in tool arguments
gdevenyi Sep 23, 2026
b57d71b
merge #391: accept the OpenAI developer role
gdevenyi Sep 23, 2026
90f42f4
merge #475: respect explicit enable_thinking=false with tools
gdevenyi Sep 23, 2026
3cb2fc3
merge #339: drop the D2H sync from the varlen GDN/KDA prefill conv
gdevenyi Sep 23, 2026
939c172
merge #338: fuse the PLE n-gram row-id hash into one Triton kernel
gdevenyi Sep 23, 2026
ee3aa49
merge #169: load prefill triton kernels at startup, not mid-request
gdevenyi Sep 23, 2026
1cbbc73
merge #231: --moe-collect-stats, so expert-cache behaviour is measurable
gdevenyi Sep 23, 2026
eca4b60
merge #389: load-time per-tensor FP8 dense projections (stacked on #3…
gdevenyi Sep 23, 2026
fda3efd
fix(models): restore the os import and truthy set the fp8 env helpers…
gdevenyi Sep 15, 2026
35d2e25
test(qwen4_exp): restore the rope device and clear get_rope after the…
gdevenyi Sep 15, 2026
7dc5db7
test(kernels): give the block_ends backend fake the kv scale accessor…
gdevenyi Sep 15, 2026
fa609ed
merge fork #18: fix(moe): report the routing top-k figure as a static…
gdevenyi Sep 23, 2026
1133888
merge fork #19: fix(qwen4_exp): refuse an ftw checkpoint whose fp8 sp…
gdevenyi Sep 23, 2026
ed8de88
merge fork #20: fix(engine): let moe-cache-auto drop prefill overlap …
gdevenyi Sep 23, 2026
02e9f04
merge fork #21: fix(triton): keep the float glm dsa sparse launches t…
gdevenyi Sep 23, 2026
460c011
merge fork #22: fix(engine): resize shrinking cache pools before grow…
gdevenyi Sep 23, 2026
d855298
merge fork #23 (upstream FlashML-org/FreeToken#17 rebased): fix(serve…
gdevenyi Sep 23, 2026
4f8b0e9
merge fork #47 (upstream FlashML-org/FreeToken#393 rebased): OpenAI p…
gdevenyi Sep 23, 2026
718e703
fix(models): skip the ftw layout check for a bare ftw without an hf c…
gdevenyi Sep 18, 2026
73fdef7
merge #505: fix(scheduler): preserve pending hybrid checkpoint across…
gdevenyi Sep 23, 2026
a8db8b1
merge #466: fix(utils): tolerate coalesced msgpack frames in zmq pull…
gdevenyi Sep 23, 2026
8006d79
merge #414: fix(kernel): order the batch-memcpy probe against the cur…
gdevenyi Sep 23, 2026
7de020a
merge #118: fix(scheduler): clamp admission to the actual KV pool so …
gdevenyi Sep 23, 2026
79e086c
test(scheduler): give the rejection test's engine fake the pool size …
gdevenyi Sep 18, 2026
325eebc
merge #476: feat(server): add --default-thinking-mode flag for server…
gdevenyi Sep 23, 2026
df8eb16
merge #340: fix(engine): reserve the pool's dummy page in the --moe-c…
gdevenyi Sep 23, 2026
5a59b24
merge #198: fix(engine): reserve explicit KV pages during MoE auto-si…
gdevenyi Sep 23, 2026
2bf6860
merge #459: fix(checkpoint): validate FTW v1 indexes eagerly
gdevenyi Sep 23, 2026
1c0a087
merge #487: fix(server): hoist system messages to front for templates…
gdevenyi Sep 23, 2026
89c3c76
merge #222: fix(server): guarantee AbortMsg delivery on stream cancel…
gdevenyi Sep 23, 2026
6dd2dc0
test(server): abort every sample of an n>1 non-streaming request on d…
gdevenyi Sep 18, 2026
02d463c
fix(server): record requests with a pure asgi middleware so handlers …
gdevenyi Sep 18, 2026
2efcdd5
merge #499: feat(kvcache): host-RAM KV tier for sparse-attention mode…
gdevenyi Sep 23, 2026
7321b4f
merge #525: feat(kvcache): host-resident prefix tier for hybrid GDN m…
gdevenyi Sep 23, 2026
2253e4b
fix(kvcache): refuse the host kv tiers on an nvfp4 pool whose block s…
gdevenyi Sep 19, 2026
cf3b227
merge #500: perf(moe): single-launch prefill buffer invalidation with…
gdevenyi Sep 23, 2026
8e57f04
merge #108: feat(server): add OpenAI /v1/models/{model_id} endpoint
gdevenyi Sep 23, 2026
962821f
merge #504: feat(server): serve per-request inference metrics under -…
gdevenyi Sep 23, 2026
797cdb8
test(scheduler): give the scheduler stubs the prefill-start map the m…
gdevenyi Sep 23, 2026
375b7c0
merge #224: feat(server): OpenAI-compatible logprobs for chat and leg…
gdevenyi Sep 23, 2026
3224ef8
test(engine): give the logprobs sampler fakes the logits-processing f…
gdevenyi Sep 23, 2026
b458a1c
merge fork review fixes: 11 bugs found re-reviewing the 5080deploy stack
gdevenyi Sep 24, 2026
22851b9
merge fork fix (issue #65): run the PLE graph fill on its own thread,…
gdevenyi Sep 24, 2026
a312010
merge fork perf: load only the routed experts for short prefills (FRE…
gdevenyi Sep 24, 2026
531244a
merge fork fix: small-prefill on-demand path hands the LRU kernel uni…
gdevenyi Sep 24, 2026
41b4444
merge fork fix: small-prefill ensures its experts in decode-width chunks
gdevenyi Sep 24, 2026
3c73cea
merge fork perf: scored expert eviction (--moe-cache-policy), shared …
gdevenyi Sep 26, 2026
4b4f9f8
merge fork perf: expert prefetch into low-priority slots with single-…
gdevenyi Sep 27, 2026
05cb9f4
test(engine): give the kv quant config fake the rope table size #573'…
gdevenyi Oct 2, 2026
71d184d
merge #531: fix(server): clamp /v1/models context_length to the alloc…
gdevenyi Oct 2, 2026
bdd0fab
merge #269: fix(server): report why a tokenizer/detokenizer worker di…
gdevenyi Oct 2, 2026
386c403
merge #468: fix(engine): reject fa attention backend below sm_90 at c…
gdevenyi Oct 2, 2026
8289bb9
merge #461: fix(server): loopback-bind the TP rendezvous store, add -…
gdevenyi Oct 2, 2026
a8aa812
fix(engine): hand the rendezvous listen fd to TCPStore instead of kee…
gdevenyi Sep 25, 2026
480bea9
merge #484: feat(scheduler): interleave decode steps into long prefil…
gdevenyi Oct 2, 2026
3cd437f
merge #464: fix(scheduler): match stop strings with incremental decoding
gdevenyi Oct 2, 2026
5f777ec
fix(scheduler): trim the stop-match EOS only at the delivered output …
gdevenyi Sep 25, 2026
25d1ed0
test(tokenizer): cover a detokenize batch that carries one uid more t…
gdevenyi Sep 25, 2026
5d76e35
fix(scheduler): match stop strings in the text the request's skip_spe…
gdevenyi Sep 25, 2026
ab47aad
merge #266: fix(server): hide qwen transport markers from semantic re…
gdevenyi Oct 2, 2026
5e50099
merge #572: fix(server): keep a silent stream alive and notice a clie…
gdevenyi Oct 2, 2026
dd9cf45
perf(ple): skip the device n-gram hash for the disk table, which read…
gdevenyi Sep 25, 2026
36c9ead
fix(ple): give each graph fill its own readback event and keep every …
gdevenyi Sep 25, 2026
86a06f1
fix(ple): recycle the fill readback events instead of freeing them on…
gdevenyi Sep 25, 2026
b610dbe
fix(kvcache): refuse the host kv-page tier on a pool whose index slab…
gdevenyi Sep 25, 2026
c312d38
perf(kvcache): keep one gpu gdn snapshot slot when the host snapshot …
gdevenyi Sep 25, 2026
4ea7d4a
perf(scheduler): probe the host tier for the exact tombstone prefix
gdevenyi Sep 25, 2026
844bc49
fix(scheduler): re-probe the host entry after making room to rehydrat…
gdevenyi Sep 25, 2026
8905d0a
test(kvcache): cover the engine-stream waits of the prefix tier's kv …
gdevenyi Sep 25, 2026
2cc45a4
fix(engine): reserve the GDN prefill workspace in the cache budget
Aug 30, 2026
1c7dc2c
fix(engine): reserve the gdn prefill workspace in the rebuild fit-che…
gdevenyi Sep 25, 2026
c54922a
fix(engine): count min_tokens progress from the device length
gdevenyi Sep 25, 2026
36a8fb5
test(engine): import pytest for the parametrized min_tokens test
gdevenyi Oct 2, 2026
4f1ecf0
fix(server): let protocol-level thinking requests win over --default-…
gdevenyi Sep 25, 2026
58bd0ae
fix(server): type allOf-wrapped refs and untyped enum/const tool para…
gdevenyi Sep 25, 2026
90a6175
fix(server): keep /v1/models/ listing the model after the retrieve route
gdevenyi Sep 25, 2026
a33da2f
fix(server): open the streamed thinking block with the signature field
gdevenyi Sep 25, 2026
481738d
test(server): exercise detector SDK and lifecycle contracts
gdevenyi Sep 25, 2026
4d99e7f
fix(server): drop /v1/completions from the --enable-metrics-report he…
gdevenyi Sep 25, 2026
42a053b
fix(server): keep developer ahead of system and reject images when me…
gdevenyi Sep 25, 2026
ce31cd4
test(server): ask for n=0 in the invalid-request sdk test, since n=2 …
gdevenyi Oct 2, 2026
14d1b92
fix(moe): keep unpinned layers off the small-prefill path and take it…
gdevenyi Sep 25, 2026
b0c020d
test(moe): let the small-prefill ensure fake take the eviction policy…
gdevenyi Oct 2, 2026
71a92db
test(qwen4_exp): compare chunked prefill to one-shot at bf16 tolerance
gdevenyi Sep 4, 2026
f8e4396
test(qwen4_exp): compare the chunked prefill's compressed slab rows t…
gdevenyi Sep 25, 2026
e06b2b2
fix(kernel): keep the triton sampling softmax finite over a fully mas…
gdevenyi Sep 25, 2026
588677e
feat(engine): keep the token embedding in pinned host ram (--embed-we…
gdevenyi Sep 25, 2026
bf064fd
fix(layers): gather fp32 host embeddings and refuse other dtypes at p…
gdevenyi Sep 25, 2026
b7676a3
fix(kernel): compute the host gather output offset in int64
gdevenyi Sep 25, 2026
bc1d696
fix(engine): charge the host embedding's pinned bytes to the pin budget
gdevenyi Sep 25, 2026
2b71134
fix(engine): refuse --embed-weights host for a tied embedding or tp >…
gdevenyi Sep 25, 2026
ee3f94f
test(engine): fake cached_load_hf_config with the overrides argument …
gdevenyi Oct 2, 2026
423f205
test(ple): drive overlapped graph fills against an in-order fake stre…
gdevenyi Oct 2, 2026
dd97213
merge #578: perf(moe): dequant nvfp4 prefill experts by bit placement…
gdevenyi Oct 2, 2026
28ba6af
fix(kernel): keep one e4m3_f32_to_u8, #408's copy duplicates the one …
gdevenyi Oct 7, 2026
99c0413
fix(server): leave late Anthropic system messages to the inline-syste…
gdevenyi Oct 7, 2026
1b6e0f0
test(server): give main's DeepSeek-V4.1 detector its contract class a…
gdevenyi Oct 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/issue-title-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
amd:
- '/\b(ROCm|HIP|RCCL|RDNA\s?\d?|CDNA\s?\d?|gfx\d{3,4}[a-z]?|MI\d{3}X?|RX\s?\d{4}|Radeon(?!\s*(\d{3}M|Graphics|Vega))|AMD[\s-]*(GPUs?|graphics|cards?|Instinct))\b|\bAMD[\s-]*显卡|\(amd\)|(?<!\w)A卡/i'
18 changes: 15 additions & 3 deletions .github/workflows/issue-labels.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,35 @@
name: Label issues
name: Label issues and PRs

on:
issues:
types: [opened, edited]
pull_request_target:
types: [opened, edited]

permissions:
issues: write
pull-requests: write

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@v3.4
- if: github.event_name == 'issues'
uses: github/issue-labeler@v3.4
with:
configuration-path: .github/issue-labeler.yml
enable-versioned-regex: 0
include-title: 0
repo-token: ${{ github.token }}
- if: github.event.action == 'opened'
- if: github.event.action == 'opened' || github.event.changes.title
uses: github/issue-labeler@v3.4
with:
configuration-path: .github/issue-title-labeler.yml
enable-versioned-regex: 0
include-title: 1
include-body: 0
repo-token: ${{ github.token }}
- if: github.event_name == 'issues' && github.event.action == 'opened'
uses: actions/github-script@v7
with:
script: |
Expand Down
62 changes: 62 additions & 0 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,67 @@ batch size x miss rate.
python benchmarks/bench_offload_cache_copy.py
```

**`bench_scored_ensure.py`** — synthetic (no checkpoint): us per decode `ensure` call at a
fixed miss count, flashlib `lru_ensure` vs the `--moe-cache-policy` kernels (lru, kd, kdfb,
rule), from a CUDA graph of two decode steps on a full cache. `--stats` times it with
`--moe-collect-stats` accumulation on.

```bash
python benchmarks/bench_scored_ensure.py --slots 1650 --k 10,20
```

**`bench_moe_copy_overlap.py`** — synthetic (no checkpoint): `FREETOKEN_MOE_COPY_OVERLAP`
off vs on for Qwen4ExpMoE decode layers at the Qwen3.8-Flash-Next expert geometry, as CUDA
graphs. Checks the outputs are bitwise identical, times replays ABAB, and profiles the copy's
start after the ensure and how much of the side-stream shared expert runs inside it.

```bash
python benchmarks/bench_moe_copy_overlap.py --bs 1 --slots 160
```

**`bench_moe_prefetch.py`** — synthetic (no checkpoint): `FREETOKEN_MOE_PREFETCH=measure`
cost. The router-lookahead predictor alone per layer (GEMV `[bs, 2560] x [2560, 512]`, top-K
select, and the count kernel), then prefetch off vs measure on a real-geometry Qwen4ExpMoE decode
stack (512 experts, rule eviction, copy overlap on) with forced routing that misses exactly m
experts per layer, as CUDA graphs. `--on` times whole 48-layer decode steps with prefetch off vs
on instead: a GEMV per layer stands in for attention (`--filler-us`), each layer prefetches 3 or
4 candidates of which `--useful` are its misses, and `--delay-us` holds every prefetch copy back
to price a late one. It reports ms/step, demand misses/step and the late fraction. `--steady
--trace DIR` runs steady-state decode on a recorded routing trace instead (experts.npy,
logit_idx.npy, logit_val.npy, req_index.npy): no cache restore, so wrong prefetches and evictions
carry over, and a noisy copy of each layer's traced logits (`--sigma`) stands in for the
lookahead. Arms such as `off,measure,on,on:4/4` (budgets before GDN / QSA layers) replay step by
step in turn, each on its own copy of the cache state; it adds pollution (non-resident demands
per layer against off's misses) and the late fraction per layer kind. Slots and sigma were
calibrated to production's measure line (misses/layer ~4.3, precision ~0.56) at 24 layers.

```bash
python benchmarks/bench_moe_prefetch.py --bs 1,2 --misses 0,4
python benchmarks/bench_moe_prefetch.py --on --bs 1,2 --misses 4 --delay-us 0,50,150,300
python benchmarks/bench_moe_prefetch.py --steady --trace DIR --bs 1,2 --steady-slots 740 --sigma 0.55 \
--arms off,measure,on,on:empty,on:3/3,on:4/4,on:4/5
```

**`bench_expert_copy_corun.py`** — synthetic (no checkpoint): the fused expert copy kernel
alone and beside compute, on registered host banks with the qwen4_exp NVFP4 row sizes. Sweeps
`fast_index_copy_multi` (threads x blocks/bank) and `fast_index_copy_multi_slim`
(blocks x threads x unroll) over 1..10-expert plans (GB/s, "hot" back-to-back and "cold"
spacer-separated copies), then reports the stretch sigma of bf16/fp8 GEMVs, a small matmul and
the NVFP4 routed decode GEMV while a copy loop runs on another stream. `--json` keeps the raw
per-trial times.

```bash
python benchmarks/bench_expert_copy_corun.py --trials 5 --json copy_corun.json
```

For host RAM vs PCIe bandwidth and the offload/hybrid backend pick, use `ft bench bw`
instead — it writes the JSON profile the engine reads.

**`bench_kv_quant.py`** compares BF16, FP8 and NVFP4 KV storage bytes, one-step
scatter latency and paged decode latency on synthetic inputs. No checkpoint is
required. Keep the GPU idle and use identical arguments for A/B comparisons;
this does not measure model quality or end-to-end serving throughput.

```bash
PYTHONPATH=python:. uv run python benchmarks/bench_kv_quant.py --lengths 1024,8192,32768
```
Loading