Run this model with HF Jobs
Run letechlead/SenseNova-Loop-9B-FP8 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/letechlead/SenseNova-Loop-9B-FP8. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/letechlead/SenseNova-Loop-9B-FP8 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/letechlead/SenseNova-Loop-9B-FP8. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use letechlead/SenseNova-Loop-9B-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use letechlead/SenseNova-Loop-9B-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="letechlead/SenseNova-Loop-9B-FP8", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("letechlead/SenseNova-Loop-9B-FP8", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use letechlead/SenseNova-Loop-9B-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "letechlead/SenseNova-Loop-9B-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "letechlead/SenseNova-Loop-9B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/letechlead/SenseNova-Loop-9B-FP8
- SGLang
How to use letechlead/SenseNova-Loop-9B-FP8 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 "letechlead/SenseNova-Loop-9B-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "letechlead/SenseNova-Loop-9B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "letechlead/SenseNova-Loop-9B-FP8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "letechlead/SenseNova-Loop-9B-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use letechlead/SenseNova-Loop-9B-FP8 with Docker Model Runner:
docker model run hf.co/letechlead/SenseNova-Loop-9B-FP8
SenseNova-Loop-9B-FP8
Block-wise FP8 weight quantization of sensenova/SenseNova-Loop-9B,
the 9B-parameter looped multimodal decoder (32 physical layers executed as 56 layer passes, two-stream mHC,
hybrid linear/full attention). The checkpoint layout matches the official Qwen FP8 releases
(quant_method: fp8, block-wise weight_scale_inv).
Quantization recipe
- Weights: FP8
e4m3fn, one BF16 scale per 128x128 block (<name>.weight_scale_inv, shape[ceil(out/128), ceil(in/128)]), per-block absmax scaling. Weight-only, no calibration data. quantization_config:quant_method: fp8,fmt: e4m3,weight_block_size: [128, 128],activation_scheme: dynamic— same schema asQwen/Qwen3-32B-FP8.- Quantized to FP8:
- Decoder full-attention
q/k/v/o_proj - Gated-DeltaNet linear-attention
in_proj_qkv/zandout_proj - MLP
gate/up/down_proj - Vision blocks 3-26 (
attn.qkv,attn.proj,mlp.linear_fc1/2)
- Decoder full-attention
- Kept at original precision:
embed_tokens,lm_head, all norms (BF16)conv1d,A_log,dt_bias(BF16)in_proj_a/in_proj_b(BF16) — these 32-row projections fuse intoin_proj_ba(64 rows) in vLLM; the Marlin block-scale path requires 128-aligned shard boundaries, so they stay BF16 (same practice as official Qwen3-Next-FP8).ignored_layerscovers all 56 execution-layer indices.- mHC routing
mhc_attn/mhc_ffnandloop_gate(FP32, as in the original) - Vision blocks 0-2, merger, patch_embed, pos_embed (BF16) — same ignore policy as official
Qwen3-VL-*-FP8
- Size: 18.83 GB (BF16) -> 11.56 GB (-38.6%).
Verification
BF16-vs-dequantized-FP8 parity (RTX 4090, transformers 5.18.0 / torch 2.11.0+cu130): mean relative L2 weight error 2.64% (max 2.66%); greedy generation token-identical on math (3/3) and code (160/160) prompts, late divergence with equivalent content on Chinese/reasoning prompts (correct final answers); fixed-input logits cosine 0.9996, top-1 agreement; image-description smoke test passed on both.
Native FP8 serving (single RTX 3090 24 GB, patched vLLM PR #64832, Marlin W8A16): model weights 10.46 GiB resident, 9.55 GiB KV cache (160k tokens); math/code/Chinese/reasoning prompts all correct and coherent, matching the BF16 reference semantics.
Usage
Native FP8 (vLLM)
Upstream vLLM PR #64832 implements the
architecture but rejects quantized loads. The fork branch
LeTechLead/vllm sensenova-loop-fp8
lifts that guard (one-line change plus the checkpoint's ignore list); with this checkpoint it
serves FP8 W8A16 on a single 24 GB Ampere card:
vllm serve letechlead/SenseNova-Loop-9B-FP8 \
--served-model-name sensenova-loop-9b-fp8 \
--gpu-memory-utilization 0.93 --max-model-len 160000
CUDA graphs are on by default at this version; do not pass --enforce-eager unless debugging —
it costs ~2.7× decode throughput on this looped architecture.
Measured on one RTX 3090 (24 GB), Marlin W8A16, graphs on, pp 4,096 / tg 512, 3 runs per depth:
| depth | prefill t/s | decode t/s | TTFT s |
|---|---|---|---|
| 0 | 2,251.9 ± 5.2 | 43.11 ± 0.05 | 1.82 |
| 8,192 | 2,211.9 ± 3.6 | 41.84 ± 0.02 | 5.56 |
| 32,768 | 2,010.0 ± 3.5 | 38.86 ± 0.11 | 18.34 |
| 65,536 | 1,765.0 ± 9.0 | 33.93 ± 0.20 | 39.46 |
| 131,072 | 1,460.0 ± 2.6 | 25.04 ± 0.22 | 92.59 |
KV pool at 0.93 util: 10.08 GiB / 184,258 tokens (1.15× concurrency at 160k). Needle-in-a-haystack at 159,119 tokens: recovered from both the 50% and 95% positions. Decode scales with concurrency: 42.7 / 74.8 / 114.5 / 158.4 aggregate t/s at 1 / 2 / 4 / 8 requests.
On FP8-capable GPUs (sm89+) the same file uses native FP8 kernels. Build the fork from source
(torch 2.14.0+cu130, MAX_JOBS=$(nproc) TORCH_CUDA_ARCH_LIST=8.6 pip install -e . --no-build-isolation).
Transformers
The custom modeling code loads BF16; dequantize at load time with the verified helper shipped in this repo:
hf download letechlead/SenseNova-Loop-9B-FP8 --local-dir SenseNova-Loop-9B-FP8
python dequant_to_bf16.py --src SenseNova-Loop-9B-FP8 --dst SenseNova-Loop-9B-FP8-bf16
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "SenseNova-Loop-9B-FP8-bf16"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id, trust_remote_code=True,
dtype=torch.bfloat16, device_map={"": "cuda:0"}).eval()
For native BF16 or 4-bit deployment use the upstream releases: sensenova/SenseNova-Loop-9B and the official AWQ variant.
License
Apache-2.0, inherited from the original model. Original weights (c) SenseNova; quantization by LeTechLead.
- Downloads last month
- 266
Model tree for letechlead/SenseNova-Loop-9B-FP8
Base model
sensenova/SenseNova-Loop-9B