Instructions to use RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-MXFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-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("RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-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 RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-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 "RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-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": "RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-MXFP4" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-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 "RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-MXFP4"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-MXFP4" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-MXFP4", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-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 "RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-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 RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-MXFP4
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-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 "RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-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 "RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-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"
Flint 40B-A2.5B MLX (GPTQ MXFP4)
An MLX-format conversion of RecursiveSI/flint, a mixture-of-experts coding model with 39.8B total parameters and about 2.5B active per token, quantized to MXFP4 (4-bit E2M1 elements, group size 32, per-group E8M0 scales) with activation-aware GPTQ calibration on Apple Silicon.
This is a third-party conversion published by RESMP-DEV. The upstream weights, license, model card, benchmarks, and serving kit stay with Recursive.
Base model
- Base model:
RecursiveSI/flint - Base revision:
2a247be0c0aec895ccb0ac7ca92229ec6df37288 - Base license: Apache-2.0
- Architecture:
FlintForCausalLM(49 layers: 2 dense then 47 MoE, 256 routed experts with top-6 sigmoid routing, an always-on shared expert, 513-token sliding attention on 35 layers, full attention on 14 layers, per-head learned attention sinks, QK RMSNorm, and no positional encoding on theno_rope_layer_indiceslayers)
How this conversion was made
- Base checkpoint downloaded and verified by SHA-256 on both the Mac and B550.
- A layer-sequential activation-Hessian calibration captured routed-expert activations with the exact training-time routing rule, so only tokens actually routed to an expert contributed to that expert's Hessian.
- Each linear was quantized to MXFP4 with a safe-scale search, and the resulting scales were injected into an MXFP4 round-to-nearest conversion of the base checkpoint.
- The packed model was reloaded through MLX-LM and exercised end to end.
Calibration corpus: RESMP-DEV/ptq-calibration-corpus at revision
ffa2e74b9361d573167373140f10dfd30c69a327, 256 windows of 2,048 tokens,
model-neutral text input, tokenized with the base checkpoint's tokenizer.
Measurements
All numbers below were measured on an M4 Max (Apple Silicon, 128 GB unified
memory) with mlx==0.32.4 and this repository's
RESMP-DEV/mlx-lm Flint adapter. The holdout set is a held-out
agentic-coding corpus that was not part of the calibration corpus
(8 windows of 2,048 tokens, one shared context per window).
| Model | Format | Holdout perplexity | Decode |
|---|---|---|---|
| This model | MLX GPTQ MXFP4, group 32 | 7.40 | 131.5 tok/s |
| Base checkpoint in MLX | BF16 | 8.54 | 66.8 tok/s |
| Official Apple reference | GGUF Q4_1 | 6.15 | 106.7 tok/s |
Notes on the numbers:
- The perplexity column compares like with like: every model is scored on the same 8 holdout windows with the same tokenizer. The base checkpoint in MLX and the GGUF reference are controls, not baselines this conversion is claimed to beat.
- Against the BF16 checkpoint in MLX on those 16,384 target tokens, this model keeps 77.86% next-token top-1 agreement and improves mean target log-probability by 0.142 nats.
- The official
RecursiveSI/flint-int4-ggufQ4_1 file is the vendor's own Apple Silicon artifact. It is included only as a reference point. - Decode throughput is a single-stream greedy decode of 256 tokens on one prompt, and is a machine-specific number, not a benchmark.
- Prefill of an 8,194-token prompt ran at 1,564 tok/s with a 35.5 GB peak memory footprint for the MXFP4 model.
Independent WikiText-2 check
A second cache-free correctness check used the wikitext-2-raw-v1 validation
split, 16 contiguous windows of 2,048 tokens, and the same token stream for
both MLX arms. "Target top-1" is the fraction of actual next tokens ranked
first by the model; "agreement with BF16" is the fraction of positions where
the MXFP4 and BF16 argmax tokens are identical.
| Model | Scored tokens | Perplexity | Target top-1 | Agreement with BF16 |
|---|---|---|---|---|
| This model, MLX GPTQ MXFP4 | 32,752 | 21.29 | 48.35% | 73.20% |
| Base checkpoint, MLX BF16 | 32,752 | 22.37 | 48.83% | 100% by definition |
The lower MXFP4 perplexity is a property of this limited fixture, not evidence that quantization improved the model. BF16 retains slightly higher target top-1 accuracy on the same tokens, the predictions differ on 26.8% of positions, and any quality claim would require extensive task benchmarking.
Requirements
- Apple Silicon.
mlxandmlx-lm.- The Flint adapter in
RESMP-DEV/mlx-lm. The upstreammlx-lmdoes not supportFlintForCausalLMyet. Use this repository's fork at revisionb384a406ad5cac168877c32b048f31aa9c8db244or newer; that revision fixes the routed-expert activation order:
pip install "mlx-lm @ git+https://github.com/RESMP-DEV/mlx-lm.git"
Usage
pip install "mlx-lm @ git+https://github.com/RESMP-DEV/mlx-lm.git"
mlx_lm.generate --model RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-MXFP4 \
--prompt "Write a Python function that merges overlapping intervals." \
--max-tokens 2048
The chat template uses <|user|>, <|assistant|>, and <|developer|>
role markers. The upstream model card's recommended sampling settings apply
(temperature 1.0, top-p 0.95, top-k 20); the measurements above use greedy
decoding.
Known limitations
- Greedy decoding is not the vendor's validated configuration. The vendor evaluated Flint with temperature 1.0, top-p 0.95, and top-k 20.
- The upstream serving kit is NVIDIA-only. This conversion targets
mlx-lmon Apple Silicon and has not been validated with the vendor's serving stack. - Perplexity on one held-out coding corpus is a distribution-fidelity signal, not a task-accuracy measurement. The vendor's agentic benchmark numbers were produced on NVIDIA hardware with the BF16 and NVFP4 checkpoints and do not transfer to this artifact.
- The quantized artifact was not re-evaluated against the upstream agentic benchmarks (Terminal-Bench, SWE-bench) on this hardware.
License
Apache-2.0, matching the upstream model. See LICENSE.
Provenance
- Upstream model:
RecursiveSI/flint(Recursive), Apache-2.0. - Quantization, calibration, and MLX packaging: RESMP-DEV.
- MLX-LM Flint adapter:
RESMP-DEV/mlx-lm.
- Downloads last month
- 1,623
4-bit
Model tree for RESMP-DEV/Flint-40B-A2.5B-MLX-GPTQ-MXFP4
Base model
RecursiveSI/flint