SenseNova-Loop-9B Abliterated (NVFP4)

This repository provides the NVFP4 build of balllvin/SenseNova-Loop-9B-NVFP4 (9B multimodal looped hybrid linear/full-attention model with 56 effective layer visits per token).

What This Build Is & Why Use It

This build removes refusal behavior from the QAD NVFP4 base using an unlikelihood training objective (25 LoRA r64 steps folded into NVFP4) instead of a linear residual projection, which failed quality bounds on this looped architecture. Harmful refusals drop from 95 / 99 to 3 / 99, benign refusals drop from 60 / 100 to 7 / 100, and MMLU rises from 43.0% to 58.0%.

  • Runtime format (NVFP4): W4A16 NVFP4 (group_size=16, E2M1 codes, E4M3 block scales, FP32 tensor scales) across 248 language-model linears; embeddings, LM head, norms, mHC routers, and the 0.91 GB vision tower stay BF16/FP32.
  • Modification stage (Abliterated): Unlikelihood-trained refusal removal on the 810 training harmful prompts; raw uncensored research baseline between the QAD base and the Arete fine-tune.

Variant Guide (Format vs. Alignment Stage)

Axis Option Best For
Runtime NVFP4 NVIDIA CUDA GPUs (transformers + load_nvfp4.py, 24 GB+ VRAM for decoded BF16)
Runtime MLX Apple Silicon Macs via included tools/serve.py (8.89 GB weights)
Stage Base Quant (QAD) Quantization-aware distilled baseline matching upstream behavior
Stage Abliterated Unlikelihood-trained refusal removal (3 / 99 harmful, 7 / 100 benign refused)
Stage + Arete Post-abliteration Arete SFT (62.0% MMLU, 2.7099 NLL, 6 / 99 harmful refused)

Sibling & Lineage Repos

Variant / Hardware Format Stage Repository
Upstream base BF16 Upstream sensenova/SenseNova-Loop-9B
NVIDIA GPU (NVFP4) W4A16 NVFP4 Base Quant (QAD) balllvin/SenseNova-Loop-9B-NVFP4
Apple Silicon (MLX) MLX 4-bit Base Quant (QAD) balllvin/SenseNova-Loop-9B-NVFP4-MLX
NVIDIA GPU (NVFP4) W4A16 NVFP4 Abliterated balllvin/SenseNova-Loop-9B-abliterated-NVFP4 (this repo)
NVIDIA GPU (NVFP4) W4A16 NVFP4 Abliterated + Arete balllvin/SenseNova-Loop-9B-abliterated-arete-NVFP4
Apple Silicon (MLX) MLX 4-bit Abliterated + Arete balllvin/SenseNova-Loop-9B-abliterated-arete-NVFP4-MLX

Evaluation & Parity Results

Evaluated on the decoded BF16 forward path of the three NVFP4 builds (greedy, 96 tokens, thinking off, eval_count=2): 99 harmful + 100 benign prompts from JailbreakBench + AdvBench, MMLU slice (300 rows base; 100 rows abliterated/Arete), WikiText NLL (24 windows of 1,024 tokens; BF16 ref 2.8198 / 2.8206), and Nous Propaganda Eval (803 items, temp 0.6, 512-token cap, judged by grok-4.7).

Build Harmful Refused Benign Refused MMLU WikiText NLL Propaganda Fact Propaganda Rate
NVFP4 Base (QAD) 95 / 99 60 / 100 43.0% 2.7560 1.367 / 5 19.3%
+ Abliterated 3 / 99 7 / 100 58.0% 2.7619 1.242 / 5 27.8%
+ Abliterated + Arete 6 / 99 6 / 100 62.0% 2.7099 1.320 / 5 29.6%

Grade reports: Propaganda-Eval-SenseNova-Loop-9B-NVFP4, Propaganda-Eval-SenseNova-Loop-9B-abliterated-NVFP4, and Propaganda-Eval-SenseNova-Loop-9B-abliterated-arete-NVFP4.

Weight Size & Format Footprint

