SenseNova-Loop-9B · MLX 6-Bit

Deeper looped multimodal computation, natively quantized for Apple Silicon.

English  ·  简体中文

Apple Silicon MLX Precision Vision MTP Verified License

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 in float32 and normalization weights unquantized to preserve looped-pass stability.
  • Vision Encoder (869.8 MB) — Complete model.visual.* tower (333 tensors) extracted verbatim in native bfloat16 (vision.safetensors).
  • MTP Draft Head (464.0 MB) — Official Multi-Token Prediction sidecar (15 tensors, bfloat16) bundled in mtp.safetensors for 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? Upstream mlx-lm loads the custom sensenova_loop architecture from the bundled sensenova_loop.py file referenced by config.json. You can audit sensenova_loop.py directly 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

SenseNova-Loop-9B Looped Block and Two-Stream mHC Architecture

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 GB peak 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 8 when 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

Downloads last month
28
Safetensors
Model size
9B params
Tensor type
U32
·
F32
·
BF16
·
MLX
Hardware compatibility
Log In to add your hardware

6-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Melkor01/SenseNova-Loop-9B-MLX-6bit

Quantized
(55)
this model