CoolFace
Modelpublic

sahilchachra/hy-mt2-1.8b-mxfp4-mlx

sourceHugging Faceotherupdated 4mo agoView on Hugging Face
0likes37downloads
Model Card

hy-mt2-1.8b-mxfp4-mlx

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

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

Quantization: Block floating-point MX FP4 (microscaling) Precision: ~4 bits/weight Group size: 32 Disk size: 917 MB Quantized by: sahilchachra

About this variant

Microscaling (MX) block floating-point quantization at FP4 precision. Uses a shared floating-point exponent per block of 32 weights instead of integer affine scaling — different numerical properties vs affine int4.

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)1475.391269.81
Decode (tok/s)227.9577.12
Peak memory (GB)1.2243.72
Disk size (MB)9173897

Translation quality (FLORES-200 devtest)

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

DirectionThis modelFP16 baselinen
engLatn→fraLatn64.0963.8120
engLatn→deuLatn57.057.6620
engLatn→zhoHans26.2229.0920
engLatn→jpnJpan31.1534.1920
engLatn→spaLatn56.1556.520
fraLatn→engLatn63.3864.5820
zhoHans→engLatn52.7855.1720
jpnJpan→engLatn51.5355.2920

Avg chrF++: 55.46 vs FP16 56.95 Avg BLEU: 29.62 vs FP16 30.71

Context scaling (decode tok/s)

Context lengthDecode tok/s
~128 tokens223.0
~256 tokens220.3
~512 tokens220.8
~1024 tokens217.3

Usage

Install

bash
pip install mlx-lm

Translate

python
from mlx_lm import load, generate

model, tokenizer = load("sahilchachra/hy-mt2-1.8b-mxfp4-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-1.8b-mxfp4-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-1.8b-4bit-mlxAffine int4 (group 64)
sahilchachra/hy-mt2-1.8b-8bit-mlxAffine int8 (group 64)
sahilchachra/hy-mt2-1.8b-mxfp4-mlxBlock float MX FP4 ← this model
sahilchachra/hy-mt2-1.8b-mxfp8-mlxBlock float MX FP8

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-1.8B for the original model's license terms

Original model

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