Format & Precision Packed Weights Decoded BF16 Runtime Notes
W4A16 NVFP4 (base / ablit / arete) 8.89 GB ~18.8 GB load_nvfp4.py decodes to BF16 by default; budget 24 GB+ GPU

Memory & Context Budget

  • Native context: 524,288 (512K via YaRN factor=2.0 over 262,144; 32 physical layers with layers 4–27 looped 2x = 56 visits; 8 full-attention + 24 linear-attention layers).
  • KV cache: 57,344 B/tok (BF16 KV) plus 90.8 MB linear-attention state per request. Packed weights are 8.89 GB; the decoded BF16 path in load_nvfp4.py needs ~18.8 GB plus runtime room (24 GB+ GPU recommended).
Machine / Budget Usable Memory Packed Weights Max Context (1 req) Max Context (4 reqs) Max Context (8 reqs)
NVIDIA GPU (24 GB) 21.6 GB 8.89 GB 167,796 40,761 19,588
NVIDIA GPU (48 GB) 43.2 GB 8.89 GB 512K 134,929 66,672
NVIDIA GPU (96 GB) 86.4 GB 8.89 GB 512K 323,266 160,841

Agent Setup & Hosting

Accept the upstream sensenova/SenseNova-Loop-9B terms if needed and authenticate (hf auth login or HF_TOKEN). Weight files in this repository live under ablit/nvfp4/, and the reference loader load_nvfp4.py is hosted in balllvin/SenseNova-Loop-9B-abliterated-arete-NVFP4-MLX.

NVIDIA CUDA (NVFP4 via transformers + load_nvfp4.py)

uv venv --python 3.12 && source .venv/bin/activate
uv pip install torch transformers safetensors accelerate pillow huggingface_hub
hf download balllvin/SenseNova-Loop-9B-abliterated-NVFP4 --include "ablit/nvfp4/*" --local-dir ~/models/SenseNova-Loop-9B-abliterated-NVFP4
hf download balllvin/SenseNova-Loop-9B-abliterated-arete-NVFP4-MLX load_nvfp4.py --local-dir ~/models/SenseNova-Loop-9B-abliterated-NVFP4
import sys
from PIL import Image
from transformers import AutoProcessor

sys.path.insert(0, "/path/to/SenseNova-Loop-9B-abliterated-NVFP4")
from load_nvfp4 import load

model_dir = "/path/to/SenseNova-Loop-9B-abliterated-NVFP4/ablit/nvfp4"
model, tok = load(model_dir, device="cuda")               # decodes NVFP4 -> BF16 (~19 GB VRAM)
proc = AutoProcessor.from_pretrained(model_dir, trust_remote_code=True)

messages = [{"role": "user", "content": [{"type": "text", "text": "What is 17 * 23?"}]}]
prompt = proc.apply_chat_template(messages, tokenize=False, add_generation_prompt=True, enable_thinking=False)
inputs = proc(text=[prompt], 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))

(Pass packed=True to load(...) to keep 4-bit weights packed at rest and decode per forward pass.)

How It Was Built

  1. Start point: balllvin/SenseNova-Loop-9B-NVFP4.
  2. Unlikelihood refusal removal: Linear residual projections left 16 / 16 validation refusals or collapsed KL (2–14). Instead, LoRA r=64 minimized logsumexp(logits[refusal_opener_ids]) at the last prompt token across 810 training harmful prompts (25 steps to 0 / 16 validation refusals), then folded into masters and requantized to NVFP4 (248 linears).

Limits & License

  • Behavioral scope: Research build (Abliterated); abliterated/Arete builds answer 93–96 / 99 harmful prompts on the sealed eval and are not safety-aligned. Vision support is verified by a 448x448 color/shape smoke test (no full multimodal benchmark run). The upstream sensenova/SenseNova-Loop-9B repo is gated on Hugging Face.
  • License: Apache-2.0 (details), matching sensenova/SenseNova-Loop-9B; independent community build unaffiliated with SenseNova or Nous Research.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for balllvin/SenseNova-Loop-9B-abliterated-NVFP4

Finetuned
(13)
this model