Mistral batched decode: LLaMA decode path + parameterized RoPE theta (12x batched, full serving stack)#2
Open
mikepapadim wants to merge 1 commit into
Conversation
…Configuration + parameterize RoPE theta; full serving stack works (12x batched, coherent, prefix-consistent)
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.
Mistral batched decode (LLaMA decode path, no new kernels)
Extends the batched-decode engine (PR beehive-lab#129) to Mistral with a tiny generalization — Mistral
is LLaMA-arch (uses
LlamaState+LlamaTornadoWeights, all accessors on the baseConfiguration), so it runs the existing LLaMA decode path unchanged except:config.ropeTheta();Mistral = 1e6, was hardcoded). Prefill ropes untouched; Llama-1B re-verified coherent.
LlamaFP16LayersBatchDecodeMMA) to the baseConfigurationand dropped theLlamaConfigurationcast in the engine.No new kernels. Any LLaMA-family model (RMSNorm + SwiGLU + GQA + RoPE, no QK-norm, no sliding
window) now drops in the same way; the full serving stack (continuous batching, PagedAttention,
prefix caching, on-device sampling) is model-agnostic and applies unchanged.
Verified — Mistral-7B-Instruct-v0.3 FP16, RTX 4090 (CUDA backend)
Output sample (greedy): "The capital of France is Paris. It is one of the most famous cities in
the world, known for its art, fashion, cuisine, and historical landmarks such as the Eiffel Tower,
Louvre Museum, and Notre…"
Base branch:
feat/static-batched-decode(PR beehive-lab#129). Tracked in roadmap issue beehive-lab#130.