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.
Instructions to use ale-che/Ergo-mlx-mxfp4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ale-che/Ergo-mlx-mxfp4 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("ale-che/Ergo-mlx-mxfp4") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use ale-che/Ergo-mlx-mxfp4 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ale-che/Ergo-mlx-mxfp4"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ale-che/Ergo-mlx-mxfp4" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use ale-che/Ergo-mlx-mxfp4 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "ale-che/Ergo-mlx-mxfp4"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "ale-che/Ergo-mlx-mxfp4" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ale-che/Ergo-mlx-mxfp4", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use ale-che/Ergo-mlx-mxfp4 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ale-che/Ergo-mlx-mxfp4"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default ale-che/Ergo-mlx-mxfp4
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use ale-che/Ergo-mlx-mxfp4 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "ale-che/Ergo-mlx-mxfp4"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "ale-che/Ergo-mlx-mxfp4" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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
mxfp4format, so the expert bytes are reinterpreted as MLXmxfp4weights 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-lmhas noergomodel, so this repo ships the model definitionergo.py, ported from the transformersmodeling_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 withoutergo.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
4-bit