Image-Text-to-Text
Transformers
Safetensors
English
Chinese
sensenova_loop
text-generation
nvfp4
modelopt
quantized
multimodal
looped-transformer
mhc
mtp
custom_code
conversational
8-bit precision
Instructions to use gitcommit90/SenseNova-Loop-9B-Preview-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gitcommit90/SenseNova-Loop-9B-Preview-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="gitcommit90/SenseNova-Loop-9B-Preview-NVFP4", 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("gitcommit90/SenseNova-Loop-9B-Preview-NVFP4", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gitcommit90/SenseNova-Loop-9B-Preview-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gitcommit90/SenseNova-Loop-9B-Preview-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gitcommit90/SenseNova-Loop-9B-Preview-NVFP4", "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/gitcommit90/SenseNova-Loop-9B-Preview-NVFP4
- SGLang
How to use gitcommit90/SenseNova-Loop-9B-Preview-NVFP4 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 "gitcommit90/SenseNova-Loop-9B-Preview-NVFP4" \ --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": "gitcommit90/SenseNova-Loop-9B-Preview-NVFP4", "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 "gitcommit90/SenseNova-Loop-9B-Preview-NVFP4" \ --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": "gitcommit90/SenseNova-Loop-9B-Preview-NVFP4", "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 gitcommit90/SenseNova-Loop-9B-Preview-NVFP4 with Docker Model Runner:
docker model run hf.co/gitcommit90/SenseNova-Loop-9B-Preview-NVFP4
NVFP4 (ModelOpt) quantization of sensenova/SenseNova-Loop-9B-Preview @27abea77 with BF16 MTP head
a57aa9f verified Download evaluation/hf_bf16_checks.json from gitcommit90/SenseNova-Loop-9B-Preview-NVFP4: direct link, hf CLI and curl.
- Browser
- Download file 2.68 kB
-
https://huggingface.co/gitcommit90/SenseNova-Loop-9B-Preview-NVFP4/resolve/main/evaluation/hf_bf16_checks.json
- Command line
-
hf download hf://gitcommit90/SenseNova-Loop-9B-Preview-NVFP4/evaluation/hf_bf16_checks.json
-
curl -L -o hf_bf16_checks.json https://huggingface.co/gitcommit90/SenseNova-Loop-9B-Preview-NVFP4/resolve/main/evaluation/hf_bf16_checks.json
2.68 kB
| { | |
| "model_dir": "upstream/SenseNova-Loop-9B-Preview", | |
| "torch": "2.11.0+cu130", | |
| "load_s": 12.2, | |
| "gpu_mem_after_load_GiB": 17.54, | |
| "loop_plan_len": 56, | |
| "mhc_param_count": 96, | |
| "mhc_all_fp32": true, | |
| "layer_param_dtypes": [ | |
| "torch.bfloat16" | |
| ], | |
| "text_mult": { | |
| "prompt_tokens": 27, | |
| "gen_tokens": 3, | |
| "seconds": 1.61, | |
| "text": "91<|im_end|>" | |
| }, | |
| "loop_calls_per_layer": { | |
| "0": 3, | |
| "1": 3, | |
| "2": 3, | |
| "3": 3, | |
| "4": 6, | |
| "5": 6, | |
| "6": 6, | |
| "7": 6, | |
| "8": 6, | |
| "9": 6, | |
| "10": 6, | |
| "11": 6, | |
| "12": 6, | |
| "13": 6, | |
| "14": 6, | |
| "15": 6, | |
| "16": 6, | |
| "17": 6, | |
| "18": 6, | |
| "19": 6, | |
| "20": 6, | |
| "21": 6, | |
| "22": 6, | |
| "23": 6, | |
| "24": 6, | |
| "25": 6, | |
| "26": 6, | |
| "27": 6, | |
| "28": 3, | |
| "29": 3, | |
| "30": 3, | |
| "31": 3 | |
| }, | |
| "looped_layers_called_twice": true, | |
| "text_haiku": { | |
| "prompt_tokens": 21, | |
| "gen_tokens": 20, | |
| "seconds": 5.08, | |
| "text": "Green sphere, white seam,\nBounces high in summer sun,\nA game begins.<|im_end|>" | |
| }, | |
| "thinking": { | |
| "prompt_tokens": 32, | |
| "gen_tokens": 262, | |
| "seconds": 66.44, | |
| "text": "The train goes 60 km in 45 minutes.\n\nTo find the speed in km/h, I need to convert 45 minutes to hours.\n\n45 minutes = 45/60 hours = 3/4 hours\n\nSpeed = Distance / Time = 60 km / (3/4 hours) = 60 × 4/3 = 80 km/h\n</think>\n\n# Finding the Train's Speed\n\n## Given Information\n- Distance = 60 km\n- Time = 45 minutes\n\n## Solution\n\n**Step 1:** Convert time to hours.\n\n$$45 \\text{ minutes} = \\frac{45}{60} \\text{ hours} = \\frac{3}{4} \\text{ hours}$$\n\n**Step 2:** Use the speed formula.\n\n$$\\text{Speed} = \\frac{\\text{Distance}}{\\text{Time}} = \\frac{60 \\text{ km}}{\\frac{3}{4} \\text{ hr}}$$\n\n**Step 3:** Calculate.\n\n$$\\text{Speed} = 60 \\times \\frac{4}{3} = \\boxed{80 \\text{ km/h}}$$<|im_end|>" | |
| }, | |
| "tool_call": { | |
| "prompt_tokens": 300, | |
| "gen_tokens": 39, | |
| "seconds": 10.13, | |
| "text": "<tool_call>\n<function=get_weather>\n<parameter=city>\nParis\n</parameter>\n<parameter=unit>\ncelsius\n</parameter>\n</function>\n</tool_call><|im_end|>", | |
| "has_tool_call_xml": true | |
| }, | |
| "image": { | |
| "prompt_tokens": 1013, | |
| "gen_tokens": 61, | |
| "seconds": 17.08, | |
| "text": "A yellow mobile tyre fitting service van, branded with \"ATS\" and \"Euromaster\" logos, is driving on a road with a driver visible inside wearing a blue shirt. Behind it, a white van with a red warning light on top and a dark car are also present on the road.<|im_end|>" | |
| }, | |
| "cache_consistency": { | |
| "n": 64, | |
| "match": 64, | |
| "first_mismatch": null, | |
| "finite_logits": true | |
| }, | |
| "peak_gpu_mem_GiB": 17.98 | |
| } |