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
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)# pip install -U transformers accelerate # 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
Fix Chinese emphasis rendering in the model overview
#12
by Skywalker0410 - opened
- README.md +1 -1
- checksums.sha256 +1 -1
README.md
CHANGED
|
@@ -354,7 +354,7 @@ Grounding predictions can miss small or occluded objects, repeat instances, or p
|
|
| 354 |
|
| 355 |
自回归(AR)视觉定位模型将空间预测串行化,带来顺序生成的延迟,并为输出 token 施加因果顺序。我们将视觉定位视为视觉证据提取:物体、位置和空间关系共同受到图像与查询的约束,但它们之间的依赖关系并不意味着生成过程必须从左到右进行。这一区别使双向扩散成为自然的选择,让空间假设能够并行产生,并通过迭代去噪共同细化。
|
| 356 |
|
| 357 |
-
我们提出
|
| 358 |
|
| 359 |
在论文报告的运行配置下,可选的**自推测模式**相较自回归版本实现了 **4.51× 加速**,同时 **COCO F1mIoU 下降 0.74 个百分点**。基础设施实验表明,逐步优化推理实现能够将并行解码转化为实际加速,为对延迟敏感的实际系统提供高效的视觉定位能力。
|
| 360 |
|
|
|
|
| 354 |
|
| 355 |
自回归(AR)视觉定位模型将空间预测串行化,带来顺序生成的延迟,并为输出 token 施加因果顺序。我们将视觉定位视为视觉证据提取:物体、位置和空间关系共同受到图像与查询的约束,但它们之间的依赖关系并不意味着生成过程必须从左到右进行。这一区别使双向扩散成为自然的选择,让空间假设能够并行产生,并通过迭代去噪共同细化。
|
| 356 |
|
| 357 |
+
我们提出 <strong>GroundAnything</strong>,一个拥有 4B 参数的视觉定位基础模型,通过分块去噪兼顾快速并行解码与精确定位。在 30 个视觉定位基准上,自回归版本 <strong>GroundAnything-VLM</strong> 以 <strong>72.42%</strong> 的综合表现刷新了同等规模模型的最佳水平,并与 GPT-6 Astra(<strong>71.35%</strong>)保持竞争力。采用<strong>熵引导解码</strong>的 GroundAnything 同样超越了这一规模下此前的最佳水平,平均达到 <strong>61.75%</strong>,高于基于 MTP 的快速模型 LocateAnything 的 <strong>53.32%</strong>。
|
| 358 |
|
| 359 |
在论文报告的运行配置下,可选的**自推测模式**相较自回归版本实现了 **4.51× 加速**,同时 **COCO F1mIoU 下降 0.74 个百分点**。基础设施实验表明,逐步优化推理实现能够将并行解码转化为实际加速,为对延迟敏感的实际系统提供高效的视觉定位能力。
|
| 360 |
|
checksums.sha256
CHANGED
|
@@ -24,5 +24,5 @@ cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE-Apache
|
|
| 24 |
cddaec9f528f9ebf5ac627850eefcb3f14ee55e168776a1b650f91353ce8293e assets/demo.mp4
|
| 25 |
3c282238bb1598093c078e57dcc1db4b3ce8fb1f39db6c09ca90e0686f1043a2 assets/demo-poster.jpg
|
| 26 |
e0f0bbfa420324807403cfffe5ce664a33675c4e569de71b82cac7fb3b750f3e assets/fig1-teaser.png
|
| 27 |
-
|
| 28 |
5ef0abc7d34eca644c1cdac26dd9a3b9c0204f03137827c6475afa2648420304 assets/modelscope-logo.svg
|
|
|
|
| 24 |
cddaec9f528f9ebf5ac627850eefcb3f14ee55e168776a1b650f91353ce8293e assets/demo.mp4
|
| 25 |
3c282238bb1598093c078e57dcc1db4b3ce8fb1f39db6c09ca90e0686f1043a2 assets/demo-poster.jpg
|
| 26 |
e0f0bbfa420324807403cfffe5ce664a33675c4e569de71b82cac7fb3b750f3e assets/fig1-teaser.png
|
| 27 |
+
989680a3f197ead245642d692ec23c86d0fdccff842b1b1f830b3869d05c9f75 README.md
|
| 28 |
5ef0abc7d34eca644c1cdac26dd9a3b9c0204f03137827c6475afa2648420304 assets/modelscope-logo.svg
|