Image-Text-to-Text
Transformers
Safetensors
internvl_chat
feature-extraction
conversational
custom_code
Instructions to use OS-Copilot/OS-Atlas-Base-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OS-Copilot/OS-Atlas-Base-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="OS-Copilot/OS-Atlas-Base-4B", 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 AutoModel model = AutoModel.from_pretrained("OS-Copilot/OS-Atlas-Base-4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use OS-Copilot/OS-Atlas-Base-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OS-Copilot/OS-Atlas-Base-4B" # 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-Atlas-Base-4B", "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-Atlas-Base-4B
- SGLang
How to use OS-Copilot/OS-Atlas-Base-4B 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-Atlas-Base-4B" \ --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-Atlas-Base-4B", "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-Atlas-Base-4B" \ --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-Atlas-Base-4B", "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-Atlas-Base-4B with Docker Model Runner:
docker model run hf.co/OS-Copilot/OS-Atlas-Base-4B
Commit History
-
Add model card
Verified signatureThis PR updates the metadata and links the model to https://huggingface.co/papers/2410.23218.8ec2bc6
-
Upload tokenizer_config.json with huggingface_hub
Verified signaturefffaae7 -
Upload tokenizer.model with huggingface_hub
Verified signatured6d795c -
Upload special_tokens_map.json with huggingface_hub
Verified signature850a78a -
Upload modeling_phi3.py with huggingface_hub
Verified signaturec7094eb -
Upload modeling_internvl_chat.py with huggingface_hub
Verified signatureaab9828 -
Upload modeling_intern_vit.py with huggingface_hub
Verified signature3a24881 -
Upload model.safetensors.index.json with huggingface_hub
Verified signature0d848f5 -
Upload model-00002-of-00002.safetensors with huggingface_hub
Verified signature3326dee -
Upload model-00001-of-00002.safetensors with huggingface_hub
Verified signaturea36cda3 -
Upload generation_config.json with huggingface_hub
Verified signature59cef14 -
Upload conversation.py with huggingface_hub
Verified signatureaaed044 -
Upload configuration_phi3.py with huggingface_hub
Verified signature7b1b0ca -
Upload configuration_internvl_chat.py with huggingface_hub
Verified signatureca550f2 -
Upload configuration_intern_vit.py with huggingface_hub
Verified signature381a9ff -
Upload config.json with huggingface_hub
Verified signature698a175 -
Upload added_tokens.json with huggingface_hub
Verified signature0c94b66 -
initial commit
Verified signature5a57bd8