Repository navigation
Conversation
…ention (FlashML-org#632) * perf(kernel): skip masks and out-of-window tiles in triton extend attention * perf(kernel): drop the sm90-only register cap and k/v pipelining in triton extend attention
# Conflicts: # docs/models.md # python/freetoken/attention/triton.py # python/freetoken/kernel/triton/attention.py # python/freetoken/kvcache/__init__.py # python/freetoken/kvcache/qsa_pool.py # Conflicts: # docs/models.md # python/freetoken/attention/triton.py # python/freetoken/kernel/triton/attention.py # python/freetoken/kvcache/__init__.py # python/freetoken/kvcache/qsa_pool.py # Conflicts: # docs/models.md # python/freetoken/attention/triton.py # python/freetoken/kernel/triton/attention.py # python/freetoken/kvcache/__init__.py # python/freetoken/kvcache/qsa_pool.py # Conflicts: # docs/models.md # python/freetoken/attention/triton.py # python/freetoken/kernel/triton/attention.py # python/freetoken/kvcache/__init__.py # python/freetoken/kvcache/qsa_pool.py # tests/kernels/test_e4m3_compat.py # Conflicts: # docs/cli.md # docs/models.md # python/freetoken/attention/triton.py # python/freetoken/kernel/triton/attention.py # python/freetoken/kvcache/__init__.py # python/freetoken/kvcache/base.py # python/freetoken/kvcache/qsa_pool.py # tests/kernels/test_e4m3_compat.py # Conflicts: # docs/cli.md # docs/models.md # python/freetoken/attention/triton.py # python/freetoken/kernel/triton/attention.py # python/freetoken/kvcache/__init__.py # python/freetoken/kvcache/base.py # python/freetoken/kvcache/qsa_pool.py # tests/kernels/test_e4m3_compat.py
# Conflicts: # tests/tokenizer/test_tokenize.py # Conflicts: # tests/tokenizer/test_tokenize.py
…d-request # Conflicts: # python/freetoken/engine/config.py # Conflicts: # python/freetoken/engine/config.py # Conflicts: # python/freetoken/engine/config.py # Conflicts: # python/freetoken/engine/config.py # Conflicts: # python/freetoken/engine/config.py
… is measurable # Conflicts: # python/freetoken/engine/engine.py # Conflicts: # python/freetoken/engine/engine.py # Conflicts: # python/freetoken/engine/engine.py # Conflicts: # python/freetoken/engine/engine.py # Conflicts: # python/freetoken/engine/engine.py
…acked on FlashML-org#385 TP) # Conflicts: # python/freetoken/models/qwen4_exp/attention.py # python/freetoken/models/qwen4_exp/config.py # python/freetoken/models/qwen4_exp/weight.py # Conflicts: # python/freetoken/models/qwen4_exp/attention.py # python/freetoken/models/qwen4_exp/config.py # python/freetoken/models/qwen4_exp/weight.py # Conflicts: # python/freetoken/models/qwen4_exp/attention.py # python/freetoken/models/qwen4_exp/config.py # python/freetoken/models/qwen4_exp/weight.py # Conflicts: # python/freetoken/layers/quantization/moe/nvfp4.py # python/freetoken/models/qwen4_exp/attention.py # python/freetoken/models/qwen4_exp/config.py # python/freetoken/models/qwen4_exp/weight.py # Conflicts: # python/freetoken/layers/quantization/moe/nvfp4.py # python/freetoken/models/qwen4_exp/attention.py # python/freetoken/models/qwen4_exp/config.py # python/freetoken/models/qwen4_exp/weight.py
… bound, not an oracle
…lit differs from the fp8 env flags
…when its slot floor does not fit
…wo-stage to fit sm_120 shared memory
…ing ones in a runtime rebuild
…e Hugging Face repo ids to a local checkpoint dir # Conflicts: # python/freetoken/utils/hf.py
…verage # Conflicts: # python/freetoken/tokenizer/tokenize.py # Conflicts: # python/freetoken/engine/sample.py # python/freetoken/tokenizer/tokenize.py # Conflicts: # python/freetoken/engine/sample.py # python/freetoken/tokenizer/tokenize.py # Conflicts: # python/freetoken/engine/sample.py # python/freetoken/tokenizer/tokenize.py
…onfig Fork #19 asks the model family to check the stored fp8 split against the env flags; a synthetic FTW written straight from tensors (upstream's test_ftw_weights) carries no config.json, so there is no family to ask and the read proceeds as before. Assisted-by: Claude Fable 5.1 (cherry picked from commit cab9be3) (cherry picked from commit e59e544)
…oint across prefill chunks
…in zmq pull queues
…nst the current stream
…KV pool so oversized prompts fail loudly
Assisted-by: Claude Opus 5.5
…thinking-mode returned early, so reasoning_effort / reasoning.effort / thinking.type were silently turned off under --default-thinking-mode chat. count_tokens also skipped the default. Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit 8276ccd)
…meters FlashML-org#435 sends any parameter it cannot type to the loose JSON parser, so an untyped string enum member such as "1" came back as the integer 1, outside the enum. Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit ab2693c)
Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit 7ccc433)
The full response and the closing signature_delta already send signature="", but exclude_none dropped it from content_block_start, where the SDK types it as required. Taken from upstream FlashML-org#517 (b044276). Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit 55a8e72)
Upstream FlashML-org#517 tests without its docs and pyproject dev-extra: the SDK tests importorskip anthropic/openai/httpx so the server suite still collects without them. (cherry picked from commit b044276, tests only) Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit 50f99d1)
…lp, which it does not serve Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit c6b7ce7)
…rging system messages render_messages hoisted system ahead of a leading developer message, which the tokenizer then merged as "S\n\nD"; it now leaves developer requests to the tokenizer's per-template mapping. Both merge sites joined str() of an image part list into the prompt, data URL included; they now raise the template's 400 instead. Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit e60b2c3)
…is served here Assisted-by: Claude Opus 5.5
… in every layer An unpinned layer's copy_missing is the whole-layer pageable copy, which cannot serve the LRU slot remap, so it keeps streaming. The per-layer fallback when a layer routes to more than half the cache is gone: the engine's num_experts slot floor already keeps every chunk resident, and a uniform path cannot leave a later layer in an overlap buffer that was never begun. Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit 37c2479)
… kwargs Assisted-by: Claude Opus 5.5
`torch.equal` fails for all three cut points on torch 2.11.0+cu130 / flashinfer 0.6.18 / triton 3.6.0 (sm_89): cuBLAS picks a different kernel for M=5000 and M=5000-cut, so the indexer's q and k round differently, a few rows flip one block at the top-k margin, and the layer output differs by up to 2.6e-3 (a few bf16 ulps). Both paths are deterministic run to run. Use the tolerance of the neighbouring oracle tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0173pf9k9fSVtwbm3f898HDt (cherry picked from commit 3849e3c) Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit e700e8f)
…o the one-shot run At bf16 output tolerance a broken dual-source compress only swaps a block in a few rows and passes; the slab keys are unit-scale, so a wrong straddling-group key stands out. Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit cedf179)
…ked prefix min_p (FlashML-org#393) writes -inf over most of the vocabulary; a column chunk or leading block that is -inf throughout computed exp(-inf - -inf) = NaN and poisoned the whole row. Pascal samples through this softmax (no flashinfer below sm_75), so min_p > 0 drew uniform noise. Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit dbe82ad)
…ights host) The embedding is a row lookup, so a single-GPU engine can leave the table in page-locked host RAM and gather each step's rows over UVA with the PLE row kernel (5 KiB per decode token, graph-safe): 1.2 GiB of VRAM back for Qwen3.8-Flash-Next. Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit 9f2b7a2)
…lacement Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit ccfb2b8)
No regression test: overflowing it needs an output of 2^31+ elements (4 GiB+ in bf16). Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit cc5af7a)
Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit a8b2f0a)
… 1 at config time Assisted-by: Claude Opus 5.5 (1M context) (cherry picked from commit 579e03a)
…lashML-org#573 passes Assisted-by: Claude Opus 5.5
…am so a post-launch fence fails as a hang Upstream FlashML-org#588's _graph_consumed fence is left out of the merge: our graph fill runs on the filler thread before its own launch passes its WAIT, so that fence deadlocks the second step. Assisted-by: Claude Opus 5.5
…t placement and load activations contiguously # Conflicts: # tests/kernels/test_e4m3_compat.py # Conflicts: # python/freetoken/kernel/triton/e4m3_compat.py # tests/kernels/test_e4m3_compat.py # Conflicts: # python/freetoken/kernel/triton/e4m3_compat.py # python/freetoken/kernel/triton/nvfp4_fused_moe.py # tests/kernels/test_e4m3_compat.py
…es the one FlashML-org#603 added to main Assisted-by: Claude Opus 5.5
…m policy instead of hoisting them FlashML-org#487's hoist ran before FlashML-org#608's fold on /v1/messages and moved a late system reminder into the system head, so every reminder missed the prefix cache; the OpenAI and Responses paths keep the hoist the qwen templates need. Assisted-by: Claude Opus 5.5
…nd the count fake the inline-system kwarg Assisted-by: Claude Opus 5.5
…stops the server
…ctory that already holds an FTW
…d experts The expert spec now takes its tensor names and global-scale direction from the checkpoint's quant config, as qwen3_5_moe does, so RedHatAI/Qwen3.8-Flash-Next-NVFP4 loads and converts; the nvidia modelopt checkpoint keeps the same spec. Assisted-by: Claude Opus 5.5
…g#610's blocks_per_bank through Assisted-by: Claude Opus 5.5
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 #82. The base
5080/base-ecb52158is the previous 5080deploy tip. This PR rebuilds 5080deploy on upstream main07813248, which has 4 new commits:Superseded work: none this round. None of the 4 commits is patch-equivalent to a fork commit, and all 103 replayed steps still change something on the new base. The carried PRs whose upstream heads moved (FlashML-org#408, FlashML-org#435, FlashML-org#572, FlashML-org#578) have identical content, so their recorded heads are kept.
Replay: the same method as #81. Two hand resolutions:
kernel/triton/attention.py(at the feat(kvcache): add nvfp4 kv quantization FlashML-org/FreeToken#408 step):_extend_tile_rangesand_extend_attend_tile._extend_attend_cache_tile(the fp8/NVFP4 twin; fp8 scales on the dot outputs,l_ifrom unscaledp), dispatched onHAS_KV_SCALEin both cache loops. The new-token loops stay as upstream wrote them.kernel/triton/nvfp4_fused_moe.py(at the perf(moe): dequant nvfp4 prefill experts by bit placement and load activations contiguously FlashML-org/FreeToken#578 step): union of the two import lines.Effect in production. Only FlashML-org#631 changes what this deployment runs: it is the Triton NVFP4 MoE decode GEMV, used in every layer at every decode step. An r4-without-FlashML-org/FreeToken#631 arm reproduces the previous greedy fingerprints bit-for-bit in both rounds.
Interleaved A/B, 2 rounds, RTX 5080, production config (2100 slots, rule eviction, prefetch, host embedding):
ecb52158ae6eb52fe5986364, ctx65dfde98bc9ee057, thinkc0b1deb72c69c83d.thinkfingerprint differed (Cold greedy output occasionally differs between server starts under the new decode numerics (upstream #631/#585), think prompt only #83). A micro-test shows perf(kernel): avoid layout conversions in nvfp4 marlin decode FlashML-org/FreeToken#631's kernel itself is deterministic, and that its wide and narrow activation loads give the same bits.Tests:
test_dsfp4_reference_semanticsGEMV case, which fails the same way on pure upstream on sm_120.Not merged this round:
🤖 Generated with Claude Code
https://claude.ai/code/session_01Bu6LgoxLR4wETqb7RPR2vt