Image-Text-to-Text
Transformers
ONNX
Safetensors
gemma3omni
feature-extraction
conversational
custom_code
Instructions to use jva96160/go with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jva96160/go with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="jva96160/go", 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("jva96160/go", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jva96160/go with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jva96160/go" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jva96160/go", "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/jva96160/go
- SGLang
How to use jva96160/go 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 "jva96160/go" \ --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": "jva96160/go", "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 "jva96160/go" \ --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": "jva96160/go", "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 jva96160/go with Docker Model Runner:
docker model run hf.co/jva96160/go
Download chat_template.json from jva96160/go: direct link, hf CLI and curl.
- Browser
- Download file 2.22 kB
-
https://huggingface.co/jva96160/go/resolve/main/chat_template.json
- Command line
-
hf download hf://jva96160/go/chat_template.json
-
curl -L -o chat_template.json https://huggingface.co/jva96160/go/resolve/main/chat_template.json
2.22 kB
| {"chat_template": "{{ bos_token }}\n{%- if tools %}\n {% set tools_json = tools %}\n You have access to the following tools:\n {% for tool in tools_json %}\n > Tool Name: {{ tool.name }}\n Tool Description: {{ tool.description }}\n Tool Args:\n {% if tool.parameters.properties %}\n {% for prop_name, prop_data in tool.parameters.properties.items() %}\n - {{ prop_name }} ({{ prop_data.type }}, {% if prop_name in tool.parameters.required %}required{% else %}optional{% endif %}): {{ prop_data.description }}\n {% endfor %}\n {% else %}\n {% endif %}\n\n {% endfor %}, where each item should be object\n Use the following format if using a tool:\n ```\n Action: tool name (one of [{{ tools_json | map(attribute='name') | join(', ') }}])\n Action Input: the input to the tool, in a JSON format representing the kwargs (e.g. ```{\"input\": \"hello world\", \"num_beams\": 5}```)\n ```\n {{'\n'}}\n{%- endif -%}\n\n\n{%- for message in messages -%}\n {%- if message['from'] == \"human\" -%}\n {%- if message['value'] is string -%}\n {{'<start_of_turn>user\n' + message['value'] + '<end_of_turn>\n'}}\n {%- elif message['value'] is iterable -%}\n {{'<start_of_turn>user\n'}}\n {%- for item in message['value'] -%}\n {%- if item['type'] == 'image' -%}\n {{ '<start_of_image>' }}\n {%- elif item['type'] == 'audio' -%}\n {{ '<start_of_audio>' }}\n {%- elif item['type'] == 'text' -%}\n {{ item['text'] | trim }}\n {%- endif -%}\n {{'<end_of_turn>\n'}}\n {%- endfor -%}\n {%- endif -%}\n {%- elif message['from'] == \"gpt\" -%}\n {{'<start_of_turn>model\n' + message['value'] + '<end_of_turn>\n'}} \n {%- elif message['from'] == \"function_call\" -%}\n {%- set func_call = message['value'] -%}\n {{'<start_of_turn>model\n' + 'Action:' + func_call.name + '\n' + 'Action Input:' + func_call.arguments + '<end_of_turn>\n'}} \n {%- elif message['from'] == \"observation\" -%}\n {{'<start_of_turn>tool\n' + message['value'] + '<end_of_turn>\n'}} \n {%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{'<start_of_turn>model\n'}}\n{%- endif -%}\n"} |