Add support to Mistral large 3 eagle with dense layers (#36163)

Signed-off-by: juliendenize <julien.denize@mistral.ai>
Signed-off-by: Julien Denize <40604584+juliendenize@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Julien Denize
2026-03-11 16:42:56 +01:00
committed by GitHub
parent 5573894737
commit afebeffbfb
2 changed files with 28 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import copy
from collections.abc import Iterable
from functools import partial
@@ -33,7 +34,9 @@ class EagleMistralLarge3Model(DeepseekV2Model):
):
nn.Module.__init__(self)
config = vllm_config.model_config.hf_config
config = copy.deepcopy(vllm_config.model_config.hf_config)
config.first_k_dense_replace += start_layer_id
quant_config = vllm_config.quant_config
self.config = config
self.vllm_config = vllm_config
@@ -53,6 +56,7 @@ class EagleMistralLarge3Model(DeepseekV2Model):
DeepseekV2DecoderLayer(
vllm_config=vllm_config,
prefix=maybe_prefix(prefix, f"layers.{i + start_layer_id}"),
config=config,
)
for i in range(self.config.num_hidden_layers)
]