Skip to content

Commit ce87b7d

Browse files
committed
Yup, it's NeoX
1 parent df0b5bc commit ce87b7d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

convert_hf_to_gguf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3760,7 +3760,8 @@ def set_gguf_parameters(self):
37603760
self.gguf_writer.add_ssm_group_count(self.find_hparam(["linear_num_key_heads"]))
37613761
self.gguf_writer.add_ssm_time_step_rank(self.find_hparam(["linear_num_value_heads"]))
37623762
self.gguf_writer.add_ssm_inner_size(self.find_hparam(['linear_value_head_dim']) * self.find_hparam(['linear_num_value_heads']))
3763-
rope_dim = self.hparams["hidden_size"] // self.hparams["num_attention_heads"]
3763+
if (rope_dim := self.hparams.get("head_dim")) is None:
3764+
rope_dim = self.hparams["hidden_size"] // self.hparams["num_attention_heads"]
37643765
self.gguf_writer.add_rope_dimension_count(int(rope_dim * self.hparams.get("partial_rotary_factor", 0.25)))
37653766

37663767
def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iterable[tuple[str, Tensor]]:

src/llama-model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7134,7 +7134,6 @@ llama_rope_type llama_model_rope_type(const llama_model * model) {
71347134
case LLM_ARCH_ARCEE:
71357135
case LLM_ARCH_ERNIE4_5:
71367136
case LLM_ARCH_ERNIE4_5_MOE:
7137-
case LLM_ARCH_QWEN3NEXT:
71387137
return LLAMA_ROPE_TYPE_NORM;
71397138

71407139
// the pairs of head values are offset by n_rot/2
@@ -7154,6 +7153,7 @@ llama_rope_type llama_model_rope_type(const llama_model * model) {
71547153
case LLM_ARCH_QWEN2MOE:
71557154
case LLM_ARCH_QWEN3:
71567155
case LLM_ARCH_QWEN3MOE:
7156+
case LLM_ARCH_QWEN3NEXT:
71577157
case LLM_ARCH_LLADA_MOE:
71587158
case LLM_ARCH_OLMO2:
71597159
case LLM_ARCH_OLMOE:

0 commit comments

Comments
 (0)