Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

GroundingPI
/
GroundAnything

Image-Text-to-Text
Transformers
Safetensors
English
Chinese
groundinganything
text-generation
visual-grounding
object-detection
referring-expression-comprehension
pointing
ocr
document-layout
custom-code
diffusion-language-model
conversational
custom_code
Model card Files Files and versions
xet
Community
3

Instructions to use GroundingPI/GroundAnything with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use GroundingPI/GroundAnything with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-text-to-text", model="GroundingPI/GroundAnything", 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)
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("GroundingPI/GroundAnything", trust_remote_code=True, device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use GroundingPI/GroundAnything with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "GroundingPI/GroundAnything"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "GroundingPI/GroundAnything",
    		"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/GroundingPI/GroundAnything
  • SGLang

    How to use GroundingPI/GroundAnything 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 "GroundingPI/GroundAnything" \
        --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": "GroundingPI/GroundAnything",
    		"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 "GroundingPI/GroundAnything" \
            --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": "GroundingPI/GroundAnything",
    		"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 GroundingPI/GroundAnything with Docker Model Runner:

    docker model run hf.co/GroundingPI/GroundAnything
GroundAnything / assets
39.8 MB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 1 commit
GroundingPI's picture
GroundingPI
Skywalker0410's picture
Skywalker0410
Publish model weights, paper figures, and complete model card (#1)
37f388f about 4 hours ago
  • decoding.mp4
    8.08 MB
    xet
    Publish model weights, paper figures, and complete model card (#1) about 4 hours ago
  • demo-poster.jpg
    217 kB
    xet
    Publish model weights, paper figures, and complete model card (#1) about 4 hours ago
  • demo.mp4
    23 MB
    xet
    Publish model weights, paper figures, and complete model card (#1) about 4 hours ago
  • fig1-teaser.png
    6.24 MB
    xet
    Publish model weights, paper figures, and complete model card (#1) about 4 hours ago
  • fig2-architecture.png
    413 kB
    xet
    Publish model weights, paper figures, and complete model card (#1) about 4 hours ago
  • fig4-attention-mask.png
    372 kB
    xet
    Publish model weights, paper figures, and complete model card (#1) about 4 hours ago
  • fig6-self-speculative-decoding.png
    281 kB
    xet
    Publish model weights, paper figures, and complete model card (#1) about 4 hours ago
  • fig7-grounding-performance.png
    819 kB
    xet
    Publish model weights, paper figures, and complete model card (#1) about 4 hours ago
  • logo.png
    416 kB
    xet
    Publish model weights, paper figures, and complete model card (#1) about 4 hours ago