Hy-MT2-1.8B-4bit (MLX)
This is a 4-bit MLX quantized version of
tencent/Hy-MT2-1.8B, optimized for Apple Silicon (M1/M2/M3/M4) via the
MLX framework.
Model Details
- Base model: tencent/Hy-MT2-1.8B
- Architecture:
HunYuanDenseV1ForCausalLM (Hunyuan Dense V1, 1.8B parameters)
- Quantization: 4-bit, group size 64, affine mode
- Format: MLX safetensors
- File size: ~1.0 GB (
model.safetensors)
- Task: Translation across 35+ languages
Conversion
This model was converted with
mlx-lm 0.31.3:
1mlx_lm.convert \
2 --hf-path tencent/Hy-MT2-1.8B \
3 --mlx-path Hy-MT2-1.8B-4bit \
4 --quantize \
5 --q-bits 4 \
6 --q-group-size 64
Usage with mlx-lm
Install:
Inference (uses the bundled chat_template.jinja from the original repo):
1from mlx_lm import load, generate
2
3model, tokenizer = load("illitan/Hy-MT2-1.8B-4bit")
4
5messages = [
6 {"role": "user", "content": "Translate the following text to Chinese: 'Hello, how are you today?'"}
7]
8
9prompt = tokenizer.apply_chat_template(
10 messages,
11 tokenize=False,
12 add_generation_prompt=True,
13)
14
15response = generate(
16 model,
17 tokenizer,
18 prompt=prompt,
19 max_tokens=256,
20 verbose=True,
21)
22print(response)
Supported Languages
Same coverage as the base model — 35+ languages including Chinese, English, French, Portuguese, Spanish, Japanese, Turkish, Russian, Arabic, Korean, Thai, Italian, German, Vietnamese, Malay, Indonesian, Tagalog, Hindi, Polish, Czech, Dutch, Khmer, Burmese, Persian, Gujarati, Urdu, Telugu, Marathi, Hebrew, Bengali, Tamil, Ukrainian, Tibetan, Kazakh, Mongolian, and Uyghur.
See the
base model card for full translation direction coverage.
License
This model is released under the
Tencent HY Community License Agreement (inherited from the base model). See the full license text at
tencent/Hy-MT2-1.8B/LICENSE.txt.
Important geographic restriction
The Tencent HY Community License explicitly prohibits use, reproduction, modification, and distribution of the model (including derivatives such as this quantization) within the European Union.
If you are located in the EU, you are not permitted to download or use this model. Please review the upstream license before any commercial or research use.
Acknowledgements
- Tencent for the original Hy-MT2-1.8B model.
- Apple MLX team and
mlx-lm for the on-device inference stack.