[GH-ISSUE #13611] Model Request: HY-MT1.5-1.8B & 7B #71016

Closed
opened 2026-05-04 23:44:29 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @Leroy-X on GitHub (Jan 3, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/13611

Powerful translation models that can almost reach Gemini 3

https://huggingface.co/tencent/HY-MT1.5-1.8B
https://huggingface.co/tencent/Hunyuan-MT-7B

Originally created by @Leroy-X on GitHub (Jan 3, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/13611 Powerful translation models that can almost reach Gemini 3 https://huggingface.co/tencent/HY-MT1.5-1.8B https://huggingface.co/tencent/Hunyuan-MT-7B
GiteaMirror added the model label 2026-05-04 23:44:29 -05:00
Author
Owner

@rick-github commented on GitHub (Jan 3, 2026):

$ ollama run hf.co/mradermacher/Hunyuan-MT-7B-GGUF:Q4_K_M
>>> """Translate the following segment into German, without additional explanation.
... 
... The quick brown fox jumps over the lazy dog.
... """
Die schnelle braune Füchsin springt über den faulen Hund.

The HY-MT1.5 model loads but the template is broken so the response is not correct.

$ ollama run hf.co/mradermacher/HY-MT1.5-1.8B-GGUF:Q4_K_M
>>> """Translate the following segment into German, without additional explanation.
... 
... The quick brown fox jumps over the lazy dog.
... """
onse }}
<!-- gh-comment-id:3707006559 --> @rick-github commented on GitHub (Jan 3, 2026): ```console $ ollama run hf.co/mradermacher/Hunyuan-MT-7B-GGUF:Q4_K_M >>> """Translate the following segment into German, without additional explanation. ... ... The quick brown fox jumps over the lazy dog. ... """ Die schnelle braune Füchsin springt über den faulen Hund. ``` The HY-MT1.5 model loads but the template is broken so the response is not correct. ```console $ ollama run hf.co/mradermacher/HY-MT1.5-1.8B-GGUF:Q4_K_M >>> """Translate the following segment into German, without additional explanation. ... ... The quick brown fox jumps over the lazy dog. ... """ onse }} ```
Author
Owner

@Leroy-X commented on GitHub (Jan 3, 2026):

$ ollama run hf.co/mradermacher/Hunyuan-MT-7B-GGUF:Q4_K_M

Thanks for the reply, I'm downloading it at 700kb/s, expecting a little over an hour.
It is expected that Ollama will officially support it, and what the community offers does not always seem to work

<!-- gh-comment-id:3707012561 --> @Leroy-X commented on GitHub (Jan 3, 2026): > $ ollama run hf.co/mradermacher/Hunyuan-MT-7B-GGUF:Q4_K_M Thanks for the reply, I'm downloading it at 700kb/s, expecting a little over an hour. It is expected that Ollama will officially support it, and what the community offers does not always seem to work
Author
Owner

@rick-github commented on GitHub (Jan 3, 2026):

Typically the reason why community models don't always seem to work is because the template is incorrect, as is the case for HY-MT1.5-1.8B. Somebody may fix it and make it available for download.

<!-- gh-comment-id:3707042352 --> @rick-github commented on GitHub (Jan 3, 2026): Typically the reason why community models don't always seem to work is because the template is incorrect, as is the case for HY-MT1.5-1.8B. Somebody may fix it and make it available for download.
Author
Owner

@rick-github commented on GitHub (Jan 4, 2026):

FROM hf.co/mradermacher/HY-MT1.5-1.8B-GGUF:Q4_K_M

TEMPLATE """<|hy_begin▁of▁sentence|>
{{- if .System }}{{ .System }}<|hy_place▁holder▁no▁3|>{{ end }}

{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 -}}

{{- if eq .Role "user" -}}
<|hy_User|>{{ .Content }}
{{- end }}

{{- if eq .Role "assistant" -}}
<|hy_Assistant|>{{ .Content }}<|hy_place▁holder▁no▁2|>
{{- end }}

{{- if and $last (ne .Role "assistant") -}}
<|hy_Assistant|>
{{- else -}}
<|hy_place▁holder▁no▁8|>
{{- end }}

{{- end -}}
"""

PARAMETER stop <|hy_place▁holder▁no▁8|>
ollama create hy-mt1.5:1.8b-q4_K_M -f Modelfile
$ ollama run hy-mt1.5:1.8b-q4_K_M "Translate the following segment into Greek, without additional explanation.\nThe quick brown fox jumps over the lazy dog."
Ο γρήγορος καφέ λυκός πηδάει πάνω από τον χαλαρό σκύλο.
<!-- gh-comment-id:3707543211 --> @rick-github commented on GitHub (Jan 4, 2026): ```dockerfile FROM hf.co/mradermacher/HY-MT1.5-1.8B-GGUF:Q4_K_M TEMPLATE """<|hy_begin▁of▁sentence|> {{- if .System }}{{ .System }}<|hy_place▁holder▁no▁3|>{{ end }} {{- range $i, $_ := .Messages }} {{- $last := eq (len (slice $.Messages $i)) 1 -}} {{- if eq .Role "user" -}} <|hy_User|>{{ .Content }} {{- end }} {{- if eq .Role "assistant" -}} <|hy_Assistant|>{{ .Content }}<|hy_place▁holder▁no▁2|> {{- end }} {{- if and $last (ne .Role "assistant") -}} <|hy_Assistant|> {{- else -}} <|hy_place▁holder▁no▁8|> {{- end }} {{- end -}} """ PARAMETER stop <|hy_place▁holder▁no▁8|> ``` ``` ollama create hy-mt1.5:1.8b-q4_K_M -f Modelfile ``` ```console $ ollama run hy-mt1.5:1.8b-q4_K_M "Translate the following segment into Greek, without additional explanation.\nThe quick brown fox jumps over the lazy dog." Ο γρήγορος καφέ λυκός πηδάει πάνω από τον χαλαρό σκύλο. ```
Author
Owner

@rick-github commented on GitHub (Jan 4, 2026):

https://ollama.com/frob/hy-mt1.5

<!-- gh-comment-id:3707888741 --> @rick-github commented on GitHub (Jan 4, 2026): https://ollama.com/frob/hy-mt1.5
Author
Owner

@Leroy-X commented on GitHub (Jan 4, 2026):

Thanks for your help, plus I found the version of 7b and my ollama download is very slow:(
https://ollama.com/huihui_ai/hy-mt1.5-abliterated/

<!-- gh-comment-id:3708019542 --> @Leroy-X commented on GitHub (Jan 4, 2026): Thanks for your help, plus I found the version of 7b and my ollama download is very slow:( https://ollama.com/huihui_ai/hy-mt1.5-abliterated/
Author
Owner

@am009 commented on GitHub (Jan 20, 2026):

FROM hf.co/mradermacher/HY-MT1.5-1.8B-GGUF:Q4_K_M

TEMPLATE """<|hy_begin▁of▁sentence|>
{{- if .System }}{{ .System }}<|hy_place▁holder▁no▁3|>{{ end }}

{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1 -}}

{{- if eq .Role "user" -}}
<|hy_User|>{{ .Content }}
{{- end }}

{{- if eq .Role "assistant" -}}
<|hy_Assistant|>{{ .Content }}<|hy_place▁holder▁no▁2|>
{{- end }}

{{- if and $last (ne .Role "assistant") -}}
<|hy_Assistant|>
{{- else -}}
<|hy_place▁holder▁no▁8|>
{{- end }}

{{- end -}}


PARAMETER stop <|hy_place▁holder▁no▁8|>

Where does this template come from? I highly suspect that this is not correct.

the original jinja template is

{% set ns = namespace(has_head=true) %}
{% set loop_messages = messages %}
{% for message in loop_messages %}
    {% set content = message['content'] %}
    {% if loop.index0 == 0 %}
        {% if content == '' %}
            {% set ns.has_head = false %}
            {% elif message['role'] == 'system' %}
            {% set content = '<|startoftext|>' + content + '<|extra_4|>' %}
        {% endif %}
    {% endif %}
    {% if message['role'] == 'user' %}
        {% if loop.index0 == 1 and ns.has_head %}
            {% set content = content + '<|extra_0|>' %}
        {% else %}
            {% set content = '<|startoftext|>' + content + '<|extra_0|>' %}
        {% endif %}
    {% elif message['role'] == 'assistant' %}
        {% set content = content + '<|eos|>' %}
    {% endif %}
    {{ content }}
{% endfor %}

I think the correct way is to convert this to golang template format. Just for inserting some <|startoftext|> and <|extra_4|> <|extra_0|> token

<!-- gh-comment-id:3772823280 --> @am009 commented on GitHub (Jan 20, 2026): > ``` > FROM hf.co/mradermacher/HY-MT1.5-1.8B-GGUF:Q4_K_M > > TEMPLATE """<|hy_begin▁of▁sentence|> > {{- if .System }}{{ .System }}<|hy_place▁holder▁no▁3|>{{ end }} > > {{- range $i, $_ := .Messages }} > {{- $last := eq (len (slice $.Messages $i)) 1 -}} > > {{- if eq .Role "user" -}} > <|hy_User|>{{ .Content }} > {{- end }} > > {{- if eq .Role "assistant" -}} > <|hy_Assistant|>{{ .Content }}<|hy_place▁holder▁no▁2|> > {{- end }} > > {{- if and $last (ne .Role "assistant") -}} > <|hy_Assistant|> > {{- else -}} > <|hy_place▁holder▁no▁8|> > {{- end }} > > {{- end -}} > > > PARAMETER stop <|hy_place▁holder▁no▁8|> > ``` Where does this template come from? I highly suspect that this is not correct. the [original jinja template](https://huggingface.co/tencent/HY-MT1.5-7B/blob/main/chat_template.jinja) is ``` {% set ns = namespace(has_head=true) %} {% set loop_messages = messages %} {% for message in loop_messages %} {% set content = message['content'] %} {% if loop.index0 == 0 %} {% if content == '' %} {% set ns.has_head = false %} {% elif message['role'] == 'system' %} {% set content = '<|startoftext|>' + content + '<|extra_4|>' %} {% endif %} {% endif %} {% if message['role'] == 'user' %} {% if loop.index0 == 1 and ns.has_head %} {% set content = content + '<|extra_0|>' %} {% else %} {% set content = '<|startoftext|>' + content + '<|extra_0|>' %} {% endif %} {% elif message['role'] == 'assistant' %} {% set content = content + '<|eos|>' %} {% endif %} {{ content }} {% endfor %} ``` I think the correct way is to convert this to golang template format. Just for inserting some `<|startoftext|>` and `<|extra_4|>` `<|extra_0|>` token
Author
Owner

@rick-github commented on GitHub (Jan 20, 2026):

You are correct that Jinja template for HY-MT1.5-7B looks different to the Go template given above. That's because the Go template is for HY-MT1.5-1.8B, for which the original Jinja template is

{% if messages[0]['role'] == 'system' %}
  {% set loop_messages = messages[1:] %}
  {% set system_message = messages[0]['content'] %}
  <|hy_begin▁of▁sentence|>{{ system_message }}<|hy_place▁holder▁no▁3|>
{% else %}
  {% set loop_messages = messages %}
  <|hy_begin▁of▁sentence|>
{% endif %}
{% for message in loop_messages %}
  {% if message['role'] == 'user' %}
    <|hy_User|>{{ message['content'] }}
  {% elif message['role'] == 'assistant' %}
    <|hy_Assistant|>{{ message['content'] }}<|hy_place▁holder▁no▁2|>
  {% endif %}
{% endfor %}
{% if add_generation_prompt %}
  <|hy_Assistant|>
{% else %}
  <|hy_place▁holder▁no▁8|>
{% endif %}
<!-- gh-comment-id:3773537071 --> @rick-github commented on GitHub (Jan 20, 2026): You are correct that Jinja template for HY-MT1.5-7B looks different to the Go template given above. That's because the Go template is for HY-MT1.5-1.8B, for which the [original Jinja template](https://huggingface.co/tencent/HY-MT1.5-1.8B/blob/main/chat_template.jinja) is ``` {% if messages[0]['role'] == 'system' %} {% set loop_messages = messages[1:] %} {% set system_message = messages[0]['content'] %} <|hy_begin▁of▁sentence|>{{ system_message }}<|hy_place▁holder▁no▁3|> {% else %} {% set loop_messages = messages %} <|hy_begin▁of▁sentence|> {% endif %} {% for message in loop_messages %} {% if message['role'] == 'user' %} <|hy_User|>{{ message['content'] }} {% elif message['role'] == 'assistant' %} <|hy_Assistant|>{{ message['content'] }}<|hy_place▁holder▁no▁2|> {% endif %} {% endfor %} {% if add_generation_prompt %} <|hy_Assistant|> {% else %} <|hy_place▁holder▁no▁8|> {% endif %} ```
Author
Owner

@am009 commented on GitHub (Jan 20, 2026):

Oh, my mistake. I did not expect the 7b template is so different from 1.8B model.

My current template for 7b model:

TEMPLATE """{{- $hasHead := true -}}
{{- range $i, $message := .Messages -}}
  {{- $content := $message.Content -}}
  {{- if eq $i 0 -}}
    {{- if eq $content "" -}}
      {{- $hasHead = false -}}
    {{- else if eq $message.Role "system" -}}
      {{- $content = print "<|startoftext|>" $content "<|extra_4|>" -}}
    {{- end -}}
  {{- end -}}
  {{- if eq $message.Role "user" -}}
    {{- if and (eq $i 1) $hasHead -}}
      {{- $content = print $content "<|extra_0|>" -}}
    {{- else -}}
      {{- $content = print "<|startoftext|>" $content "<|extra_0|>" -}}
    {{- end -}}
  {{- else if eq $message.Role "assistant" -}}
    {{- $content = print $content "<|eos|>" -}}
  {{- end -}}
  {{- $content -}}
{{- end -}}"""
<!-- gh-comment-id:3773795952 --> @am009 commented on GitHub (Jan 20, 2026): Oh, my mistake. I did not expect the 7b template is so different from 1.8B model. My current template for 7b model: ``` TEMPLATE """{{- $hasHead := true -}} {{- range $i, $message := .Messages -}} {{- $content := $message.Content -}} {{- if eq $i 0 -}} {{- if eq $content "" -}} {{- $hasHead = false -}} {{- else if eq $message.Role "system" -}} {{- $content = print "<|startoftext|>" $content "<|extra_4|>" -}} {{- end -}} {{- end -}} {{- if eq $message.Role "user" -}} {{- if and (eq $i 1) $hasHead -}} {{- $content = print $content "<|extra_0|>" -}} {{- else -}} {{- $content = print "<|startoftext|>" $content "<|extra_0|>" -}} {{- end -}} {{- else if eq $message.Role "assistant" -}} {{- $content = print $content "<|eos|>" -}} {{- end -}} {{- $content -}} {{- end -}}""" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#71016