From 97cc8729f0bc351a5536380fd897607f4ecdeef1 Mon Sep 17 00:00:00 2001 From: Ekagra Ranjan <3116519+ekagra-ranjan@users.noreply.github.com> Date: Tue, 29 Apr 2025 03:30:40 -0400 Subject: [PATCH] [Model] Ignore rotary embed load for Cohere model (#17319) --- vllm/model_executor/models/commandr.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vllm/model_executor/models/commandr.py b/vllm/model_executor/models/commandr.py index 25b1d5a195..8f64e5d5c9 100644 --- a/vllm/model_executor/models/commandr.py +++ b/vllm/model_executor/models/commandr.py @@ -418,6 +418,10 @@ class CohereForCausalLM(nn.Module, SupportsLoRA, SupportsPP, SupportsQuant): loaded_params: Set[str] = set() for name, loaded_weight in weights: + # Skip loading rotary embeddings since vLLM has its own + if "rotary_emb.inv_freq" in name: + continue + if (self.quant_config is not None and (scale_name := self.quant_config.get_cache_scale(name))): # Loading kv cache quantization scales