CoolFace
Modelpublic

sahilchachra/hy-mt2-7b-8bit-mlx

sourceHugging Faceotherupdated 4mo agoView on Hugging Face
1likes33downloads
Model Card

hy-mt2-7b-8bit-mlx

Quantized version of tencent/Hy-MT2-7B for Apple Silicon using MLX.

Hy-MT2-7B is Tencent's multilingual translation model covering 40+ languages.

Quantization: Affine integer quantization Precision: 8-bit (~8.5 bits/weight avg) Group size: 64 Disk size: 7620 MB Quantized by: sahilchachra

About this variant

Affine quantization at 8-bit with group size 64. Closest to FP16 translation quality. Recommended when memory allows and translation accuracy is the priority.

Benchmark results

Evaluated on Apple M5 Pro with MLX. Model loaded once; performance and quality measured in a single pass.

Performance

This modelFP16 baseline
Prefill (tok/s)398.77307.33
Decode (tok/s)36.2819.55
Peak memory (GB)8.17515.171
Disk size (MB)762015331

Translation quality (FLORES-200 devtest)

Reported as chrF++ (higher is better). Sample-size noted per pair.

DirectionThis modelFP16 baselinen
engLatn→fraLatn68.9768.7420
engLatn→deuLatn63.2263.2520
engLatn→zhoHans29.429.420
engLatn→jpnJpan41.8542.2820
engLatn→spaLatn56.6256.720
fraLatn→engLatn68.1467.9920
zhoHans→engLatn57.4557.4320
jpnJpan→engLatn59.0359.220

Avg chrF++: 60.23 vs FP16 60.24 Avg BLEU: 35.41 vs FP16 35.35

Context scaling (decode tok/s)

Context lengthDecode tok/s
~128 tokens35.7
~256 tokens42.4
~512 tokens42.4
~1024 tokens42.1

Usage

Install

bash
pip install mlx-lm

Translate

python
from mlx_lm import load, generate

model, tokenizer = load("sahilchachra/hy-mt2-7b-8bit-mlx")

prompt = (
    "Translate the following text from English to French.\n"
    "English: The early bird catches the worm.\n"
    "French:"
)
print(generate(model, tokenizer, prompt=prompt, max_tokens=128, verbose=True))

Stream

python
from mlx_lm import load, stream_generate

model, tokenizer = load("sahilchachra/hy-mt2-7b-8bit-mlx")
for chunk in stream_generate(model, tokenizer, prompt="Translate \"Hello world\" to Japanese:", max_tokens=64):
    print(chunk.text, end="", flush=True)

All variants in this collection

ModelMethod
sahilchachra/hy-mt2-7b-4bit-mlxAffine int4 (group 64)
sahilchachra/hy-mt2-7b-8bit-mlxAffine int8 (group 64) ← this model

Notes

  • —Requires Apple Silicon (M1 or later) with MLX
  • —Benchmarks run on Apple M5 Pro, 24 GB unified memory
  • —FLORES-200 sample sizes are small — treat chrF/BLEU figures as indicative, not definitive
  • —License: see tencent/Hy-MT2-7B for the original model's license terms

Original model

See tencent/Hy-MT2-7B for full model details, supported languages, and intended use.