Instructions to use balllvin/SenseNova-Loop-9B-NVFP4-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use balllvin/SenseNova-Loop-9B-NVFP4-MLX 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("balllvin/SenseNova-Loop-9B-NVFP4-MLX") config = load_config("balllvin/SenseNova-Loop-9B-NVFP4-MLX") # 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 balllvin/SenseNova-Loop-9B-NVFP4-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "balllvin/SenseNova-Loop-9B-NVFP4-MLX"
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": "balllvin/SenseNova-Loop-9B-NVFP4-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use balllvin/SenseNova-Loop-9B-NVFP4-MLX 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 "balllvin/SenseNova-Loop-9B-NVFP4-MLX"
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 balllvin/SenseNova-Loop-9B-NVFP4-MLX
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use balllvin/SenseNova-Loop-9B-NVFP4-MLX with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "balllvin/SenseNova-Loop-9B-NVFP4-MLX"
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 "balllvin/SenseNova-Loop-9B-NVFP4-MLX" \ --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, NVFP4 -> MLX 4-bit
The Apple Silicon build of balllvin/SenseNova-Loop-9B-NVFP4: the QAD NVFP4 weights converted to MLX affine 4-bit (group 64, 8.0 GB), with the looped 56-of-32 layer plan and the mHC routers ported to MLX. It accepts text and images, like the official checkpoint. It is the base MLX build of this family; the Arete MLX build adds the abliteration and Arete stages and the later router and head work. It is for research.
Builds
| Build | Repo |
|---|---|
| QAD base (NVFP4) | balllvin/SenseNova-Loop-9B-NVFP4 |
| abliterated (NVFP4) | balllvin/SenseNova-Loop-9B-abliterated-NVFP4 |
| + Arete (NVFP4) | balllvin/SenseNova-Loop-9B-abliterated-arete-NVFP4 |
| QAD base, MLX 4-bit | this repo |
| + Arete, MLX 4-bit | balllvin/SenseNova-Loop-9B-abliterated-arete-NVFP4-MLX |
The sealed refusal/MMLU/NLL results are on the NVFP4 base card; this MLX conversion was not separately benchmarked for refusals or MMLU.
Speed (original build)
M5 Pro, 64 GB, 48 tokens out, warm; 8-bit KV for a single stream and bf16 KV for batches:
| Streams | Total tok/s | Per stream tok/s |
|---|---|---|
| 1 | 8.1 | 8.1 |
| 2 | 14.1 | 7.0 |
| 4 | 25.9 | 6.5 |
| 8 | 38.1 | 4.8 |
The included tools are the current code (closed-form router, 8-bit head, streaming, loop selection); this base conversion was measured before them. KV quality on a 48-token teacher-forced window: bf16 NLL 3.5819, 8-bit 3.5828 (+0.0009), 4-bit 3.5652 (-0.0167); greedy text identical in all three. Use 8-bit KV for a single stream and bf16 KV for batches.
Image input
This build accepts text and images and generates text, like the official checkpoint. The vision tower
(model.visual.*, 333 tensors, 0.91 GB bf16) ships in visual.safetensors, copied unchanged from the
base checkpoint; it is not quantized. The included server accepts OpenAI-compatible image content parts
(image_url with a data: URL or a local file path) and renders the chat template and Qwen3VLProcessor
directly:
curl http://127.0.0.1:8099/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "balllvin/sensenova-loop-9b-nvfp4-mlx",
"messages": [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "data:image/png;base64,<BASE64>"}},
{"type": "text", "text": "What is in this image?"}]}],
"max_tokens": 128, "temperature": 0.3
}'
Verified end-to-end on the Arete build (direct library call and tools/serve.py over HTTP,
"list the shapes and their colors"); this build shares the same vision tower and code path but
was not separately smoke-tested. NVFP4 builds were smoke-tested with the same image, correctly. Text behavior is unchanged by the image code (it only activates with
images). No image benchmark was run for this release.
Run it
python tools/serve.py --model . --port 8099 --model-id balllvin/sensenova-loop-9b-nvfp4-mlx \
--kv-bits 8 --max-batch 4 --loops 2 --head-bits 8
The server warms up the 1/8/32/128-token shapes, renders the full message list, supports SSE streaming,
and exits after 30 minutes idle by default. --loops 1 is faster but not the trained model.
How it was made
- Conversion: the QAD NVFP4 base to MLX affine 4-bit (group 64), 8.0 GB.
- Port: the looped execution plan (56 visits of 32 physical layers) and the mHC routers.
- Precision: routers, norms and embeddings stay bf16; the LM head is bf16 in the weights and 8-bit at serve time by default.
Limits
- Image support is verified on this build (one 448ร448 smoke test), but no image benchmark was run for it; and the vision tower is not quantized, so this build is ~0.9 GB larger than before.
- This is the QAD base, not safety-tuned. The NVFP4 source refuses 95 of 99 harmful and 60 of 100 benign prompts; this MLX conversion was not separately benchmarked for refusals or MMLU.
- The speed table is the original build; the included tools are newer and were not re-measured for this base conversion.
- The base checkpoint is gated on Hugging Face; accept its terms before use.
Credits
sensenova/SenseNova-Loop-9B for the base; FineWeb-Edu for the QAD corpus; MLX and mlx-lm for the runtime; JailbreakBench and AdvBench for the sealed prompts on the NVFP4 card.
Licence
The weights are a modified version of SenseNova-Loop-9B under Apache-2.0. This is an independent community build, unaffiliated with the model's authors.
- Downloads last month
- 386
4-bit
Model tree for balllvin/SenseNova-Loop-9B-NVFP4-MLX
Base model
sensenova/SenseNova-Loop-9B