Run SenseNova-Loop-9B-Preview, a Looped Multimodal Model
A 9B model that runs a block of its layers twice with shared weights. How to load it with Transformers and serve it with LightLLM, SGLang or vLLM.
The code in this post comes from the model's docs and hasn't been run in our CI yet. If something breaks, let us know.
SenseNova-Loop-9B-Preview is a multimodal language model from SenseNova, released on 2026-10-30 and licensed Apache 2.0. It accepts text and images and produces text, and the card positions it for long-context and agentic workflows, including document understanding, coding and tool use. What makes it notable is its design: a block of decoder layers is run twice with the same weights, so the model does more computation per token than its stored weights would suggest.
The card labels this a Preview release. Its technical report is listed as TBD, and the Transformers implementation relies on custom code.
Key specs
| Property | Value from the card |
|---|---|
| Input / output | Text and images in, text out |
| Parameters | ~9B backbone; ~14.6B inference parameters |
| Distinct decoder layers | 32 |
| Looped block | layers 4 to 27 ([4, 28)), run 2 times with shared weights |
| Layer executions per forward pass | 56 |
| Attention | Repeating group of three linear-attention layers then one full-attention layer |
| Hidden dimension / FFN dimension | 4,096 / 12,288 |
| Vocabulary size | 248,320 |
| Training context | Up to 262,144 tokens |
| Export precision | BF16 backbone; FP32 mHC routing parameters |
| License | Apache 2.0 |
The loop is written as B(B(h)): the repeated block B is applied to its own output. The model also uses two-stream manifold-constrained hyper-connections (mHC), where learned mappings route information across two residual streams in the looped section. The card says an inference implementation must load these parameters and reproduce the same execution order, which is why the card ships custom code and points to specific inference builds (see Gotchas).
The card also lists MTP as an available inference-acceleration method. Dspark and Dflash2 are listed as still in training.
Install
The card’s checked environment is Transformers 5.18.0 and PyTorch 2.11.0 with CUDA 13.0. Install a PyTorch build that matches your CUDA setup first, then:
python -m pip install "transformers==5.18.0" accelerate safetensorsRun it
This is the card’s single-GPU text generation example. trust_remote_code=True loads the custom SenseNova Loop model code from the repository.
import torchfrom transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "sensenova/SenseNova-Loop-9B-Preview"device = "cuda:0"
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={"": device},).eval()
messages = [{"role": "user", "content": "What is 13 times 7? Reply with the number only."}]prompt = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, enable_thinking=False,)inputs = tokenizer(prompt, return_tensors="pt").to(device)
with torch.inference_mode(): outputs = model.generate( **inputs, max_new_tokens=256, do_sample=False, use_cache=True, )
response = tokenizer.decode( outputs[0, inputs.input_ids.shape[1]:], skip_special_tokens=True,)print(response)It uses greedy decoding and up to 256 new tokens. Change device to pick another GPU.
Turn thinking on
The card says to set enable_thinking=True in the chat template to enable thinking mode. The only change to the script above is that argument. Because a thinking response is longer, raise max_new_tokens from the card’s 256; the right value depends on your task, and the card does not give one.
import torchfrom transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "sensenova/SenseNova-Loop-9B-Preview"device = "cuda:0"
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={"": device},).eval()
messages = [{"role": "user", "content": "What is 13 times 7? Reply with the number only."}]prompt = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, enable_thinking=True,)inputs = tokenizer(prompt, return_tensors="pt").to(device)
with torch.inference_mode(): outputs = model.generate( **inputs, max_new_tokens=1024, do_sample=False, use_cache=True, )
print(tokenizer.decode( outputs[0, inputs.input_ids.shape[1]:], skip_special_tokens=True,))Serve it with LightLLM
For an OpenAI-style HTTP endpoint, the card gives a four-GPU LightLLM example. Replace the local model path with your checkpoint directory.
docker pull ghcr.io/modeltc/lightllm:main
docker run --rm --gpus all --ipc=host -p 8000:8000 \ -v /path/to/SenseNova-Loop-9B-Preview:/model \ -e LOADWORKER=4 -e LIGHTLLM_TRITON_AUTOTUNE_LEVEL=1 \ ghcr.io/modeltc/lightllm:main \ python -m lightllm.server.api_server \ --model_dir /model --model_name SenseNova-Loop-9B-Preview \ --tp 4 --host 0.0.0.0 --port 8000Then send a request:
curl http://localhost:8000/v1/chat/completions \ -H 'Content-Type: application/json' \ -d '{"model": "SenseNova-Loop-9B-Preview", "messages": [{"role": "user", "content": "Hello!"}], "max_tokens": 128}'Serve it with vLLM or SGLang
For both, the card points to specific pull requests that contain the SenseNova Loop implementation: vLLM PR #64832 and SGLang PR #47281. For vLLM:
git clone https://github.com/vllm-project/vllm.gitcd vllmgit fetch origin pull/64832/headgit checkout -b sensenova-loop FETCH_HEADpython -m pip install -e .
vllm serve sensenova/SenseNova-Loop-9B-Preview \ --served-model-name sensenova_loop \ --tensor-parallel-size 4 \ --dtype bfloat16For SGLang, the card uses the same pull-request approach and then runs sglang serve --model-path /path/to/SenseNova-Loop-9B-Preview. See the card for the full commands.
Gotchas
- Custom code. The Transformers path needs
trust_remote_code=True. Read the code in the repository before you run it, as with any remote code. - Serving needs patched builds. The card’s vLLM and SGLang instructions check out specific pull requests instead of installing a release.
- Pinned versions. The card’s tested environment is Transformers 5.18.0 and PyTorch 2.11.0 with CUDA 13.0. Other versions are not covered by the card.
- Compute is higher than 9B suggests. The card lists ~14.6B inference parameters, since the looped block runs twice.
- Recommended settings. The card recommends its documented deployment environment and configuration parameters for best performance.
- Preview status. The card lists the technical report as TBD and the Transformers implementation’s publication details as to be announced. Speedup from MTP depends on workload, hardware and serving configuration, and the card gives no figure.
- Benchmarks. The card shows benchmark results only as an image, so this post does not quote scores. Check the chart on the model page.
When to pick it
Pick it if you want to experiment with a looped architecture, or want an Apache-2.0 multimodal model aimed at long-context and agent workflows and you can use a pinned, custom-code setup. It is also a reasonable choice if you have four GPUs for the card’s serving examples.
Skip it if you need a drop-in model that needs no custom code or patched builds, if you need a finished technical report to evaluate, or if you want a production-stable release. The card calls this a Preview, and its vLLM and SGLang instructions rely on specific pull requests.
Related
Self-Host MiMo-V2.6-Pro-RL, Xiaomi's 1T MoE Agent Model
Xiaomi's 1.02T-parameter MoE model has 1M context and omnimodal input, and was trained for agents. Here is how to serve it with vLLM or SGLang.
XiaomiMiMo/MiMo-V2.6-Pro-RL
Inkling 2 Small: 594B MoE, 17B Active, 1M-Token Context
Thinking Machines' Apache-2.0 multimodal MoE: what the card says about hardware, serving options, benchmarks and limits.
thinkingmachines/Inkling-2-Small
Kimi K3.1 Pro: Call Moonshot's 2.8T Open MoE with Reasoning Effort
Kimi K3.1 Pro is an open-weight 2.8T MoE with 1M-token context. What changed from K3, how reasoning_effort works, and how to call it.
moonshotai/Kimi-K3.1-Pro