Instructions to use adopd/LocateAnything-3B-text-box-ADOPD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adopd/LocateAnything-3B-text-box-ADOPD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="adopd/LocateAnything-3B-text-box-ADOPD", 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 AutoModel model = AutoModel.from_pretrained("adopd/LocateAnything-3B-text-box-ADOPD", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use adopd/LocateAnything-3B-text-box-ADOPD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adopd/LocateAnything-3B-text-box-ADOPD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "adopd/LocateAnything-3B-text-box-ADOPD", "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/adopd/LocateAnything-3B-text-box-ADOPD
- SGLang
How to use adopd/LocateAnything-3B-text-box-ADOPD 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 "adopd/LocateAnything-3B-text-box-ADOPD" \ --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": "adopd/LocateAnything-3B-text-box-ADOPD", "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 "adopd/LocateAnything-3B-text-box-ADOPD" \ --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": "adopd/LocateAnything-3B-text-box-ADOPD", "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 adopd/LocateAnything-3B-text-box-ADOPD with Docker Model Runner:
docker model run hf.co/adopd/LocateAnything-3B-text-box-ADOPD
LocateAnything-3B Text-Box ADOPD
Thinking with Anchors Project | ADOPD 2026 Paper: Thinking with Anchors: Grounded and Efficient Document Reasoning | ADOPD 2024 Paper | Dataset | Code
Model Overview
- Model developer: Thinking with Anchors project contributors
- Base model: nvidia/LocateAnything-3B
- Model type: vision-language localization model
- Task: grouped document text-region detection (Doc2Box)
- Fine-tuning dataset: adopd/adopd2026
- Input: one document image and a text-localization prompt
- Output: generated LocateAnything box tokens
Description
LocateAnything-3B Text-Box ADOPD is a fine-tuned version of
nvidia/LocateAnything-3B for locating grouped text regions in document images.
The model is trained with one target box per structured OCR group in ADOPD and
generates all detected regions in a single structured response.
The companion ADOPD code maps generated coordinates back to pixel-space boxes and preserves the raw model response for downstream evaluation.
Training Data
This checkpoint is fine-tuned on the ADOPD Doc2Box task. In the ADOPD2026 Parquet release, supervision is stored in:
ocr.grouped_blocks[].bbox_xyxy
Each training target represents one grouped OCR text region. The model does not use OCR transcription as an output target.
Input And Output
The recommended prompt is:
Detect all the text in box format.
The generated response uses LocateAnything normalized coordinate tokens. Use
the companion parser to obtain pixel-space boxes_xyxy; do not interpret the raw
tokens directly as pixels.
Quick Start
1. Install The Companion Code
git clone https://github.com/SichenZhu/ADOPD2026.git
cd ADOPD2026/release_code
python -m pip install -e model_zoo/common
python -m pip install -e model_zoo/locateanything_3b
Inference requires a CUDA-capable NVIDIA GPU. Eagle source and its compatibility overlay are required for fine-tuning, not for loading this self-contained Transformers checkpoint.
2. Download The Checkpoint
hf download adopd/LocateAnything-3B-text-box-ADOPD \
--local-dir checkpoints/locany-text-box
3. Run Inference
adopd-locany-infer \
--checkpoint checkpoints/locany-text-box \
--image document.jpg \
--prompt "Detect all the text in box format." \
--output prediction.json
prediction.json contains the raw generated response and parsed pixel-space
boxes.
Fine-Tuning And Evaluation
Download adopd/adopd2026, then prepare the Doc2Box split with:
adopd-locany-prepare \
--dataset-root DATASET_ROOT \
--output-root PREPARED_ROOT \
--split train \
--task text-box
Training and evaluation commands are documented in
locateanything_3b.
Limitations
This model detects grouped text regions but does not transcribe text. Generated localization can be sensitive to document domain, image resolution, prompt wording, and decoding parameters. Evaluate and calibrate the model on the target domain before deployment.
License
Use is governed by the NVIDIA License included in this repository. The license permits academic and non-profit research use and does not permit commercial use except as stated in the license.
Citation
Please cite the ADOPD 2026 and ADOPD 2024 papers.
@misc{zhu2026thinkingwithanchors,
title={Thinking with Anchors: Grounded and Efficient Document Reasoning},
author={Sichen Zhu and Yuchen Zhu and Wenzhuo Xu and Jason Kuen and Wanrong Zhu and Jing Shi and Xuan Shen and Quanyi Wang and Yiwei Wang and Yujun Cai and Bing Shuai and Qin Zhang and Yongxin Chen and Shilong Liu and Molei Tao and Jiuxiang Gu},
year={2026}
}
@inproceedings{gu2024adopd,
title={{ADOPD}: A Large-Scale Document Page Decomposition Dataset},
author={Jiuxiang Gu and Xiangxi Shi and Jason Kuen and Lu Qi and Ruiyi Zhang and Anqi Liu and Ani Nenkova and Tong Sun},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=x1ptaXpOYa}
}
- Downloads last month
- -