Safetensors
speculators
speculative-decoding
eagle3
vllm
trainium

Mistral-7B-Instruct-v0.3 EAGLE3 draft

An EAGLE-3 speculative-decoding draft for mistralai/Mistral-7B-Instruct-v0.3, in the speculators checkpoint format. Trained on AWS Trainium2.

Speculative decoding with a draft does not change the target's output distribution: every proposed token is verified by the target. Under greedy decoding the output matches the target alone up to floating-point tie-breaking.

Usage (vLLM)

vllm serve mistralai/Mistral-7B-Instruct-v0.3 \
  --speculative-config '{"method": "eagle3", "model": "<this repo>", "num_speculative_tokens": 3}'

The same command works on Trainium2 with vllm-neuron (--tensor-parallel-size 4 on a trn2.3xlarge). At the time of writing, MistralForCausalLM support for vllm-neuron is in the public fork jimburtoft/vllm-neuron (branch mistral-trn2-0.29).

Training code: https://github.com/jimburtoft/mistral-7b-eagle3.

Architecture

Draft layers 1 Llama-style decoder layer (hidden 4096, 32 Q / 8 KV heads, MLP 14336)
Target features hidden states entering target layers 2, 16, 29 (eagle_aux_hidden_state_layer_ids)
Vocabulary full target vocabulary (32,768); no draft-vocab pruning
Embedding / LM head copied from the target and frozen during training
Trainable parameters 293.6 M

Training

  • Prompts: 87,473 first user turns from UltraChat 200k (60,000), Magicoder OSS-Instruct 75K (20,000) and GSM8K train (7,473), all MIT-licensed. Train and test prompts are deduplicated against each other.
  • Responses: every response was regenerated by Mistral-7B-Instruct-v0.3 itself (greedy, up to 2,048 tokens), so the draft learns the target's own distribution. No third-party responses were used.
  • Tokens: 61.2 M packed tokens (2,048-token rows), 44.8 M of them response tokens with loss.
  • Objective: EAGLE-3 training-time test with 3 steps, forward KL to the target's next-token distribution, teacher-forced token inputs.
  • Optimizer: AdamW (betas 0.9 / 0.95), bf16 autocast with fp32 master weights, cosine LR, grad clip 1.0.
  • Hardware: one trn2.3xlarge (one Trainium2 device): 3 NeuronCores compute target features, 1 trains the draft.

Evaluation

All evaluation prompts are held out from training (UltraChat test_sft, a hashed Magicoder hold-out, GSM8K test). Greedy decoding.

Offline acceptance length (1 + mean accepted draft tokens per verification step), 1,000 held-out conversations with target-generated responses:

Prompts k=1 k=2 k=3 k=4 k=5
UltraChat (chat) 1.74 2.29 2.70 3.00 3.22
Magicoder (code) 1.87 2.61 3.25 3.79 4.24
GSM8K (math) 1.86 2.57 3.16 3.64 4.02

Served on AWS Trainium2 (one trn2.3xlarge, vLLM 0.29 + vllm-neuron, tensor parallel 4, num_speculative_tokens: 3, 256 output tokens). Median time per output token, compared with the same server without speculation:

Prompts Concurrency 1 Concurrency 4 Concurrency 8 Served acceptance length
UltraChat 8.68 -> 4.98 ms (1.74x) 10.04 -> 6.64 ms (1.51x) 10.95 -> 8.87 ms (1.23x) 2.53
Magicoder 8.68 -> 4.01 ms (2.16x) 10.06 -> 5.59 ms (1.80x) 11.02 -> 7.33 ms (1.50x) 3.07
GSM8K 8.68 -> 4.00 ms (2.17x) 10.03 -> 5.58 ms (1.80x) 10.94 -> 7.42 ms (1.47x) 2.98

num_speculative_tokens: 3 was the fastest setting at concurrency 1-8 (2, 4 and 5 were measured).

Accuracy: GSM8K test (1,319, zero-shot chain of thought, greedy) is 59.5 % without speculation and 59.7 % with the draft.

Limitations

  • Trained on English chat, code and math prompts with responses up to 2,048 tokens. Acceptance is lower on other languages, long contexts and domains far from the training mix.
  • The acceptance numbers above are for greedy decoding. With sampling (temperature > 0) acceptance is lower.

License and attribution

Apache-2.0. The checkpoint includes the target's embedding and LM-head weights (Mistral-7B-Instruct-v0.3, Apache-2.0, Mistral AI). Prompt sources: UltraChat 200k (MIT), Magicoder OSS-Instruct 75K (MIT), GSM8K (MIT). Method: EAGLE-3 (Li et al., 2025); checkpoint format: speculators (Apache-2.0).

Downloads last month
37
Safetensors
Model size
0.6B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for jburtoft/Mistral-7B-Instruct-v0.3-EAGLE3

Finetuned
(531)
this model

Datasets used to train jburtoft/Mistral-7B-Instruct-v0.3-EAGLE3

Paper for jburtoft/Mistral-7B-Instruct-v0.3-EAGLE3