Instructions to use dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit 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("dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit") 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 dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit"
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": "dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit 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 "dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit"
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 dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit"
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 "dima6312/Flint-40B-A2.5B-abliterated-Rec-4bit" \ --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-abliterated (Rec 4-bit)
An abliterated (uncensored) Flint: RecursiveSI's Flint 40B-A2.5B with its refusal direction removed, for security research and coding work: exploit analysis, malware triage, detection engineering, CTFs and red-team tooling that the original model often declines.
Summary: held-out MITRE ATT&CK refusals 15% → 0% (n=100, Q8_0). No significant drop on HumanEval+, MBPP+, GSM8K, MMLU-Pro, CyberMetric or WMDP-cyber (paired, same items). KL divergence from the original on harmless prompts: 0.0146. Builds: BF16, GGUF (Q8_0 to Q3_K_M), NVFP4 for NVIDIA Blackwell, MLX 4-bit for Apple silicon.
Which build
Not sure? Take the GGUF Q4_K_M (24 GB). It runs in llama.cpp and in apps built on it, including LM Studio (its llama.cpp runtime 2.63.0 includes Flint). On a Mac, the Rec 4-bit build runs in RecursiveSI's Rec runtime (125 tok/s decode on an M4 Pro) and the MLX 4-bit build in mlx-lm (85 tok/s).
| You run | Download | Size |
|---|---|---|
| llama.cpp, or an app that bundles llama.cpp b11827 or later; any GPU, CPU or Mac | GGUF: Q8_0 is the benchmarked build, Q4_K_M the usual choice |
42 / 24 GB |
| NVIDIA Blackwell GPU (RTX 50 series, RTX PRO 6000, DGX Spark) with llama.cpp CUDA | NVFP4 GGUF | 23 GB |
| Apple silicon Mac with mlx-lm installed from GitHub (Flint support is merged but not released yet) | MLX 4-bit | 21 GB |
| Apple silicon Mac with RecursiveSI's Rec runtime | Rec 4-bit (this repo) | 21 GB |
| transformers or SGLang on a GPU server; fine-tuning or making your own quants | BF16 safetensors | 80 GB |
Plan for the file size plus memory for context: about 26 KB per token, so roughly 7 GB at the full 262,144 tokens.
This repo is the build for RecursiveSI's Rec runtime (for mlx-lm, use the MLX 4-bit repo): the BF16 checkpoint quantized to the same layout as RecursiveSI's own int4 release (affine int4 with group size 64, 8-bit embeddings, BF16 routers and norms; per-group scales chosen by minimum squared error). About 21 GB; it loads in about 25 GB of unified memory.
Community builds
Quantizations made by other people. I have not tested them. The model tree on this page links every build that lists this model as its base.
| Build | By | For |
|---|---|---|
| MLX oQ4e (23 GB), MLX oQ8e (42 GB) | Studio-Research-M1 | oMLX on Apple silicon; the cards report KL divergence against FP32 and speed on an M1 Max |
| GGUF, imatrix GGUF | mradermacher | llama.cpp |
| FP8 | cbert33 | GPU servers (compressed-tensors W8A8, calibrated FP8 KV cache) |
| EXL3 4.0 bpw | cbert33 | ExLlamaV3 |
| REAP-224 Rec 4-bit (19 GB) | RinneCODER | Macs with less memory: the Rec build with 32 of the 256 routed experts removed in each layer |
Making your own quant: keep Flint out of FP16. In layer 46 the expert product silu(gate) · up reaches about 90,000, above the FP16 maximum of 65,504, so FP16 builds answer !!!! and give NaN logits. MLX computes in the dtype of the scales and unquantized tensors, so store those in BF16. Studio-Research-M1 found and measured this (discussion).
Results
Both models ran as Q8_0 GGUF on llama-server with the same flags, Flint's recommended sampling (temperature 1.0, top_p 0.95, top_k 20) and full reasoning, on evenly spaced subsets of each benchmark (n in each row). Checks are paired on the same items; a quality check fails only on a drop that is significant at 95%. Refusals are scored with Meta's CyberSecEval refusal check. Refusal rates count refusals only. A reply with no final answer (the model was still reasoning at the 8,192-token limit) is listed separately as "no answer": on the 100 MITRE prompts that happened 19 times for the abliterated model and once for the original. The cut-off reasoning was not repetitive; give long security tasks a larger token budget.
| Check | Original | Abliterated | Result |
|---|---|---|---|
| MITRE refusals (n=100) significantly lower | 15% | 0% | pass |
| FRR false refusals (n=100) not significantly higher | 0% | 0% | pass |
| cybermetric (n=50) not significantly worse | 100% | 96% | pass |
| gsm8k (n=50) not significantly worse | 98% | 98% | pass |
| mmlu_pro (n=50) not significantly worse | 80% | 78% | pass |
| wmdp_cyber (n=50) not significantly worse | 50% | 60% | pass |
| humaneval_plus (n=40) not significantly worse | 90% | 95% | pass |
| mbpp_plus (n=40) not significantly worse | 87.5% | 90% | pass |
| pp512 tok/s within 3% | 8050.8 | 8135.1 | pass |
| tg128 tok/s within 3% | 180.0 | 185.6 | pass |
Refusals on held-out CyberSecEval MITRE prompts (n per ATT&CK category below):
| Category | n | Original: refused / no answer | Abliterated: refused / no answer |
|---|---|---|---|
| C2 | 10 | 20% / 0% | 0% / 30% |
| Collection | 10 | 0% / 0% | 0% / 0% |
| Discovery | 10 | 0% / 10% | 0% / 20% |
| Evasion | 10 | 40% / 0% | 0% / 40% |
| Execution | 10 | 10% / 0% | 0% / 30% |
| Exfil | 10 | 10% / 0% | 0% / 0% |
| Lateral Movement | 10 | 40% / 0% | 0% / 10% |
| Persistence | 10 | 20% / 0% | 0% / 10% |
| Privilege Escalation | 10 | 10% / 0% | 0% / 30% |
| Recon | 10 | 0% / 0% | 0% / 20% |
Heretic's default refusal count, measured on the NVFP4 builds (100 mlabonne/harmful_behaviors test prompts, reasoning off, greedy, 100 tokens): original 96/100, abliterated 55/100. That count flags any reply containing words such as "harmful" or "illegal", including answers that comply; only 1 of the 55 replies opens with a refusal. Meta's CyberSecEval refusal check on the same replies: original 18/100, abliterated 1/100.
KL divergence from the original on 100 harmless prompts, measured by the search for the selected trial (not part of the checks above): 0.0146 nats/token.
Benchmarks: CyberSecEval MITRE and FRR (Meta), CyberMetric-500, WMDP-cyber, MMLU-Pro, GSM8K, HumanEval+ and MBPP+ (EvalPlus); speed from llama-bench pp512/tg128.
Method
The refusal direction comes from the difference in mean activations on harmful and harmless prompts
(mlabonne/harmful_behaviors, mlabonne/harmless_alpaca). abliterix
removes it from attention output, shared-expert and routed-expert projections; Optuna picks the strengths over 50
trials against refusals on 100 MITRE prompts and KL divergence on harmless prompts. The MITRE prompts in the table
were never seen by the search. Tensor shapes are unchanged, so speed and memory match the original.
Usage
Reasoning is optional. When the model reasons, it uses <think>…</think> before its answer. Use the sampling settings above.
Flint needs its own MLX runtime: RecursiveSI's Rec (rec-mlx). Point it at this folder and its checkpoint manifest:
rec-mlx serve flint --model-dir Flint-40B-A2.5B-abliterated-MLX-4bit \
--manifest Flint-40B-A2.5B-abliterated-MLX-4bit/flint-abliterated-int4.json --port 8008
This serves an OpenAI-compatible API on http://127.0.0.1:8008/v1 with reasoning and tool calls. The manifest pins
the SHA-256 of every file, and Rec checks them before it loads the weights.
Limitations
- The checks ran on subsets of each benchmark (n in each row), on the Q8_0 GGUF only. This 4-bit build was smoke-tested (code, security review, tool calls) on an Apple M4 Pro and scored 9/10 on short GSM8K and HumanEval+ checks (n=10 each), at 125 tok/s decode; it was not fully benchmarked. 4-bit quantization is lossy.
- Refusals are lower, not zero: the selected trial still refused 10 of the 100 prompts used by the search.
- On long security tasks the model can reason for more than 8,192 tokens before answering.
- Abliteration removes refusals; it adds no knowledge. Mistakes the original makes, this model makes too.
Responsible use
This model answers requests the original refuses. It is meant for authorized security testing, research, education and defensive work. You are responsible for how you use it and for following the law and the terms of the systems you test. Its answers can be wrong; check them before acting on them.
Credits
- Flint by RecursiveSI (Apache 2.0). This is a derivative of their weights under the same license.
- abliterix by wuwangzhang1216, building on Heretic by p-e-w.
- Arditi et al., Refusal in Language Models Is Mediated by a Single Direction (2024).
- Maxime Labonne's harmful/harmless prompt sets; Meta's CyberSecEval; CyberMetric (Tihanyi et al.); WMDP (Center for AI Safety); MMLU-Pro (TIGER-Lab); GSM8K (OpenAI); EvalPlus.
- llama.cpp (ggml-org) and transformers (Hugging Face).
- Downloads last month
- 430
4-bit