Image-Text-to-Text
Transformers
Safetensors
English
Chinese
sensenova_loop
text-generation
multimodal
looped-transformer
mhc
custom_code
conversational
Instructions to use sensenova/SenseNova-Loop-9B-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sensenova/SenseNova-Loop-9B-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="sensenova/SenseNova-Loop-9B-Preview", 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("sensenova/SenseNova-Loop-9B-Preview", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sensenova/SenseNova-Loop-9B-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sensenova/SenseNova-Loop-9B-Preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sensenova/SenseNova-Loop-9B-Preview", "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/sensenova/SenseNova-Loop-9B-Preview
- SGLang
How to use sensenova/SenseNova-Loop-9B-Preview 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 "sensenova/SenseNova-Loop-9B-Preview" \ --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": "sensenova/SenseNova-Loop-9B-Preview", "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 "sensenova/SenseNova-Loop-9B-Preview" \ --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": "sensenova/SenseNova-Loop-9B-Preview", "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 sensenova/SenseNova-Loop-9B-Preview with Docker Model Runner:
docker model run hf.co/sensenova/SenseNova-Loop-9B-Preview
Replace architecture figure with an introductory overview
Browse files- README.md +1 -5
- README_CN.md +1 -5
README.md
CHANGED
|
@@ -83,11 +83,7 @@ Documented training recipes combine long sequences, multimodal inputs, and super
|
|
| 83 |
|
| 84 |
## Model Architecture
|
| 85 |
|
| 86 |
-
SenseNova-6.8-Loop-9B-Preview
|
| 87 |
-
|
| 88 |
-

|
| 89 |
-
|
| 90 |
-
*Figure 1. Decoder execution order. Layer indices are zero-based; the two passes share block weights.*
|
| 91 |
|
| 92 |
### Looped decoder
|
| 93 |
|
|
|
|
| 83 |
|
| 84 |
## Model Architecture
|
| 85 |
|
| 86 |
+
SenseNova-6.8-Loop-9B-Preview builds on a 32-layer multimodal decoder that combines shared-weight looped computation, hybrid attention, and two-stream manifold-constrained hyper-connections (mHC). The following sections describe how these components extend the computation path and manage information flow through the model.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
### Looped decoder
|
| 89 |
|
README_CN.md
CHANGED
|
@@ -83,11 +83,7 @@ tags:
|
|
| 83 |
|
| 84 |
## 模型架构
|
| 85 |
|
| 86 |
-
SenseNova-6.8-Loop-9B-Preview
|
| 87 |
-
|
| 88 |
-

|
| 89 |
-
|
| 90 |
-
*图 1:解码器的执行顺序。层编号从 0 开始,两次循环执行共享模块权重。*
|
| 91 |
|
| 92 |
### 循环解码器
|
| 93 |
|
|
|
|
| 83 |
|
| 84 |
## 模型架构
|
| 85 |
|
| 86 |
+
SenseNova-6.8-Loop-9B-Preview 以 32 层多模态解码器为基础,结合共享权重的循环计算、混合注意力与双流流形约束超连接(mHC)。下文将分别介绍这些组件如何拓展模型的计算路径,并组织模型内部的信息流动。
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
### 循环解码器
|
| 89 |
|