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) 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-Genesis-4B-AC", trust_remote_code=True, 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
Commit History
-
Update license to MIT
Verified signatureThis PR updates the license in the model card from `apache-2.0` to `mit`. The `MIT` license is indicated as the authoritative license in the project's GitHub README, ensuring the accuracy of the model card's metadata.e72894b
-
Update README.md
Verified signaturec73c725
-
Update README.md
Verified signatureeaf85ee
-
Update README.md
Verified signature498fe20 -
Update README.md
Verified signature5d7b271
-
Upload 16 files
Verified signature4bde4fb
-
Upload tokenizer_config.json with huggingface_hub
Verified signature93bbcaa -
Upload special_tokens_map.json with huggingface_hub
Verified signature6d27fed -
Upload modeling_phi3.py with huggingface_hub
Verified signature17b4116 -
Upload modeling_internvl_chat.py with huggingface_hub
Verified signatureca9ccbc -
Upload modeling_intern_vit.py with huggingface_hub
Verified signature935bb3c -
Upload model.safetensors.index.json with huggingface_hub
Verified signaturef8fee52
-
Update README.md
Verified signature8259775 -
Upload generation_config.json with huggingface_hub
Verified signature7629195 -
Upload conversation.py with huggingface_hub
Verified signature02ab7ce -
Upload configuration_phi3.py with huggingface_hub
Verified signaturef0342bd -
Upload configuration_internvl_chat.py with huggingface_hub
Verified signatureb48a83c -
Upload configuration_intern_vit.py with huggingface_hub
Verified signatureab8cbc0 -
Upload config.json with huggingface_hub
Verified signaturefd48549 -
Upload added_tokens.json with huggingface_hub
Verified signature34a18e7 -
initial commit
Verified signaturec401500