Image-Text-to-Text
Transformers
Safetensors
English
Chinese
qwen3_5
code-video
video-generation
agent
claude-code
qwen3.8
conversational
Instructions to use sensenova/SenseNova-6.8-Code2Video with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sensenova/SenseNova-6.8-Code2Video with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="sensenova/SenseNova-6.8-Code2Video") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("sensenova/SenseNova-6.8-Code2Video") model = AutoModelForMultimodalLM.from_pretrained("sensenova/SenseNova-6.8-Code2Video", device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sensenova/SenseNova-6.8-Code2Video with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sensenova/SenseNova-6.8-Code2Video" # 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-6.8-Code2Video", "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-6.8-Code2Video
- SGLang
How to use sensenova/SenseNova-6.8-Code2Video 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-6.8-Code2Video" \ --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-6.8-Code2Video", "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-6.8-Code2Video" \ --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-6.8-Code2Video", "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-6.8-Code2Video with Docker Model Runner:
docker model run hf.co/sensenova/SenseNova-6.8-Code2Video
docs: add Docker deployment examples for LightLLM, vLLM and SGLang (#1)
Browse files- docs: add Docker deployment examples for LightLLM, vLLM and SGLang (e333506667744c4856916d2a38dfccdb75e2bb73)
Co-authored-by: baishihao <baishihao@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -42,12 +42,50 @@ We believe code can become a common language between ideas and finished work. Ou
|
|
| 42 |
|
| 43 |
## Deployment
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
```bash
|
| 46 |
-
|
| 47 |
-
-
|
| 48 |
-
--
|
| 49 |
-
|
| 50 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
```
|
| 52 |
|
| 53 |
## Recommended harness: Claude Code
|
|
|
|
| 42 |
|
| 43 |
## Deployment
|
| 44 |
|
| 45 |
+
|
| 46 |
+
### [LightLLM](https://github.com/ModelTC/LightLLM)
|
| 47 |
+
|
| 48 |
+
```bash
|
| 49 |
+
docker run --rm --gpus all --ipc=host -p 8000:8000 \
|
| 50 |
+
-v /path/to/SenseNova-6.8-Code2Video:/model \
|
| 51 |
+
ghcr.io/modeltc/lightllm:main \
|
| 52 |
+
python -m lightllm.server.api_server \
|
| 53 |
+
--model_dir /model \
|
| 54 |
+
--tp 4 \
|
| 55 |
+
--max_req_total_len 524288 \
|
| 56 |
+
--host 0.0.0.0 --port 8000
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
### [vLLM](https://github.com/vllm-project/vllm)
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
docker run --rm --gpus all --ipc=host -p 8000:8000 \
|
| 63 |
+
-e VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 \
|
| 64 |
+
-v /path/to/SenseNova-6.8-Code2Video:/model \
|
| 65 |
+
vllm/vllm-openai:latest \
|
| 66 |
+
--model /model \
|
| 67 |
+
--tensor-parallel-size 4 \
|
| 68 |
+
--max-model-len 524288 \
|
| 69 |
+
--reasoning-parser qwen3 \
|
| 70 |
+
--enable-auto-tool-choice \
|
| 71 |
+
--tool-call-parser qwen3_coder \
|
| 72 |
+
--host 0.0.0.0 --port 8000
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
### [SGLang](https://github.com/sgl-project/sglang)
|
| 76 |
+
|
| 77 |
```bash
|
| 78 |
+
docker run --rm --gpus all --ipc=host -p 8000:8000 \
|
| 79 |
+
-e SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 \
|
| 80 |
+
-v /path/to/SenseNova-6.8-Code2Video:/model \
|
| 81 |
+
lmsysorg/sglang:latest \
|
| 82 |
+
python -m sglang.launch_server \
|
| 83 |
+
--model-path /model \
|
| 84 |
+
--tp-size 4 \
|
| 85 |
+
--context-length 524288 \
|
| 86 |
+
--reasoning-parser qwen3 \
|
| 87 |
+
--tool-call-parser qwen3_coder \
|
| 88 |
+
--host 0.0.0.0 --port 8000
|
| 89 |
```
|
| 90 |
|
| 91 |
## Recommended harness: Claude Code
|