Repository navigation
Conversation
KarrAcaRn
pushed a commit
to KarrAcaRn/FreeToken-ByAI
that referenced
this pull request
Oct 21, 2026
FlashML-org#777 FlashML-org#776 FlashML-org#774 FlashML-org#781 FlashML-org#779 deferred. Assisted-by: Claude Opus 5.5
This branch has not been deployed
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.
Relates to #541.
Add two optional native HIP M=1 block-FP8 dense decode and routed MoE decode kernels for R9700. They use BF16 activations and FP8 weights (W8A16), inherit FT
LinearKernel/MoEKernelpacking, and consume existingExpertViewbanks. FTW compatibility, CPU experts, hybrid routing, shared experts and cache ownership remain with FT.FREETOKEN_USE_ARK=0is the default. Enabling it selects only measured eager shapes in the exact-environment profile; unsupported inputs retain independent FT primitives. Graph stays FT. Dense M>1 stays FT W8A8; MoE prefill and other operator families are outside this PR. Both HIP units and the Torch bridge build from packaged source.Validation
Eager model A/B
Qwen/Qwen3-30B-A3B-FP8, local FTW, BF16 activation/KV, offload, 20GiB cache, concurrency 1, 256 generated tokens. Three fresh-process paired rounds, alternating service/context order, with per-context warmup. Baseline: FT compute at
fe5a5ec9c5644e266527de5afb9f1156b9bdcabb, switch off. Final cleaned sources were remeasured; formal services have no profiler or diagnostic wrapper.All three pairs improve at both lengths. All 12 formal requests independently verify usage, 256 nonempty token events and zero prefix reuse. Decode tok/s is 255 / (last token time - first token time). Free-running continuations differ; results include changed cache traffic and shared-host variation. No Graph or sustained-CPU hybrid speedup is claimed.
Environment and commands
One Radeon AI PRO R9700 32GiB (
gfx1201, 23:00.0), one EPYC 9334 socket (0-31,64-95, memory interleave 2-3) on a shared dual-socket host. Torch 2.14.0+rocm10.1.0 / HIP 7.16.26385, Triton 3.8.0; Ubuntu 24.04.1, kernel 7.0.0-38, amdgpu 7.1.9.31600000. Other environments require recalibration.Expose one R9700. Run the following with
FREETOKEN_USE_ARK=0and=1, using identical 512/32768-token completion prompts, temperature 0, ignore_eos and 256 output tokens:Contracts, build and selection.