Repository navigation
Conversation
…ache, bit-identical to the stream
OffloadMoeCache raises when --moe-prefill-demand-tokens is set for cpu or hybrid decode, whose experts are not read from the slot cache a demand-loaded chunk fills; the test drives both targets.
…s on demand through the slot cache Resolved onto the fork's small-prefill path (FREETOKEN_MOE_SMALL_PREFILL_TOKENS), which this supersedes: the on-demand branch now takes max(--moe-prefill-demand-tokens, the env knob), keeps the fork's _ensure_unique (unique ids in decode-width chunks, scored-eviction pin, no decode-state update, counts_as_decode=False) and runs FlashML-org#676's prefill GEMM over the slot cache (n=cache_size, is_prefill=True) instead of the decode GEMM, so its output matches the streamed layer. Tests updated for the prefill GEMM and the unique-id ensure. Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bu6LgoxLR4wETqb7RPR2vt
A kernel autotunes on its first launch of each key, which can be the first request after the cache planner has handed out nearly all VRAM; triton's flat 256 MB flush buffer was an OOM there on an 11 GB card. Four times the L2 still evicts it between timed runs. Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit ffbf001) (cherry picked from commit e097977)
Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit 32007ec)
…nalty prompt mask Fork #47's sampler plan scattered the raw prompt ids into a [rows, vocab+1] mask; image tokens carry pseudo-ids >= 1,000,000, so repetition_penalty with an image indexed out of bounds -- a device-side assert that takes the server down. They now land in the scratch column. Also keeps presence/frequency out of the LogitsPlan: with FlashML-org#527 device counts and FlashML-org#393 plan both applying them, a request with a penalty plus any plan processor was penalized twice. (cherry picked from commit 66053de) Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit b988390)
…r-step prompt upload (up to 262K ids) and a synchronous pageable copy, which stalled the overlap loop and saw the output one token late. The prompt mask is now built once per request, the output side reuses FlashML-org#527's device counts, and the order is vLLM's (repetition, then presence and frequency). Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit 343d742) (cherry picked from commit 3df811d)
Rejecting response_format with "no constrained decoding" breaks OpenAI-compatible clients that rely on json_object/json_schema even when the model can emit valid JSON from a prompt. Accept those wire types and prepend a best-effort system hint; schema is not token-level enforced. Unknown response_format types still return 400. (cherry picked from commit ca7d704) (cherry picked from commit db64d8e)
…allback this branch does not carry Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bu6LgoxLR4wETqb7RPR2vt
sgl_kernel's moe_align_block_size (0.4.5 and 0.4.9) reads out of bounds once num_experts + 1 exceeds 1024: an illegal memory access that poisons the CUDA context. A prefill over the offload slot cache (FlashML-org#676) aligns against the slot count, 2100 here, so the first short prefill crashed the server; the bf16 and NVFP4 prefill paths both go through it. The Triton align has no such limit and matches sgl_kernel's output below it. Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Bu6LgoxLR4wETqb7RPR2vt
Owner
Author
|
Rollback to
|
Owner
Author
|
Side calls during a long conversation (255K prompt; one side call lands mid-prefill and three during decode; 512-token decode):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #85. This is the new 5080deploy tip
8eb353b3, deployed 2026-10-13.FlashML-org#676 (on-demand experts for short prefill chunks), merged as a replacement for the fork's
FREETOKEN_MOE_SMALL_PREFILL_TOKENSpath:max(--moe-prefill-demand-tokens, env)._ensure_unique: unique ids in decode-width chunks, the scored-eviction pin, andcounts_as_decode=False.n=cache_size, is_prefill=True) instead of the decode GEMM, so the output is bit-identical to the streamed layer.Two bugs in FlashML-org#676 as posted, both reported on the PR:
ensure_expertsgets the chunk's fulltokens x top_kids. On main's LRU kernel, 64-token chunks stall and 128 or more fail to compile (numel exceeds triton maximum tensor numel). The fork's unique-id chunking avoids this.8eb353b3fix(moe): sgl_kernel'smoe_align_block_sizemakes an illegal memory access oncenum_experts + 1 > 1024(0.4.5 and 0.4.9). The prefill over a 2100-slot cache aligns against the slot count, so the server crashed on its first short prefill. The fix routes to the Triton align past the limit, with a regression test.Deployed with
--moe-prefill-demand-tokens 512. TTFT over a cached ~28k prefix:Cold greedy fingerprints are identical at every threshold, and decode is unchanged.
From 1080deploy:
3df811deandb9883902: penalties from device state. fix(sampling): apply presence and frequency penalties FlashML-org/FreeToken#527's device counts plus a once-per-request prompt mask replace feat(server): OpenAI protocol coverage -- sampling extras, n, echo/suffix, usage details, tokenize/detokenize/metrics #47's per-step upload of up to 262k prompt ids. This also fixes an out-of-bounds index on image tokens and double-applied penalties.e097977e: the Triton autotune flush buffer is sized to the device L2.32007ecb: the async coalesced-pull test is fixed.moe_alignrecompile fix.From chatdnpdeploy:
0e847f8c,8f8d7fbd,081534bb). Bit-identical (same fingerprints and NLL), with no measurable decode change here.response_formatjson_object/json_schemaare soft-accepted.top_k <= 0, the disconnect watch on/v1/messagesand/v1/responses, the developer merge, the non-finite repetition penalty check, the n>1 cancel, and the continue-final parse.Tests:
Launcher (
run-freetoken.sh):source .venv-t214and--moe-prefill-demand-tokens 512. The backup isrun-freetoken.sh.bak-2026-10-13.🤖 Generated with Claude Code
https://claude.ai/code/session_01Bu6LgoxLR4wETqb7RPR2vt