Instructions to use nace-ai/Hy4-MLX-4.65bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use nace-ai/Hy4-MLX-4.65bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("nace-ai/Hy4-MLX-4.65bit") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use nace-ai/Hy4-MLX-4.65bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "nace-ai/Hy4-MLX-4.65bit" --prompt "Once upon a time"
- Atomic Chat
Hy4 MLX 4.65-bit
Hy4 from Nace.AI at 4.647657 bits per weight, with a 447.3 GB download. Text generation uses the included custom Hy4 MLX-CUDA port and storage adapter, not the stock mlx_lm.generate command.
Results
Mean KL to the original reference is 0.085735, compared with 0.088218 for the exact Xylolabs control on the same tokens and CUDA backend. Lower KL means closer output distributions. This is a point-estimate win; the paired 95% confidence interval for our KL minus the control is [-0.006233, 0.000647] and crosses zero.
Nace Weight Space Quantization
Routed experts use affine 4-bit weights with groups of 64; the final layer's expert down projection uses 5 bits. Other quantized weight classes use affine 8-bit weights with groups of 64. The included normalization supplement preserves the evaluated final-norm bytes.
Run it
Download this snapshot, then follow the setup and restoration steps. Keep the base files unchanged; preparation creates a separate model directory on the same filesystem.
HF_HUB_DISABLE_IMPLICIT_TOKEN=1 hf download nace-ai/Hy4-MLX-4.65bit --repo-type model --local-dir Hy4-MLX-4.65bit
After setup and restoration, run the included launcher from the snapshot root:
.venv-c2/bin/python generate_c2.py \
--runtime scoring/runtime/run.py --adapter scoring/mlx_storage_adapter.py \
--model ../C2-ready --output ../C2-generation --device gpu --max-tokens 16 \
--candidate-source-revision c10c0de5b6f850703fb0a90e65d1c32b558b9167 \
--prompt 'Write a short introduction to astronomy.'
The launcher uses greedy decoding with reasoning_effort="no_think". Full-model generation was not tested for this release package; the real restored shard matches the evaluated SHA256.
License
Tencent Hy License, Version 1.0, including its Section 10 commercial terms.
Quantized
Model tree for nace-ai/Hy4-MLX-4.65bit
Base model
tencent/Hy4