mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-06-21 16:40:20 +00:00
fix: check key before access
This commit is contained in:
parent
d0e2332d17
commit
585e270ac3
@ -1404,6 +1404,7 @@ class FlashCausalLM(Model):
|
||||
if ( # mrope have position_ids per section, if so repeat n times
|
||||
hasattr(self.model, "config")
|
||||
and hasattr(self.model.config, "rope_scaling")
|
||||
and "rope_type" in self.model.config.rope_scaling
|
||||
and self.model.config.rope_scaling["rope_type"] == "mrope"
|
||||
):
|
||||
n_sections = len(self.model.config.rope_scaling["mrope_section"])
|
||||
|
Loading…
Reference in New Issue
Block a user