[GH-ISSUE #11361] please support model architecture: 'hunyuan-moe' #85181

Closed
opened 2026-05-09 22:45:59 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @johanteekens on GitHub (Jul 10, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11361

Please add support for Hunyuan-A13B-Instruct
Model: https://huggingface.co/tencent/Hunyuan-A13B-Instruct

llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output.
llama_model_loader: - kv 0: general.architecture str = hunyuan-moe
llama_model_loader: - kv 1: general.type str = model
llama_model_loader: - kv 2: general.name str = Hunyuan-A13B-Instruct
llama_model_loader: - kv 3: general.finetune str = Instruct
llama_model_loader: - kv 4: general.basename str = Hunyuan-A13B-Instruct
llama_model_loader: - kv 5: general.quantized_by str = Unsloth
llama_model_loader: - kv 6: general.size_label str = A13B
llama_model_loader: - kv 7: general.license str = other
llama_model_loader: - kv 8: general.license.name str = tencent-hunyuan-a13b
llama_model_loader: - kv 9: general.license.link str = https://github.com/Tencent-Hunyuan/Hu...
llama_model_loader: - kv 10: general.repo_url str = https://huggingface.co/unsloth
llama_model_loader: - kv 11: general.base_model.count u32 = 1
llama_model_loader: - kv 12: general.base_model.0.name str = Hunyuan A13B Instruct
llama_model_loader: - kv 13: general.base_model.0.organization str = Tencent
llama_model_loader: - kv 14: general.base_model.0.repo_url str = https://huggingface.co/tencent/Hunyua...
llama_model_loader: - kv 15: general.tags arr[str,1] = ["unsloth"]
llama_model_loader: - kv 16: hunyuan-moe.block_count u32 = 32
llama_model_loader: - kv 17: hunyuan-moe.context_length u32 = 262144
llama_model_loader: - kv 18: hunyuan-moe.embedding_length u32 = 4096
llama_model_loader: - kv 19: hunyuan-moe.feed_forward_length u32 = 3072
llama_model_loader: - kv 20: hunyuan-moe.attention.head_count u32 = 32
llama_model_loader: - kv 21: hunyuan-moe.attention.head_count_kv u32 = 8
llama_model_loader: - kv 22: hunyuan-moe.rope.freq_base f32 = 11158840.000000
llama_model_loader: - kv 23: hunyuan-moe.attention.layer_norm_rms_epsilon f32 = 0.000010
llama_model_loader: - kv 24: hunyuan-moe.expert_count u32 = 64
llama_model_loader: - kv 25: hunyuan-moe.expert_shared_feed_forward_length u32 = 3072
llama_model_loader: - kv 26: hunyuan-moe.expert_feed_forward_length u32 = 3072
llama_model_loader: - kv 27: hunyuan-moe.expert_used_count u32 = 8
llama_model_loader: - kv 28: hunyuan-moe.expert_shared_count u32 = 1
llama_model_loader: - kv 29: hunyuan-moe.rope.scaling.type str = none
llama_model_loader: - kv 30: hunyuan-moe.rope.scaling.factor f32 = 1.000000
llama_model_loader: - kv 31: hunyuan-moe.rope.scaling.original_context_length u32 = 262144
llama_model_loader: - kv 32: tokenizer.ggml.model str = gpt2
llama_model_loader: - kv 33: tokenizer.ggml.pre str = hunyuan
llama_model_loader: - kv 34: tokenizer.ggml.tokens arr[str,128167] = ["!", """, "#", "$", "%", "&", "'", ...
llama_model_loader: - kv 35: tokenizer.ggml.token_type arr[i32,128167] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
llama_model_loader: - kv 36: tokenizer.ggml.merges arr[str,127698] = ["Ġ Ġ", "ĠĠ ĠĠ", "i n", "Ġ t",...
llama_model_loader: - kv 37: tokenizer.ggml.eos_token_id u32 = 127960
llama_model_loader: - kv 38: tokenizer.ggml.seperator_token_id u32 = 127962
llama_model_loader: - kv 39: tokenizer.ggml.padding_token_id u32 = 127961
llama_model_loader: - kv 40: tokenizer.chat_template str = {% set loop_messages = messages %}\n{%...
llama_model_loader: - kv 41: tokenizer.ggml.bos_token_id u32 = 127959
llama_model_loader: - kv 42: general.quantization_version u32 = 2
llama_model_loader: - kv 43: general.file_type u32 = 3
llama_model_loader: - kv 44: quantize.imatrix.file str = Hunyuan-A13B-Instruct-GGUF/imatrix_un...
llama_model_loader: - kv 45: quantize.imatrix.dataset str = unsloth_calibration_Hunyuan-A13B-Inst...
llama_model_loader: - kv 46: quantize.imatrix.entries_count u32 = 352
llama_model_loader: - kv 47: quantize.imatrix.chunks_count u32 = 695
llama_model_loader: - kv 48: split.no u16 = 0
llama_model_loader: - kv 49: split.tensors.count i32 = 482
llama_model_loader: - kv 50: split.count u16 = 0
llama_model_loader: - type f32: 161 tensors
llama_model_loader: - type q4_1: 320 tensors
llama_model_loader: - type q6_K: 1 tensors
print_info: file format = GGUF V3 (latest)
print_info: file type = Q4_1
print_info: file size = 46.92 GiB (5.01 BPW)
llama_model_load: error loading model: error loading model architecture: unknown model architecture: 'hunyuan-moe'
llama_model_load_from_file_impl: failed to load model

Originally created by @johanteekens on GitHub (Jul 10, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11361 Please add support for Hunyuan-A13B-Instruct Model: https://huggingface.co/tencent/Hunyuan-A13B-Instruct llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output. llama_model_loader: - kv 0: general.architecture str = hunyuan-moe llama_model_loader: - kv 1: general.type str = model llama_model_loader: - kv 2: general.name str = Hunyuan-A13B-Instruct llama_model_loader: - kv 3: general.finetune str = Instruct llama_model_loader: - kv 4: general.basename str = Hunyuan-A13B-Instruct llama_model_loader: - kv 5: general.quantized_by str = Unsloth llama_model_loader: - kv 6: general.size_label str = A13B llama_model_loader: - kv 7: general.license str = other llama_model_loader: - kv 8: general.license.name str = tencent-hunyuan-a13b llama_model_loader: - kv 9: general.license.link str = https://github.com/Tencent-Hunyuan/Hu... llama_model_loader: - kv 10: general.repo_url str = https://huggingface.co/unsloth llama_model_loader: - kv 11: general.base_model.count u32 = 1 llama_model_loader: - kv 12: general.base_model.0.name str = Hunyuan A13B Instruct llama_model_loader: - kv 13: general.base_model.0.organization str = Tencent llama_model_loader: - kv 14: general.base_model.0.repo_url str = https://huggingface.co/tencent/Hunyua... llama_model_loader: - kv 15: general.tags arr[str,1] = ["unsloth"] llama_model_loader: - kv 16: hunyuan-moe.block_count u32 = 32 llama_model_loader: - kv 17: hunyuan-moe.context_length u32 = 262144 llama_model_loader: - kv 18: hunyuan-moe.embedding_length u32 = 4096 llama_model_loader: - kv 19: hunyuan-moe.feed_forward_length u32 = 3072 llama_model_loader: - kv 20: hunyuan-moe.attention.head_count u32 = 32 llama_model_loader: - kv 21: hunyuan-moe.attention.head_count_kv u32 = 8 llama_model_loader: - kv 22: hunyuan-moe.rope.freq_base f32 = 11158840.000000 llama_model_loader: - kv 23: hunyuan-moe.attention.layer_norm_rms_epsilon f32 = 0.000010 llama_model_loader: - kv 24: hunyuan-moe.expert_count u32 = 64 llama_model_loader: - kv 25: hunyuan-moe.expert_shared_feed_forward_length u32 = 3072 llama_model_loader: - kv 26: hunyuan-moe.expert_feed_forward_length u32 = 3072 llama_model_loader: - kv 27: hunyuan-moe.expert_used_count u32 = 8 llama_model_loader: - kv 28: hunyuan-moe.expert_shared_count u32 = 1 llama_model_loader: - kv 29: hunyuan-moe.rope.scaling.type str = none llama_model_loader: - kv 30: hunyuan-moe.rope.scaling.factor f32 = 1.000000 llama_model_loader: - kv 31: hunyuan-moe.rope.scaling.original_context_length u32 = 262144 llama_model_loader: - kv 32: tokenizer.ggml.model str = gpt2 llama_model_loader: - kv 33: tokenizer.ggml.pre str = hunyuan llama_model_loader: - kv 34: tokenizer.ggml.tokens arr[str,128167] = ["!", "\"", "#", "$", "%", "&", "'", ... llama_model_loader: - kv 35: tokenizer.ggml.token_type arr[i32,128167] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... llama_model_loader: - kv 36: tokenizer.ggml.merges arr[str,127698] = ["Ġ Ġ", "ĠĠ ĠĠ", "i n", "Ġ t",... llama_model_loader: - kv 37: tokenizer.ggml.eos_token_id u32 = 127960 llama_model_loader: - kv 38: tokenizer.ggml.seperator_token_id u32 = 127962 llama_model_loader: - kv 39: tokenizer.ggml.padding_token_id u32 = 127961 llama_model_loader: - kv 40: tokenizer.chat_template str = {% set loop_messages = messages %}\n{%... llama_model_loader: - kv 41: tokenizer.ggml.bos_token_id u32 = 127959 llama_model_loader: - kv 42: general.quantization_version u32 = 2 llama_model_loader: - kv 43: general.file_type u32 = 3 llama_model_loader: - kv 44: quantize.imatrix.file str = Hunyuan-A13B-Instruct-GGUF/imatrix_un... llama_model_loader: - kv 45: quantize.imatrix.dataset str = unsloth_calibration_Hunyuan-A13B-Inst... llama_model_loader: - kv 46: quantize.imatrix.entries_count u32 = 352 llama_model_loader: - kv 47: quantize.imatrix.chunks_count u32 = 695 llama_model_loader: - kv 48: split.no u16 = 0 llama_model_loader: - kv 49: split.tensors.count i32 = 482 llama_model_loader: - kv 50: split.count u16 = 0 llama_model_loader: - type f32: 161 tensors llama_model_loader: - type q4_1: 320 tensors llama_model_loader: - type q6_K: 1 tensors print_info: file format = GGUF V3 (latest) print_info: file type = Q4_1 print_info: file size = 46.92 GiB (5.01 BPW) llama_model_load: error loading model: error loading model architecture: unknown model architecture: 'hunyuan-moe' llama_model_load_from_file_impl: failed to load model
GiteaMirror added the model label 2026-05-09 22:45:59 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 10, 2025):

https://github.com/ggml-org/llama.cpp/pull/14425

Should work after the next ollama sync to the vendored llama.cpp code.

<!-- gh-comment-id:3058085416 --> @rick-github commented on GitHub (Jul 10, 2025): https://github.com/ggml-org/llama.cpp/pull/14425 Should work after the next ollama sync to the vendored llama.cpp code.
Author
Owner

@stevenkuang-tencent commented on GitHub (Jul 11, 2025):

hi @rick-github, when will sync llama.cpp approximately?

<!-- gh-comment-id:3061217619 --> @stevenkuang-tencent commented on GitHub (Jul 11, 2025): hi @rick-github, when will sync llama.cpp approximately?
Author
Owner

@rick-github commented on GitHub (Jul 11, 2025):

Some time in the future.

<!-- gh-comment-id:3061237071 --> @rick-github commented on GitHub (Jul 11, 2025): Some time in the future.
Author
Owner

@stevenkuang-tencent commented on GitHub (Jul 11, 2025):

Some time in the future.

ok, thanks~

<!-- gh-comment-id:3061252209 --> @stevenkuang-tencent commented on GitHub (Jul 11, 2025): > Some time in the future. ok, thanks~
Author
Owner

@rick-github commented on GitHub (Aug 18, 2025):

FROM hf.co/unsloth/Hunyuan-A13B-Instruct-GGUF:q4_k_m

TEMPLATE """
{{- $lastUserIdx := -1 }}
{{- range $i, $_ := .Messages }}
{{- if eq .Role "user" }}{{- $lastUserIdx = $i }}{{ end }}
{{- end -}}
{{- if .System }}<|startoftext|>
{{- .System }}<|extra_4|>
{{- end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 }}
{{- if eq .Role "user" }}<|startoftext|>
{{- .Content }}<|extra_0|>
{{- else if eq .Role "assistant" }}<|startoftext|>
{{- if (and $.IsThinkSet (and .Thinking (or $last (gt $i $lastUserIdx)))) -}}
<think>{{ .Thinking }}</think>
{{- end }}
{{- .Content }}<|eos|>
{{- end }}
{{- if and $.IsThinkSet (not $.Think) -}}
<think>

</think>
{{ end -}}
{{- end }}"""

PARAMETER stop <|startoftext|>
PARAMETER stop <|extra_4|>
PARAMETER stop <|extra_0|>
PARAMETER stop <|eos|>
$ ollama run hunyuan:80b-a13b-q4_K_M --think=false hello
<answer>
Hello there, how can I assist you today? 😊
</answer>
$ ollama run hunyuan:80b-a13b-q4_K_M --think=true hello
Thinking...
Okay, the user said "hello". I need to respond in a friendly and welcoming way. Let me think 
of a simple greeting.

"Hello there!" sounds good. Adding an emoji might make it friendlier. Maybe 😊. Then offer 
assistance. Something like "How can I help you today?" That's standard but effective. Keep it 
concise and open-ended so the user feels encouraged to ask anything they need.
...done thinking.

<answer>
Hello there 😊 How can I help you today?
</answer>
<!-- gh-comment-id:3198737802 --> @rick-github commented on GitHub (Aug 18, 2025): ```dockerfile FROM hf.co/unsloth/Hunyuan-A13B-Instruct-GGUF:q4_k_m TEMPLATE """ {{- $lastUserIdx := -1 }} {{- range $i, $_ := .Messages }} {{- if eq .Role "user" }}{{- $lastUserIdx = $i }}{{ end }} {{- end -}} {{- if .System }}<|startoftext|> {{- .System }}<|extra_4|> {{- end }} {{- range $i, $_ := .Messages }} {{- $last := eq (len (slice $.Messages $i)) 1 }} {{- if eq .Role "user" }}<|startoftext|> {{- .Content }}<|extra_0|> {{- else if eq .Role "assistant" }}<|startoftext|> {{- if (and $.IsThinkSet (and .Thinking (or $last (gt $i $lastUserIdx)))) -}} <think>{{ .Thinking }}</think> {{- end }} {{- .Content }}<|eos|> {{- end }} {{- if and $.IsThinkSet (not $.Think) -}} <think> </think> {{ end -}} {{- end }}""" PARAMETER stop <|startoftext|> PARAMETER stop <|extra_4|> PARAMETER stop <|extra_0|> PARAMETER stop <|eos|> ``` ```console $ ollama run hunyuan:80b-a13b-q4_K_M --think=false hello <answer> Hello there, how can I assist you today? 😊 </answer> ``` ```console $ ollama run hunyuan:80b-a13b-q4_K_M --think=true hello Thinking... Okay, the user said "hello". I need to respond in a friendly and welcoming way. Let me think of a simple greeting. "Hello there!" sounds good. Adding an emoji might make it friendlier. Maybe 😊. Then offer assistance. Something like "How can I help you today?" That's standard but effective. Keep it concise and open-ended so the user feels encouraged to ask anything they need. ...done thinking. <answer> Hello there 😊 How can I help you today? </answer> ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#85181