mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-08-22 06:45:11 +00:00
convert: fix handle HunyuanVL XD-RoPE config (#25514)
Signed-off-by: wendadawen <wendadawen@qq.com>
This commit is contained in:
parent
b4aa7dd477
commit
66e4bf7e59
1 changed files with 6 additions and 0 deletions
|
|
@ -338,6 +338,12 @@ class HunyuanVLTextModel(HunYuanModel):
|
|||
|
||||
def __init__(self, dir_model: Path, *args, **kwargs):
|
||||
super().__init__(dir_model, *args, **kwargs)
|
||||
# transformers 5.13.0 encodes HunyuanVL XD-RoPE as dynamic + mrope_section.
|
||||
# Normalize it to avoid the HunYuan dynamic-RoPE context assertion.
|
||||
if self.rope_parameters.get("rope_type") == "dynamic" and "mrope_section" in self.rope_parameters:
|
||||
self.rope_parameters["rope_type"] = "xdrope"
|
||||
self.rope_parameters["type"] = "xdrope"
|
||||
self.rope_parameters["xdrope_section"] = list(self.rope_parameters["mrope_section"])
|
||||
|
||||
def set_gguf_parameters(self):
|
||||
super().set_gguf_parameters()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue