Instructions to use Melkor01/SenseNova-Loop-9B-MLX-6bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Melkor01/SenseNova-Loop-9B-MLX-6bit 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-6bit") config = load_config("Melkor01/SenseNova-Loop-9B-MLX-6bit") # 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-6bit 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-6bit"
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-6bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use Melkor01/SenseNova-Loop-9B-MLX-6bit 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-6bit"
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-6bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Melkor01/SenseNova-Loop-9B-MLX-6bit 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-6bit"
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-6bit" \ --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 6-Bit
Deeper looped multimodal computation, natively quantized for Apple Silicon.
English · 简体中文
Overview · Quick Start · Vision & MTP · Architecture · Verification · Provenance
Overview
Melkor01/SenseNova-Loop-9B-MLX-6bit is a complete, community-built 6-bit MLX conversion of sensenova/SenseNova-Loop-9B engineered for native MLX execution on Apple Silicon Macs.
Every component of SenseTime's official release is preserved in one repository:
- Language Backbone (
6.79 GB) — 6-bit MLX affine quantization (6.510 bpw), keeping all 96 two-stream mHC routing tensors infloat32and normalization weights unquantized to preserve looped-pass stability. - Vision Encoder (
869.8 MB) — Completemodel.visual.*tower (333 tensors) extracted verbatim in nativebfloat16(vision.safetensors). - MTP Draft Head (
464.0 MB) — Official Multi-Token Prediction sidecar (15 tensors,bfloat16) bundled inmtp.safetensorsfor speculative decoding.
| 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 | 6.510 bpw (6-bit MLX affine; float32 mHC routers; bfloat16 vision & MTP) |
| Total Size | 8.11 GB (6.79 GB language + 869.8 MB vision + 464.0 MB MTP) |
| Context Window | Up to 512K tokens |
| Recommended Memory | 16 GB unified memory (text, short context) · 24 GB+ (vision, long context, or side-by-side apps) |
| Requirements | Apple Silicon Mac (M1 – M5) · Python 3.11+ · mlx-lm >= 0.32 |
Quick Start
1. Install
pip install -U "mlx-lm>=0.32" pillow "huggingface_hub[hf_xet]"
Why
--trust-remote-code/trust_remote_code=True? Upstreammlx-lmloads the customsensenova_looparchitecture from the bundledsensenova_loop.pyfile referenced byconfig.json. You can auditsensenova_loop.pydirectly in this repository before running.
2. Command Line (mlx-lm)
mlx_lm.generate \
--model Melkor01/SenseNova-Loop-9B-MLX-6bit \
--trust-remote-code \
--prompt "Summarize how looped transformers trade memory for compute in three concise bullets."
3. Python (mlx-lm)
import mlx.core as mx
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load(
"Melkor01/SenseNova-Loop-9B-MLX-6bit",
trust_remote_code=True,
)
sampler = make_sampler(temp=0.0)
messages = [
{"role": "user", "content": "Explain the tradeoffs of hybrid linear and full attention."}
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False, # Set True for step-by-step reasoning
)
response = generate(
model,
tokenizer,
prompt=prompt,
max_tokens=1024,
sampler=sampler,
)
print(response)
mx.clear_cache()
4. Local OpenAI-Compatible Server
mlx_lm.server \
--model Melkor01/SenseNova-Loop-9B-MLX-6bit \
--trust-remote-code \
--port 8080
(Tip: Add --kv-bits 8 during extended context sessions on 16 GB–24 GB Macs to keep KV-cache memory flat.)
Vision & MTP Decoding
Stock mlx-lm loads the quantized text backbone directly while ignoring sidecar files. To run image input (vision.safetensors) or Multi-Token Prediction speculative decoding (mtp.safetensors), use the companion runtime from internet-projects/sensenova-loop-mlx:
Download Locally
hf download Melkor01/SenseNova-Loop-9B-MLX-6bit --local-dir ~/models/SenseNova-Loop-9B-MLX-6bit
git clone https://github.com/internet-projects/sensenova-loop-mlx.git
Image Input (vision.safetensors)
cd sensenova-loop-mlx
python scripts/generate_vision.py \
--model ~/models/SenseNova-Loop-9B-MLX-6bit \
--image screenshot.png \
--prompt "Describe the contents and layout of this image." \
--max-tokens 256
Speculative Decoding with MTP (mtp.safetensors)
from mlx_lm import load
from sensenova_mlx.mtp import load_mtp_head, generate_mtp
model, tokenizer = load("~/models/SenseNova-Loop-9B-MLX-6bit", trust_remote_code=True)
head = load_mtp_head(model, "~/models/SenseNova-Loop-9B-MLX-6bit/mtp.safetensors")
messages = [{"role": "user", "content": "Write a minimal binary search in Python."}]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False,
)
ids = tokenizer.encode(prompt)
tokens = list(generate_mtp(model, head, ids, max_tokens=256, k=3, eos=tokenizer.eos_token_ids))
print(tokenizer.decode(tokens))
Architecture & Benchmarks
Inputs pass through layers 0–3, execute the shared middle block 4–27 twice (B(B(h))), and exit through layers 28–31—delivering 56 decoder-layer executions from 32 stored layers. Each 4-layer group interleaves 3 linear-attention layers + 1 full-attention layer, paired with two-stream manifold-constrained hyper-connections (mHC) using 20 Sinkhorn normalization iterations.
Upstream Reference Benchmarks (Official BF16 Release)
Reported by SenseNova for the full bfloat16 base model; provided as a capability reference rather than quantized MLX re-evaluations.
| Benchmark | SenseNova-Loop-9B (BF16) | Preview (BF16) | Qwen3.8-27B |
|---|---|---|---|
| GAIA | 69.90 |
37.86 |
— |
| Terminal-Bench 2.1 | 59.55 |
40.45 |
— |
| AutomationBench | 36.67 |
14.33 |
36.67 |
| AIDABench | 65.31 |
— | 65.01 |
| NL2Repo | 41.36 |
— | 44.60 |
| BIRD | 72.34 |
71.38 |
— |
Detailed Model Configuration
| Parameter | Value |
|---|---|
| Distinct / Executed Layers | 32 / 56 (looped range [4, 28) × 2 passes) |
| Hidden / FFN Dimension | 4,096 / 12,288 |
| Vocabulary Size | 248,320 |
| Full-Attention / KV Heads | 16 / 4 (3:1 linear-to-full hybrid pattern) |
| mHC Streams / Sinkhorn Steps | 2 / 20 (float32 routing weights preserved) |
Verification
All four end-to-end validation gates passed on a clean anonymous download of this public repository using Linux MLX (mlx 0.32.4 / mlx-lm 0.32.2 on CUDA GPU):
| Gate | Status | Verified Result |
|---|---|---|
| Tensor & Sidecar Integrity | PASS | 96/96 float32 mHC routers · vision.safetensors (333 BF16 tensors) · 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); 8.17 GB peak GPU memory |
MTP Speculative Decoding (k=3) |
PASS | Valid Python output verified via sensenova_mlx.mtp |
Hardware Note: End-to-end functional verification ran on Linux MLX CUDA (
8.17 GBpeak multimodal memory). Apple Silicon Metal throughput (tok/s) has not yet been benchmarked on-device.
Notes & Limitations
- Complex multi-constraint tool use: May occasionally miss subtle requirements when given large tool schemas or deeply nested constraints.
- Long-horizon coding & rich 3D web apps: Performs best with iterative feedback (2–3 refinement turns) rather than single-shot generation.
- MLX long-context memory: Reset caches (
mx.clear_cache()) between independent runs or enable--kv-bits 8when pushing past 32K–64K context on 16 GB–24 GB unified memory machines.
Provenance & Files
Build Provenance & Environment
| Field | Value |
|---|---|
| Source Checkpoint | sensenova/SenseNova-Loop-9B |
| Pinned Source Commit | 3cc220e9c14bd7a74813c1299765e22147b1a3d5 |
| Converter | internet-projects/sensenova-loop-mlx @ 9945d19 |
| Build Stack | mlx 0.32.4 · mlx-lm 0.32.2 · transformers 5.18.0 |
| Updated | November 24, 2026 |
Repository File Manifest (17 files · 8.11 GB)
| 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-00001-of-00002.safetensors |
5.00 GB | 6-bit MLX language backbone weights (shard 1 of 2) |
model-00002-of-00002.safetensors |
1.79 GB | 6-bit MLX language backbone weights (shard 2 of 2) |
model.safetensors.index.json |
101.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-9B· GitHub by SenseNova / SenseTime — Apache-2.0 License. - MLX Port & Converter:
internet-projects/sensenova-loop-mlxby NetProjects — Apache-2.0 License. - Disclaimer: Independent community MLX conversion; not officially affiliated with or endorsed by SenseTime / SenseNova.
- Downloads last month
- 28
6-bit
Model tree for Melkor01/SenseNova-Loop-9B-MLX-6bit
Base model
sensenova/SenseNova-Loop-9B