Image-Text-to-Text
Transformers
Safetensors
English
qwen2_5_vl
VLM
Computer-Use-Agent
OS-Agent
GUI
Grounding
conversational
custom_code
text-generation-inference
Instructions to use Adocados/GTA1-32B-vllm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Adocados/GTA1-32B-vllm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Adocados/GTA1-32B-vllm", 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Adocados/GTA1-32B-vllm", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("Adocados/GTA1-32B-vllm", 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Adocados/GTA1-32B-vllm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Adocados/GTA1-32B-vllm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Adocados/GTA1-32B-vllm", "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/Adocados/GTA1-32B-vllm
- SGLang
How to use Adocados/GTA1-32B-vllm 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 "Adocados/GTA1-32B-vllm" \ --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": "Adocados/GTA1-32B-vllm", "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 "Adocados/GTA1-32B-vllm" \ --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": "Adocados/GTA1-32B-vllm", "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 Adocados/GTA1-32B-vllm with Docker Model Runner:
docker model run hf.co/Adocados/GTA1-32B-vllm
File size: 1,382 Bytes
272f31d 54e2d90 272f31d 1ce1112 272f31d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | {
"architectures": ["Qwen2_5_VLForConditionalGeneration"],
"model_type": "qwen2_5_vl",
"transformers_version": "4.49.0",
"torch_dtype": "bfloat16",
"processor_class": "OpenCUAProcessor",
"hidden_act": "silu",
"attention_dropout": 0.0,
"initializer_range": 0.02,
"rms_norm_eps": 1e-06,
"tie_word_embeddings": false,
"use_cache": true,
"vocab_size": 152064,
"max_position_embeddings": 128000,
"sliding_window": 32768,
"use_sliding_window": false,
"max_window_layers": 64,
"rope_scaling": { "type": "default" },
"rope_theta": 1000000.0,
"hidden_size": 5120,
"intermediate_size": 27648,
"num_hidden_layers": 64,
"num_attention_heads": 40,
"num_key_value_heads": 8,
"bos_token_id": 151643,
"eos_token_id": 151644,
"pad_token_id": 152063,
"vision_start_token_id": 151665,
"vision_end_token_id": 151666,
"image_token_id": 151667,
"video_token_id": 151668,
"vision_config": {
"model_type": "qwen2_5_vl",
"in_chans": 3,
"hidden_size": 1280,
"intermediate_size": 3456,
"out_hidden_size": 5120,
"spatial_patch_size": 14,
"tokens_per_second": 2,
"torch_dtype": "bfloat16"
},
"auto_map": {
"AutoTokenizer": "tokenization_opencua.TikTokenV3",
"AutoProcessor": "processing_opencua.OpenCUAProcessor",
"AutoImageProcessor": "image_processing_qwen2_vl.Qwen2VLImageProcessor"
}
}
|