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
Remove training sequence length caveat
Browse files- README.md +0 -2
- README_CN.md +0 -2
README.md
CHANGED
|
@@ -81,8 +81,6 @@ Documented training recipes combine long sequences, multimodal inputs, and super
|
|
| 81 |
| Training context | Up to 262,144 tokens |
|
| 82 |
| Existing export precision | BF16 backbone; FP32 mHC routing parameters |
|
| 83 |
|
| 84 |
-
Training sequence length is a configuration, not a guarantee of inference support or performance at every length.
|
| 85 |
-
|
| 86 |
## Model Architecture
|
| 87 |
|
| 88 |
SenseNova-6.8-Loop-9B-Preview combines a 32-layer multimodal decoder with a repeated middle block. The figure illustrates the order of computation; the detailed operations inside each layer and the vision encoder are omitted.
|
|
|
|
| 81 |
| Training context | Up to 262,144 tokens |
|
| 82 |
| Existing export precision | BF16 backbone; FP32 mHC routing parameters |
|
| 83 |
|
|
|
|
|
|
|
| 84 |
## Model Architecture
|
| 85 |
|
| 86 |
SenseNova-6.8-Loop-9B-Preview combines a 32-layer multimodal decoder with a repeated middle block. The figure illustrates the order of computation; the detailed operations inside each layer and the vision encoder are omitted.
|
README_CN.md
CHANGED
|
@@ -81,8 +81,6 @@ tags:
|
|
| 81 |
| 训练上下文长度 | 最长 262,144 个 token |
|
| 82 |
| 现有导出精度 | 主干为 BF16;mHC 路由参数为 FP32 |
|
| 83 |
|
| 84 |
-
训练序列长度属于训练配置,并不代表推理实现支持所有对应长度,也不构成各长度下的性能保证。
|
| 85 |
-
|
| 86 |
## 模型架构
|
| 87 |
|
| 88 |
SenseNova-6.8-Loop-9B-Preview 采用 32 层多模态解码器,其中的中间层模块会重复执行。下图展示了计算顺序,省略了各层内部操作和视觉编码器的细节。
|
|
|
|
| 81 |
| 训练上下文长度 | 最长 262,144 个 token |
|
| 82 |
| 现有导出精度 | 主干为 BF16;mHC 路由参数为 FP32 |
|
| 83 |
|
|
|
|
|
|
|
| 84 |
## 模型架构
|
| 85 |
|
| 86 |
SenseNova-6.8-Loop-9B-Preview 采用 32 层多模态解码器,其中的中间层模块会重复执行。下图展示了计算顺序,省略了各层内部操作和视觉编码器的细节。
|