Run this model with HF Jobs

Run ale-che/Ergo-mlx-mxfp4 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/ale-che/Ergo-mlx-mxfp4. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/ale-che/Ergo-mlx-mxfp4 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/ale-che/Ergo-mlx-mxfp4. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Ergo — MLX MXFP4

An MLX conversion of Amazon-FMR/Ergo (MXFP4), Amazon's 1.1T-parameter mixture-of-experts model (55B active, 1M-token context). For details about the model, its benchmarks and its intended use, see the original model card.

What this is

  • A lossless repack, not a requantization. Upstream stores the routed experts as MXFP4 (E2M1 values with E8M0 scales, group size 32). That is exactly MLX's native mxfp4 format, so the expert bytes are reinterpreted as MLX mxfp4 weights unchanged and decode bit-identically. All other tensors keep their upstream precision.
  • Size: 65 safetensors shards, 626 GB (583 GiB), 1403 tensors.
  • Custom architecture: mlx-lm has no ergo model, so this repo ships the model definition ergo.py, ported from the transformers modeling_ergo.py. It covers relu² non-gated MLPs, q/k norm, sliding-window attention (512) with global attention every 4th layer, post-attention/FFN norms with residual scale gates, a sigmoid top-8 router with bias, per-expert output RMS norm, a dense first layer, and a shared expert. It was checked against transformers on a small random Ergo config: outputs differ by ≈2e-6 in fp32 (CPU), and within transformers' own bf16 noise in bf16.

Hardware

The weights (≈584 GB) don't fit in one 512 GB Mac, so you need two Apple Silicon Macs running MLX's pipeline-parallel ring backend (for example over Thunderbolt), each with a local copy of the weights. Each rank loads only its half of the layers (≈320 GB each).

On 2× Mac Studio (M5 Ultra, 512 GB) linked over Thunderbolt 5, steady decode is about 10.7 tok/s.

Note: this is an initial working run. No performance optimizations have been attempted yet (no kernel tuning, speculative decoding or prefill work), so expect these numbers to change.

Usage

Tested with mlx==0.32.5 and mlx-lm==0.32.2. Do this on both Macs:

pip install "mlx==0.32.5" "mlx-lm==0.32.2" huggingface_hub
hf download ale-che/Ergo-mlx-mxfp4 --local-dir ~/Ergo-mlx-mxfp4

# register the architecture with mlx-lm
cp ~/Ergo-mlx-mxfp4/ergo.py \
   "$(python -c 'import mlx_lm, os; print(os.path.dirname(mlx_lm.__file__))')/models/"

Edit hosts.example.json with your two Macs' addresses, then launch from either one:

mlx.launch --backend ring --hostfile hosts.json \
  run_ergo.py --model ~/Ergo-mlx-mxfp4 --prompt "Write a binary search in Rust."

run_ergo.py is a minimal example of pipeline generation.

Important: call mx.set_wired_limit(mx.device_info()["max_recommended_working_set_size"]) before pipeline_load, as run_ergo.py does. Otherwise Metal has to re-establish residency for ≈320 GB of buffers on every step, and decode drops to ≈1.5 tok/s.

Sampling settings recommended upstream: temperature=1.0, top_p=0.99.

Limitations

  • Initial release: the model runs correctly, but nothing has been optimized yet.
  • Not tested on any benchmarks. Correctness was checked with layer-level comparisons against transformers and by generating coherent output on the full model.
  • Standard servers built on mlx_lm.server, LM Studio or oMLX won't load it on a single machine, and they won't recognize the architecture without ergo.py.
  • The first one or two generated tokens are slow while the weights wire into memory.

License

Released under the Amazon Ergo Open-Weights License, including its Acceptable Use Policy, which applies to this derivative. This is an unofficial community conversion, and Amazon does not endorse it.

Downloads last month
891
Safetensors
Model size
1.1T params
Tensor type
BF16
·
F32
·
U32
·
MLX
Hardware compatibility
Log In to add your hardware

4-bit

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

Model tree for ale-che/Ergo-mlx-mxfp4

Quantized
Amazon-FMR/Ergo
Quantized
(27)
this model