213 4 months ago

ollama run xieweicong95/HY-MT1.5-1.8B

Details

4 months ago

1d1c8c189bff · 1.1GB ·

hunyuan-dense
·
1.79B
·
Q4_K_M
{{ .Prompt }}
{ "num_predict": 2048, "repeat_penalty": 1.1, "stop": [ "}}", "<|endofte

Readme

Tencent Hunyuan Translation 1.8B (Stable & Optimized)

This is a tuned configuration of Tencent’s HY-MT1.5-1.8B model, optimized specifically for Ollama.

Original Model: tencent/HY-MT1.5-1.8B


🚀 Why use this version?

I created this version because the raw GGUF uploads often suffer from severe issues when running on Ollama: * Infinite Loops: The model repeats the translated text over and over. * Hallucinations: It continues to generate fake text or conversational filler after the translation is done. * Formatting Issues: Including “User:” or “System:” tags in the output.

This version fixes these issues by:

  1. Tuning Parameters: Adjusted top_p (0.6) and repeat_penalty (1.1) to stabilize the 1.8B model.

  2. Custom Modelfile: Removed complex templates that confused the small model.


💡 How to Use (Critical!)

To get the best performance and avoid “chatty” outputs, you must follow this specific prompt format.

This model works best as a text completion engine, not a chat bot. Please append 翻译结果: (Translation Result:) at the end of your prompt to force the model to start translating immediately.

Recommended Prompt Format

Option 1: Universal / Chinese Instruction Best for translating ANY language INTO Chinese.

将以下文本翻译为 [Target Language] ,只能输出翻译后的结果,不要额外解释:

[Your Source Text]

翻译结果:

Option 2: English Instruction Best for translating Chinese INTO English or other languages.

Translate the following text into [Target Language], output only the translation without extra explanation:

[Your Source Text]

Translation:

Important Note on Prompts

Although Tencent’s official documentation recommends using different prompt templates for different languages (as shown below), using these official templates directly in Ollama’s quantized environment often leads to chaotic or unstable outputs.

Official Prompts:

For ZH<=>XX (Chinese context): 将以下文本翻译为{target_language},注意只需要输出翻译后的结果,不要额外解释:\n{source_text}

For XX<=>XX (Non-Chinese context): Translate the following segment into {target_language}, without additional explanation.\n{source_text}

Why is my version better?

During extensive testing, I found that relying solely on the official instruction prefixes caused the small 1.8B model to “hallucinate” or drift into conversational mode (talking to itself) rather than translating.

The most critical optimization in this version is the mandatory addition of 翻译结果: (Translation Result:) at the very end of the prompt.

This suffix acts as an “Anchor”, forcing the model to immediately switch to “completion mode” and output the translation. This effectively solves the gibberish and excessive chatter issues often seen when using the official templates in Ollama.