Instructions to use leonsarmiento/Arete-27B-oQ4e with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use leonsarmiento/Arete-27B-oQ4e with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("leonsarmiento/Arete-27B-oQ4e") config = load_config("leonsarmiento/Arete-27B-oQ4e") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use leonsarmiento/Arete-27B-oQ4e with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "leonsarmiento/Arete-27B-oQ4e"
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": "leonsarmiento/Arete-27B-oQ4e" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use leonsarmiento/Arete-27B-oQ4e 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 "leonsarmiento/Arete-27B-oQ4e"
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 leonsarmiento/Arete-27B-oQ4e
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use leonsarmiento/Arete-27B-oQ4e with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "leonsarmiento/Arete-27B-oQ4e"
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 "leonsarmiento/Arete-27B-oQ4e" \ --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"
leonsarmiento/Arete-27B-oQ4e
Data-aware oQ4e MLX quantization of NousResearch/Arete-27B โ global 4-bit with imatrix-guided precision elevation to 5/6/8-bit on the tensors that need it. Vision tower preserved (multimodal via mlx-vlm).
About Arete-27B
Nous Research post-trained Qwen/Qwen3.8-27B to reinforce western values on a Chinese-trained model. Pure supervised fine-tuning โ no RL, no preference optimization, no architectural modification: ~20K prompts / 52.8M tokens across seven value categories (freedom of expression, state ideology, state vs. free market, education, data privacy & surveillance, democracy, environmental policy), distilled from the open teacher Inkling, trained at 64k context over 2 epochs.
Measured on the Propaganda Eval (803 prompts, 7 categories): fact mean 2.32 โ 2.98 (out of 5) and answers containing propaganda 22% โ 0.9%, with the largest change in freedom of expression (fact score 0.89 โ 2.44, propaganda 60% โ 1%). General capability held: Hermes Bench 65.77% โ 65.60% (within noise), Terminal-Bench-2.1 67% โ 70%.
Training details worth knowing for quantization: all language-model weights were trained, the vision encoder was frozen (text-only data), and the MTP head was disabled during training โ and the source repo ships no mtp.* tensors at all, so this quant carries no bundled MTP heads (nothing to graft). text_config.mtp_num_hidden_layers stays 0.
About oQ4e (data-aware quantization)
Unlike data-agnostic recipes (uniform bit-widths, or static importance heuristics), oQ4e runs a calibration pass over real activations and elevates the tensors whose quantization error the imatrix flags as costly. The trade-off: data-aware methods can skew representation toward the calibration domain โ here oqe_code_multilingual (coding + multilingual text).
Calibration: oqe_code_multilingual ยท 128 samples ร 512 ctx (adaptive budget up to 1024) ยท 496 activation entries ยท mlx-vlm qwen3_5 model class.
Quantization Details
- Global default: 4-bit affine, group_size=64 (everything not listed below, including the vision tower)
- Elevated to 5-bit (235 tensors, imatrix-driven):
embed_tokensโ 5-bit- All 16 full-attention layers (every 4th layer,
full_attention_interval: 4): 62self_attnq/k/v/o tensors mlp.down_projof layers 0โ17 (18 tensors) โ early-layer FFN sensitivitylinear_attn.in_projacross most layers (154 tensors)
- Elevated to 6-bit (4 tensors):
lm_head,layers.63.self_attn.{k,v}_proj,layers.52.linear_attn.in_proj_a - Elevated to 8-bit (4 tensors):
layers.50/62.linear_attn.in_proj_{a,b}โ the hottest tensors in the calibration pass - Norms: bf16
- Vision tower: preserved at 4-bit (frozen during the source fine-tune)
- Chat template: byte-identical to source,
reasoning_effortdefaulting toxhigh - MTP: none (source ships none โ see About)
Stats: 17.19 GB ยท 4 shards ยท ~5.03 bpw ยท mlx-vlm ยท vision preserved ยท all shards carry format: mlx metadata.
Usage
Works in LM Studio and oMLX. No Lightning MTP on this build (no MTP heads in the source) โ for MTP-accelerated Qwen3.8-27B siblings, see leonsarmiento/Qwen3.8-27B-heretic-ara-4bit-mtp-mlx.
Reasoning parsing / tool calling: reasoning_parser: qwen3, tool_call_parser: qwen3_xml.
Sampling โ thinking mode (Qwen3.8 family defaults): temperature 1.0, top_p 0.95, top_k 20.
Sampling โ non-thinking mode (Qwen recommended): temperature 0.7, top_p 0.8, presence_penalty 1.5, with enable_thinking: false.
Reasoning effort: the chat template accepts reasoning_effort โ {low, medium, high, xhigh} (default xhigh).
(The source repo documents no sampling recommendations; the above are the Qwen3.8-27B family defaults this fine-tune inherits.)
Source
NousResearch/Arete-27B โ built on Qwen/Qwen3.8-27B: dense hybrid-attention VLM, 64 layers (48 linear attention + 16 full attention), 262K context, vision tower. Blog post ยท Evaluation dataset.
Acknowledgements
Thanks to Nous Research for Arete-27B and the open Propaganda Eval, and to Jundot for the oQ4e data-aware recipe this quant follows.
- Downloads last month
- 18
4-bit