Instructions to use dad887/DAD-Public-Models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dad887/DAD-Public-Models with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="dad887/DAD-Public-Models")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("dad887/DAD-Public-Models", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dad887/DAD-Public-Models with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dad887/DAD-Public-Models" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dad887/DAD-Public-Models", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dad887/DAD-Public-Models
- SGLang
How to use dad887/DAD-Public-Models 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 "dad887/DAD-Public-Models" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dad887/DAD-Public-Models", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "dad887/DAD-Public-Models" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dad887/DAD-Public-Models", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dad887/DAD-Public-Models with Docker Model Runner:
docker model run hf.co/dad887/DAD-Public-Models
|
Download README.md from dad887/DAD-Public-Models: direct link, hf CLI and curl.
- Browser
- Download file 3.18 kB
-
https://huggingface.co/dad887/DAD-Public-Models/resolve/main/README.md
- Command line
-
hf download hf://dad887/DAD-Public-Models/README.md
-
curl -L -o README.md https://huggingface.co/dad887/DAD-Public-Models/resolve/main/README.md
3.18 kB
| license: cc-by-nc-4.0 | |
| base_model: Qwen/Qwen3-VL-2B-Instruct | |
| library_name: transformers | |
| pipeline_tag: image-text-to-text | |
| inference: false | |
| datasets: | |
| - dad887/DAD-Public-Repro | |
| tags: | |
| - graphic-design | |
| - object-detection | |
| - qwen3-vl | |
| - elerpo | |
| # DAD public-data experiment models | |
| Three models for the public-data experiment in **Detect Anything in Graphic Design: Element-Level Rewards for Autoregressive Detection**. These are public-data experiment models, separate from the DAD checkpoint used in the paper's main experiments. | |
| | Subdirectory | Model | Selected checkpoint | | |
| |---|---|---| | |
| | `sft/` | Supervised fine-tuning | SFT step 5,000 | | |
| | `grpo/` | GRPO starting from the shared SFT checkpoint | RL step 1,000 | | |
| | `elerpo/` | EleRPO starting from the shared SFT checkpoint | RL step 1,000 | | |
| Each subdirectory contains a complete merged Qwen3-VL-2B model, tokenizer, image processor, and chat template. Select a subdirectory when loading; the repository root contains the shared model card and licenses. | |
| ## Use | |
| The [DAD code repository](https://github.com/dad887/DAD) provides data download, inference, and evaluation: | |
| ```bash | |
| pip install -r requirements.txt | |
| python -m inference.predict --variant elerpo --output outputs/elerpo.jsonl | |
| python -m inference.evaluate \ | |
| --annotations public_data/annotations/test.jsonl \ | |
| --predictions outputs/elerpo.jsonl | |
| ``` | |
| For direct loading with Transformers 5.7 or newer: | |
| ```python | |
| from huggingface_hub import snapshot_download | |
| from transformers import AutoProcessor, Qwen3VLForConditionalGeneration | |
| from pathlib import Path | |
| import torch | |
| variant = "elerpo" # also "sft" or "grpo" | |
| root = snapshot_download("dad887/DAD-Public-Models", allow_patterns=[f"{variant}/*"]) | |
| path = Path(root) / variant | |
| processor = AutoProcessor.from_pretrained(path) | |
| model = Qwen3VLForConditionalGeneration.from_pretrained( | |
| path, dtype=torch.bfloat16, device_map="auto" | |
| ) | |
| ``` | |
| The models emit semicolon-separated `x1,y1,x2,y2,type` records, ordered back-to-front. Coordinates are normalized to `[0,1000]`; `t` means text and `v` means visual. The inference code supplies the corresponding image preparation and prompts. | |
| ## Data and scope | |
| The [public experiment dataset](https://huggingface.co/datasets/dad887/DAD-Public-Repro) supplies fixed SFT, RL, and test splits. Its SFT split draws from released DAD, ChartGalaxy, Crello, PrismLayersPro, and LICA examples. See the paper for training parameters and the dataset card for sample counts and source terms. | |
| These models target graphic-design element detection. They can miss, merge, or split elements and are not general-purpose ground-truth annotators. Sampling, inference backends, batching, and library versions can affect predictions. | |
| ## License and attribution | |
| The fine-tuned model releases are provided under [CC BY-NC 4.0](LICENSE). The original [Qwen3-VL-2B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-2B-Instruct) base model is provided by the Qwen Team under Apache 2.0; its terms and attribution are retained in [NOTICE](NOTICE) and [licenses/Apache-2.0.txt](licenses/Apache-2.0.txt). Dataset source licenses are documented separately in the dataset repository. | |