Xylolabs

Hy4 MLX 8-bit

Base model Format License Code

The text model of tencent/Hy4 (770B parameters, 49B active) converted for MLX. mlx-lm runs it as a text model; the vision tower (image input) and the DFly2 drafter (speculative decoding) are separate files here, used through the Python modules.

How to run

Install mlx-lm and pass --trust-remote-code:

pip install mlx-lm==0.32.2

mlx_lm.generate --model Xylolabs/Hy4-MLX-8bit --trust-remote-code --prompt "Explain how a heat pump works."
mlx_lm.chat     --model Xylolabs/Hy4-MLX-8bit --trust-remote-code
mlx_lm.server   --model Xylolabs/Hy4-MLX-8bit --trust-remote-code

Speculative decoding

from mlx_lm import load
from dfly_v4 import load_drafter
from speculative_v4 import SpecStats, stream_generate

model, tokenizer = load(str(root), trust_remote_code=True)
drafter = load_drafter(str(root / "dfly"), model.args)
stats = SpecStats()
for part in stream_generate(model, tokenizer, "Explain how a heat pump works.", drafter=drafter, stats=stats):
    print(part.text, end="")

Accuracy

Against BF16.

Quant Size WikiText-2 KL top-1 Chat KL top-1 Held-out KL top-1
MLX 4-bit 456.63 GB 0.142528 88.549% 0.193011 90.126% 0.066185 92.363%
MLX 8-bit 828.681 GB 0.038634 94.118% 0.119845 93.565% 0.016506 96.088%
Mean KL divergence by file size Top-1 agreement by file size

Which file for your hardware

Hardware Memory File Context
Mac Studio M5 Max, 32-core GPU 36 GB unified none
Mac Studio M5 Max, 40-core GPU 48 GB unified none
Mac Studio M5 Max, 40-core GPU 64 GB unified none
Mac Studio M5 Ultra 96 GB unified none
Mac Studio M5 Max, 40-core GPU 128 GB unified none
Mac Studio M5 Ultra 256 GB unified none
Mac Studio M5 Ultra, 80-core GPU 512 GB unified Xylolabs/Hy4-MLX-4bit* (4-bit, 456.6 GB) 16K

* With the macOS GPU memory limit raised.

License and notices

Tencent Hy License, Version 1.0, copied in LICENSE. We quantized the weights and converted them to MLX. hy_v4.py carries code from Transformers (LICENSE.transformers) and mlx-lm (ORIGINS.md).

Updates

  • 2026-11-22: Added a hardware recommendation table.
  • 2026-11-22: Added the vision tower and the DFly2 drafter with their Python modules.
  • 2026-11-20: First release.
Downloads last month
337
Safetensors
Model size
770B params
Tensor type
BF16
·
F32
·
U32
·
MLX
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Xylolabs/Hy4-MLX-8bit

Base model

tencent/Hy4
Quantized
(15)
this model

Collections including Xylolabs/Hy4-MLX-8bit