Instructions to use balllvin/SenseNova-Loop-9B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use balllvin/SenseNova-Loop-9B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="balllvin/SenseNova-Loop-9B-NVFP4")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("balllvin/SenseNova-Loop-9B-NVFP4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use balllvin/SenseNova-Loop-9B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "balllvin/SenseNova-Loop-9B-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "balllvin/SenseNova-Loop-9B-NVFP4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/balllvin/SenseNova-Loop-9B-NVFP4
- SGLang
How to use balllvin/SenseNova-Loop-9B-NVFP4 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "balllvin/SenseNova-Loop-9B-NVFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "balllvin/SenseNova-Loop-9B-NVFP4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "balllvin/SenseNova-Loop-9B-NVFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "balllvin/SenseNova-Loop-9B-NVFP4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use balllvin/SenseNova-Loop-9B-NVFP4 with Docker Model Runner:
docker model run hf.co/balllvin/SenseNova-Loop-9B-NVFP4
SenseNova-Loop-9B, NVFP4
The official SenseNova-Loop-9B checkpoint quantized to NVFP4 with quantization-aware distillation through the quantizer. It refuses 95 of 99 harmful prompts and 60 of 100 benign ones; MMLU is 43.0% and WikiText NLL is 2.7560 against 2.8198 for the bf16 reference. It is the base of this family: the abliterated and abliterated + Arete builds start here. It is for research.
Propaganda Eval
Nous's Censorship and Propaganda Eval (803 items; answers from this build; judged by grok-4.7 at
temperature 0). The published profile: temperature 0.6, top-p 1.0, thinking off, one sample per item,
512-token cap; the checkpoint's trained loop setting (layers 4β27 run twice per token; eval_count=2), a single
user turn with no system prompt and no reasoning trace; seed 1001. All three builds were measured on the NVFP4 builds and the same table appears on each card.
| Build | Fact score (0β5) | Propaganda present |
|---|---|---|
| NVFP4 base (QAD) | 1.367 | 19.3% |
Answers and grade reports: the gated dataset balllvin/Propaganda-Eval-SenseNova-Loop-9B-NVFP4 (prop/β¦). Unanswered or length-cut items score fact 0 and propaganda 0, as the harness does. Abliteration/Arete benches: Propaganda-Eval-SenseNova-Loop-9B-abliterated-NVFP4 and Propaganda-Eval-SenseNova-Loop-9B-abliterated-arete-NVFP4.
This is a propaganda check, not a safety audit; nothing here should be read as the model being safe or
unsafe in general.
Image input
The release checkpoint this build is derived from is multimodal: it accepts text and images and
generates text. The vision tower (model.visual.*, 333 tensors, 0.91 GB bf16) is included, copied
unchanged from the base checkpoint; it is not quantized and none of the QAD / abliteration / Arete steps
touched it. Load with load_nvfp4.py (in this repo) and AutoProcessor, exactly as on the official
checkpoint:
import torch
from PIL import Image
from transformers import AutoProcessor
from load_nvfp4 import load
model, tok = load("balllvin/SenseNova-Loop-9B-NVFP4", device="cuda") # decoded bf16; exact NVFP4
proc = AutoProcessor.from_pretrained("balllvin/SenseNova-Loop-9B-NVFP4", trust_remote_code=True)
messages = [{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": "What is this?"}]}]
text = proc.apply_chat_template(messages, tokenize=False, add_generation_prompt=True,
enable_thinking=False)
inputs = proc(text=[text], images=[Image.open("photo.png")], return_tensors="pt").to("cuda")
out = model.generate(**inputs, max_new_tokens=256)
print(proc.tokenizer.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Verified by one smoke test on the NVFP4 base build (448x448 red-square/blue-circle image, "list the shapes and their colors"): the model answered correctly, with the image tokens expanded by the processor and the vision features spliced into the token embeddings. The abliterated and Arete builds ship the identical vision tower through the same code path. Text behavior is unchanged by the image code. No image benchmark was run for this release.
Memory and context (NVFP4, approximate)
Weights are 8.89 GB packed (NVFP4, group 16; embeddings, LM head, norms, mHC routers and the vision tower stay bf16). The BrainSpa eval loader decodes them to bf16 (~19 GB) for speed; the table assumes the packed build. KV cache is bf16; measured on an RTX PRO 6000 at 57,344 B/token, and the linear-attention recurrent state is 90.8 MB per request. 90% of GPU memory usable, 3 GB runtime room, capped at the config maximum of 524,288 tokens:
| GPU | Usable | 1 request | 4 requests | 8 requests |
|---|---|---|---|---|
| 96 GB | 86.4 GB | 524,288 (cap) | 323,266 | 160,841 |
| 48 GB | 43.2 GB | 524,288 (cap) | 134,929 | 66,672 |
| 24 GB | 21.6 GB | 167,796 | 40,761 | 19,588 |
Left for KV after weights and runtime. The dequantized bf16 forward path (the one the benchmarks used) needs ~18.8 GB of allocations and a few GB of runtime, so budget ~24 GB of GPU memory. The MLX builds have their own Apple Silicon table.
This is a W4A16 NVFP4 build: four-bit E2M1 weights, one E4M3 block scale per 16 input columns and one
fp32 tensor scale per matrix, for every attention and MLP linear of the language model. Embeddings, the LM
head, norms, the mHC routers (fp32) and the vision tower stay bf16. load_nvfp4.py loads the packed
weights; the numbers below are the same model decoded to bf16 (decoding is exact).
Builds
| Build | Repo |
|---|---|
| QAD base | this repo |
| + abliteration | balllvin/SenseNova-Loop-9B-abliterated-NVFP4 |
| + Arete | balllvin/SenseNova-Loop-9B-abliterated-arete-NVFP4 |
| Apple Silicon, MLX 4-bit | balllvin/SenseNova-Loop-9B-NVFP4-MLX |
Results
| Build | Harmful refused, of 99 (higher refuses more) | Benign refused, of 100 (lower is better) | MMLU | WikiText NLL |
|---|---|---|---|---|
| NVFP4 base (QAD) | 95 | 60 | 43.0% | 2.7560 |
Sealed JailbreakBench+AdvBench prompts (99 harmful, 100 benign), greedy, 96 tokens, thinking off. MMLU is a 300-row slice, letter answers. WikiText NLL is the mean over 24 windows of 1,024 tokens; the bf16 reference is 2.8198. The sealed set was not used to choose the quantization recipe.
How it was made
- Format: NVFP4 W4A16, group 16, every language-model attention and MLP linear.
- QAD: LoRA r64 on the quantized linears, delta forward, KL to the bf16 teacher, 241k tokens of FineWeb-Edu, one RTX PRO 6000 spot VM.
- Weights: the packed build in this repo;
load_nvfp4.pydecodes it exactly to bf16.
Run it
from load_nvfp4 import load
model, tok = load("balllvin/SenseNova-Loop-9B-NVFP4", device="cuda") # decoded bf16 GEMMs
model, tok = load("balllvin/SenseNova-Loop-9B-NVFP4", device="cuda", packed=True) # 4-bit at rest, decode per forward
Limits
- QAD is a 4-bit approximation; the results above are the decoded bf16 forward, not a full independent eval.
- This is the base build, not safety-tuned. It refuses 60 of 100 benign prompts, which is high.
- 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; JailbreakBench and AdvBench for the sealed prompts.
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.
Model tree for balllvin/SenseNova-Loop-9B-NVFP4
Base model
sensenova/SenseNova-Loop-9B
docker model run hf.co/balllvin/SenseNova-Loop-9B-NVFP4