Instructions to use Melkor01/SenseNova-Loop-9B-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Melkor01/SenseNova-Loop-9B-MLX-4bit 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("Melkor01/SenseNova-Loop-9B-MLX-4bit") config = load_config("Melkor01/SenseNova-Loop-9B-MLX-4bit") # 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 Melkor01/SenseNova-Loop-9B-MLX-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 "Melkor01/SenseNova-Loop-9B-MLX-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": "Melkor01/SenseNova-Loop-9B-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use Melkor01/SenseNova-Loop-9B-MLX-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 "Melkor01/SenseNova-Loop-9B-MLX-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 Melkor01/SenseNova-Loop-9B-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Melkor01/SenseNova-Loop-9B-MLX-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 "Melkor01/SenseNova-Loop-9B-MLX-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 "Melkor01/SenseNova-Loop-9B-MLX-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"
SenseNova-Loop-9B · MLX 4-Bit
Compact looped multimodal reasoning, natively quantized for 8 GB–16 GB+ Apple Silicon Macs.
English · 简体中文
Overview · Quick Start · Vision & MTP · Architecture · Verification · Provenance
Overview
Melkor01/SenseNova-Loop-9B-MLX-4bit is a compact, community-built 4-bit MLX conversion of sensenova/SenseNova-Loop-9B for Apple Silicon Macs, preserving all 96 float32 mHC routing tensors, the full bfloat16 vision encoder (869.8 MB), and the official MTP draft head (464.0 MB).
| Specification | Detail |
|---|---|
| Base Model | sensenova/SenseNova-Loop-9B (~9B parameters → ~14.6B inference-equivalent compute) |
| Architecture | Looped Multimodal Transformer (32 stored layers → 56 effective passes; 3:1 hybrid attention; 2-stream mHC) |
| Effective Precision | 4.511 bpw (4-bit MLX affine; float32 mHC routers; bfloat16 vision & MTP) |
| Total Size | 6.03 GB (0.00 GB language + 869.8 MB vision + 464.0 MB MTP) |
| Context Window | Up to 512K tokens |
| Recommended Memory | 8 GB–16 GB unified memory (text & images) · 24 GB+ (extended long context) |
| Requirements | Apple Silicon Mac (M1 – M5) · Python 3.11+ · mlx-lm >= 0.32 |
Available MLX Quantizations
| Repository | Precision | Total Size | Recommended For |
|---|---|---|---|
SenseNova-Loop-9B-MLX-4bit (this repo) |
4.511 bpw |
6.03 GB |
8 GB–16 GB Macs & maximum long-context headroom |
SenseNova-Loop-9B-MLX-6bit |
6.510 bpw |
8.11 GB |
16 GB–24 GB+ Macs prioritizing higher looped-pass reasoning fidelity |
Quick Start
pip install -U "mlx-lm>=0.32" pillow "huggingface_hub[hf_xet]"
mlx_lm.generate \
--model Melkor01/SenseNova-Loop-9B-MLX-4bit \
--trust-remote-code \
--prompt "Summarize how looped transformers trade memory for compute in three concise bullets."
Vision & MTP Decoding
hf download Melkor01/SenseNova-Loop-9B-MLX-4bit --local-dir ~/models/SenseNova-Loop-9B-MLX-4bit
git clone https://github.com/internet-projects/sensenova-loop-mlx.git
cd sensenova-loop-mlx
python scripts/generate_vision.py \
--model ~/models/SenseNova-Loop-9B-MLX-4bit \
--image screenshot.png \
--prompt "Describe the contents and layout of this image." \
--max-tokens 256
from mlx_lm import load
from sensenova_mlx.mtp import load_mtp_head, generate_mtp
model, tokenizer = load("~/models/SenseNova-Loop-9B-MLX-4bit", trust_remote_code=True)
head = load_mtp_head(model, "~/models/SenseNova-Loop-9B-MLX-4bit/mtp.safetensors")
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "Write a minimal binary search in Python."}],
tokenize=False, add_generation_prompt=True, enable_thinking=False,
)
tokens = list(generate_mtp(model, head, tokenizer.encode(prompt), max_tokens=256, k=3, eos=tokenizer.eos_token_ids))
print(tokenizer.decode(tokens))
Architecture & Benchmarks
Upstream official BF16 reference benchmarks (not quantized MLX re-evaluations): GAIA 69.90 · Terminal-Bench 2.1 59.55 · AutomationBench 36.67 · AIDABench 65.31 · NL2Repo 41.36 · BIRD 72.34.
Verification
All four end-to-end validation gates passed on Linux MLX (NVIDIA A100-SXM4-80GB, 81920 MiB, mlx 0.32.4, mlx-lm 0.32.2):
| Gate | Status | Verified Result |
|---|---|---|
| Tensor & Sidecar Integrity | PASS | 96/96 float32 mHC routers · vision.safetensors (333 BF16 tensors, 0 NaNs) · mtp.safetensors (15 BF16 tensors) |
Stock mlx-lm Text |
PASS | Deterministic math prompt (17 * 23) returned exact 391 |
Vision Pipeline (generate_vision.py) |
PASS | Correctly identified synthetic image (red circle left, blue square right); 6.09 GB peak GPU memory |
MTP Speculative Decoding (k=3) |
PASS | Clean EOS-terminated Python output via sensenova_mlx.mtp (0.9 tok/s) |
Provenance & Files
Build Provenance & File Manifest (16 files · 6.03 GB)
- Source:
sensenova/SenseNova-Loop-9B@3cc220e9c14bd7a74813c1299765e22147b1a3d5 - Converter:
internet-projects/sensenova-loop-mlx@9945d19 - Build Stack:
mlx 0.32.4·mlx-lm 0.32.2·transformers 5.18.0· Published November 24, 2026
| File | Size | Role |
|---|---|---|
LICENSE |
11.1 KB | Apache-2.0 License |
NOTICE |
539 B | Attribution notice for SenseNova and sensenova-loop-mlx |
chat_template.jinja |
7.6 KB | Chat template with enable_thinking toggle |
config.json |
3.6 KB | Model, quantization, and vision_config parameters |
generation_config.json |
198 B | Default decoding and sampling parameters |
model.safetensors |
4.70 GB | Repository artifact |
model.safetensors.index.json |
86.5 KB | Shard index for mlx-lm language backbone |
modeling_sensenova_loop.py |
18.5 KB | Reference modeling definition from source checkpoint |
mtp.safetensors |
464.0 MB | Official Multi-Token Prediction draft head (15 tensors, bfloat16) |
preprocessor_config.json |
443 B | Image preprocessing configuration |
processor_config.json |
1.2 KB | Multimodal processor configuration |
sensenova_loop.py |
23.2 KB | Custom sensenova_loop MLX architecture module (model_file hook) |
tokenizer.json |
19.1 MB | Fast BPE tokenizer vocabulary and merges |
tokenizer_config.json |
1.2 KB | Tokenizer settings and special token mappings |
video_preprocessor_config.json |
550 B | Video frame preprocessing configuration |
vision.safetensors |
869.8 MB | Native bfloat16 vision encoder (333 tensors from model.visual.*) |
License & Credits
- Original Model:
sensenova/SenseNova-Loop-9Bby SenseNova / SenseTime — Apache-2.0 License. - MLX Port & Converter:
internet-projects/sensenova-loop-mlxby NetProjects — Apache-2.0 License.
- Downloads last month
- -
4-bit
Model tree for Melkor01/SenseNova-Loop-9B-MLX-4bit
Base model
sensenova/SenseNova-Loop-9B