[Bugfix] Fix MTP draft model using local cache path instead of S3 URL with runai_streamer (#42079)

Signed-off-by: SoluMilken <ypiheyn.imm02g@g2.nctu.edu.tw>
This commit is contained in:
SoluMilken
2026-08-21 09:07:08 -07:00
committed by GitHub
parent 72aedcc426
commit 27ec8ac626
2 changed files with 43 additions and 1 deletions
+8 -1
View File
@@ -769,7 +769,14 @@ class SpeculativeConfig:
if self.target_model_config is None:
raise ValueError("target_model_config must be present for mtp")
# use the draft model from the same model:
self.model = self.target_model_config.model
# Use model_weights if set (e.g. runai_streamer replaces
# model with a local cache dir but keeps the original path
# in model_weights), so the draft model can load weights
# from the same source as the target model.
self.model = (
self.target_model_config.model_weights
or self.target_model_config.model
)
# Align the quantization of draft model for cases such as
# --quantization fp8 with a bf16 checkpoint.
if not self.quantization: