Image-Text-to-Text
Transformers
Safetensors
florence2
GUI
VLM
GUI-Grounding
visual-grounding
custom_code
Instructions to use lumimate/PhoneUIAnchor-829M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lumimate/PhoneUIAnchor-829M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="lumimate/PhoneUIAnchor-829M", trust_remote_code=True)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("lumimate/PhoneUIAnchor-829M", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("lumimate/PhoneUIAnchor-829M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lumimate/PhoneUIAnchor-829M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lumimate/PhoneUIAnchor-829M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lumimate/PhoneUIAnchor-829M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lumimate/PhoneUIAnchor-829M
- SGLang
How to use lumimate/PhoneUIAnchor-829M 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 "lumimate/PhoneUIAnchor-829M" \ --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": "lumimate/PhoneUIAnchor-829M", "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 "lumimate/PhoneUIAnchor-829M" \ --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": "lumimate/PhoneUIAnchor-829M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use lumimate/PhoneUIAnchor-829M with Docker Model Runner:
docker model run hf.co/lumimate/PhoneUIAnchor-829M
Hugging Face 发布步骤
本目录可以直接作为 Hugging Face 模型仓库上传。
pip install -U huggingface_hub
hf auth login
proxychains -q hf repos create PhoneUIAnchor-829M --repo-type model
proxychains -q hf upload lumimate/PhoneUIAnchor-829M . --repo-type model \
--exclude '.cache/**' --exclude '__pycache__/**'
上传后运行在线模型测试:
python inference_example.py \
--model lumimate/PhoneUIAnchor-829M \
--image /path/to/ui_screenshot.png \
--prompt 'Where is the "Settings" element? (Output the center coordinates of the target)'
模型包含 Florence-2 自定义源码,调用方必须使用
trust_remote_code=True。