Instructions to use ServiceNow/GroundNext-7B-V0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ServiceNow/GroundNext-7B-V0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ServiceNow/GroundNext-7B-V0") 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)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("ServiceNow/GroundNext-7B-V0") model = AutoModelForImageTextToText.from_pretrained("ServiceNow/GroundNext-7B-V0") 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ServiceNow/GroundNext-7B-V0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ServiceNow/GroundNext-7B-V0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ServiceNow/GroundNext-7B-V0", "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/ServiceNow/GroundNext-7B-V0
- SGLang
How to use ServiceNow/GroundNext-7B-V0 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 "ServiceNow/GroundNext-7B-V0" \ --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": "ServiceNow/GroundNext-7B-V0", "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 "ServiceNow/GroundNext-7B-V0" \ --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": "ServiceNow/GroundNext-7B-V0", "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 ServiceNow/GroundNext-7B-V0 with Docker Model Runner:
docker model run hf.co/ServiceNow/GroundNext-7B-V0
fix: add factor=28 to smart_resize in prepare_image for Qwen VL models
Ensure proper image resizing for Qwen VL models by passing factor=28 to smart_resize.
https://github.com/QwenLM/Qwen3-VL/blob/main/qwen-vl-utils/src/qwen_vl_utils/vision_process.py
have we benchmarked this against IBM docling?
have we benchmarked this against IBM docling?
Good question! I haven't benchmarked this against IBM docling yet.
This PR specifically fixes the image preprocessing for Qwen VL models to match their official implementation (factor=28 in smart_resize). It's more of a bug fix than a new feature.
A full benchmark comparison would require significant resources and standardized test datasets. If the community is interested, maybe we could collaborate on this? Otherwise, the Qwen team's own benchmarks might already include comparisons with other document understanding models.
Yes, we can use an ensemble approach where the higher quality model is picked up at runtime instead of one vs other. Of course this would increase latency and processing need. But we will have a second opinion on the output of the primary model.