Downloads · 30 days
52
10% of all-time downloads
nebius/MEDUSA-Llama-3.1-8B-Instruct
MEDUSA-Llama-3.1-8B-Instruct is a text generation model from nebius. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as cc-by-4.0.
This is a MEDUSA draft model for Llama-3.1-8B-Instruct, trained from scratch using LK losses — training objectives that directly target acceptance rate rather than using KL divergence as a proxy.
Downloads · 30 days
52
10% of all-time downloads
All-time downloads
543
Public
Parameters
3.3B
6.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.5 GB · 100%
From the Hugging Face model README
This is a MEDUSA draft model for Llama-3.1-8B-Instruct, trained from scratch using LK losses — training objectives that directly target acceptance rate rather than using KL divergence as a proxy.
Average acceptance length (τ) measured across MT-bench, HumanEval, and GSM8K with K = 6:
| Configuration | Temperature = 0 | Temperature = 1 |
|---|---|---|
| MEDUSA + KL | 2.19 | 1.85 |
| MEDUSA + LK (ours) | 2.21 | 2.00 |
Note: Earlier vLLM versions sampled draft tokens greedily regardless of temperature, which underestimated acceptance rates at temperature > 0. Stochastic draft sampling was introduced in v0.18.0, and from v0.21.0 it can be enabled via
speculative_configusingrejection_sample_methodanddraft_sample_method. The acceptance metrics reported above were measured under standard rejection sampling and are reproducible with the configuration below.
from vllm import LLM, SamplingParams
llm = LLM(
model="meta-llama/Llama-3.1-8B-Instruct",
speculative_config={
"method": "medusa",
"model": "nebius/MEDUSA-Llama-3.1-8B-Instruct",
"num_speculative_tokens": 6,
"rejection_sample_method": "standard",
"draft_sample_method": "gumbel",
},
)
sampling_params = SamplingParams(temperature=0.7)
outputs = llm.generate(["Explain speculative decoding in simple terms."], sampling_params)
This model was trained using outputs from meta-llama/Llama-3.1-8B-Instruct. Use of this model is additionally subject to the Llama 3.1 Community License Agreement.
Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
@misc{samarin2026lklosses,
title = {LK Losses: Direct Acceptance Rate Optimization for Speculative Decoding},
author = {Alexander Samarin and Sergei Krutikov and Anton Shevtsov and Sergei Skvortsov and Filipp Fisin and Alexander Golubev},
year = {2026},
eprint = {2602.23881},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2602.23881}
}