Image-Text-to-Text
Transformers
Safetensors
internvl_chat
feature-extraction
conversational
custom_code
Instructions to use OS-Copilot/OS-Genesis-4B-AC with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OS-Copilot/OS-Genesis-4B-AC with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OS-Copilot/OS-Genesis-4B-AC", trust_remote_code=True, device_map="auto") 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("OS-Copilot/OS-Genesis-4B-AC", trust_remote_code=True, dtype="auto", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OS-Copilot/OS-Genesis-4B-AC with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OS-Copilot/OS-Genesis-4B-AC" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OS-Copilot/OS-Genesis-4B-AC", "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/OS-Copilot/OS-Genesis-4B-AC
- SGLang
How to use OS-Copilot/OS-Genesis-4B-AC 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 "OS-Copilot/OS-Genesis-4B-AC" \ --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": "OS-Copilot/OS-Genesis-4B-AC", "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 "OS-Copilot/OS-Genesis-4B-AC" \ --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": "OS-Copilot/OS-Genesis-4B-AC", "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 OS-Copilot/OS-Genesis-4B-AC with Docker Model Runner:
docker model run hf.co/OS-Copilot/OS-Genesis-4B-AC
Update README.md
Browse files
README.md
CHANGED
|
@@ -146,9 +146,9 @@ print(f'User: {question}\nAssistant: {response}')
|
|
| 146 |
## Citation
|
| 147 |
If you find this repository helpful, feel free to cite our paper:
|
| 148 |
```bibtex
|
| 149 |
-
@article{
|
| 150 |
title={OS-Genesis: Automating GUI Agent Trajectory Construction via Reverse Task Synthesis},
|
| 151 |
-
author={
|
| 152 |
journal={arXiv preprint arXiv:2412.19723},
|
| 153 |
year={2024}
|
| 154 |
}
|
|
|
|
| 146 |
## Citation
|
| 147 |
If you find this repository helpful, feel free to cite our paper:
|
| 148 |
```bibtex
|
| 149 |
+
@article{sun2024genesis,
|
| 150 |
title={OS-Genesis: Automating GUI Agent Trajectory Construction via Reverse Task Synthesis},
|
| 151 |
+
author={Sun, Qiushi and Cheng, Kanzhi and Ding, Zichen and Jin, Chuanyang and Wang, Yian and Xu, Fangzhi and Wu, Zhenyu and Jia, Chengyou and Chen, Liheng and Liu, Zhoumianze and others},
|
| 152 |
journal={arXiv preprint arXiv:2412.19723},
|
| 153 |
year={2024}
|
| 154 |
}
|