Instructions to use brokencircuitranch/gemma4-hermes-tools-vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use brokencircuitranch/gemma4-hermes-tools-vision with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="brokencircuitranch/gemma4-hermes-tools-vision") 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("brokencircuitranch/gemma4-hermes-tools-vision", dtype="auto") - llama-cpp-python
How to use brokencircuitranch/gemma4-hermes-tools-vision with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="brokencircuitranch/gemma4-hermes-tools-vision", filename="gemma4-hermes-vision-q4-v2.gguf", )
llm.create_chat_completion( 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" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use brokencircuitranch/gemma4-hermes-tools-vision with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf brokencircuitranch/gemma4-hermes-tools-vision # Run inference directly in the terminal: llama-cli -hf brokencircuitranch/gemma4-hermes-tools-vision
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf brokencircuitranch/gemma4-hermes-tools-vision # Run inference directly in the terminal: llama-cli -hf brokencircuitranch/gemma4-hermes-tools-vision
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf brokencircuitranch/gemma4-hermes-tools-vision # Run inference directly in the terminal: ./llama-cli -hf brokencircuitranch/gemma4-hermes-tools-vision
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf brokencircuitranch/gemma4-hermes-tools-vision # Run inference directly in the terminal: ./build/bin/llama-cli -hf brokencircuitranch/gemma4-hermes-tools-vision
Use Docker
docker model run hf.co/brokencircuitranch/gemma4-hermes-tools-vision
- LM Studio
- Jan
- vLLM
How to use brokencircuitranch/gemma4-hermes-tools-vision with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "brokencircuitranch/gemma4-hermes-tools-vision" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "brokencircuitranch/gemma4-hermes-tools-vision", "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/brokencircuitranch/gemma4-hermes-tools-vision
- SGLang
How to use brokencircuitranch/gemma4-hermes-tools-vision 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 "brokencircuitranch/gemma4-hermes-tools-vision" \ --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": "brokencircuitranch/gemma4-hermes-tools-vision", "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 "brokencircuitranch/gemma4-hermes-tools-vision" \ --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": "brokencircuitranch/gemma4-hermes-tools-vision", "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" } } ] } ] }' - Ollama
How to use brokencircuitranch/gemma4-hermes-tools-vision with Ollama:
ollama run hf.co/brokencircuitranch/gemma4-hermes-tools-vision
- Unsloth Studio new
How to use brokencircuitranch/gemma4-hermes-tools-vision with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for brokencircuitranch/gemma4-hermes-tools-vision to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for brokencircuitranch/gemma4-hermes-tools-vision to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for brokencircuitranch/gemma4-hermes-tools-vision to start chatting
- Pi new
How to use brokencircuitranch/gemma4-hermes-tools-vision with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf brokencircuitranch/gemma4-hermes-tools-vision
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "brokencircuitranch/gemma4-hermes-tools-vision" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use brokencircuitranch/gemma4-hermes-tools-vision with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf brokencircuitranch/gemma4-hermes-tools-vision
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default brokencircuitranch/gemma4-hermes-tools-vision
Run Hermes
hermes
- Docker Model Runner
How to use brokencircuitranch/gemma4-hermes-tools-vision with Docker Model Runner:
docker model run hf.co/brokencircuitranch/gemma4-hermes-tools-vision
- Lemonade
How to use brokencircuitranch/gemma4-hermes-tools-vision with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull brokencircuitranch/gemma4-hermes-tools-vision
Run and chat with the model
lemonade run user.gemma4-hermes-tools-vision-{{QUANT_TAG}}List all available models
lemonade list
llm.create_chat_completion(
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"
}
}
]
}
]
)Fine-tuned version of google/gemma-4-26B-A4B-it with vision/multimodal capabilities, reliable tool use, and function calling.
This is the vision-capable variant of gemma4-hermes-tools.
Training
- Base model: google/gemma-4-26B-A4B-it (Mixture of Experts, multimodal)
- Fine-tuning framework: Unsloth
- Hardware: NVIDIA A100 80GB (HuggingFace Space)
- Method: QLoRA (4-bit) → merged to 16-bit
Training Data
- NousResearch/hermes-function-calling-v1 — 1,893 examples of structured tool use and function calling in Hermes format
- teknium/OpenHermes-2.5 — 5,000 sampled examples for general instruction following and reasoning
Total: 6,893 examples, 2 epochs
Vision Integration
- LLM weights converted via llama.cpp
convert_hf_to_gguf.py - Vision encoder (mmproj) converted via llama.cpp
convert_image_encoder_to_gguf.py - LLM + mmproj merged into single GGUF for unified inference
Intended Use
Designed for agentic pipelines requiring reliable structured tool call generation with image understanding. Supports vision inputs (images, charts, screenshots) alongside tool/function calling. Tested with Ollama for local inference.
Usage
Ollama (recommended)
ollama pull brokencircuitranch/gemma4-hermes-tools-vision
ollama run brokencircuitranch/gemma4-hermes-tools-vision
Vision — Python
import ollama
response = ollama.chat(
model=gemma4-hermes-tools-vision,
messages=[{
role: user,
content: What is in this image?,
images: [path/to/image.jpg]
}]
)
print(response[message][content])
Tool Calling — Python
import ollama
tools = [{
type: function,
function: {
name: tag_image,
description: Analyze an image and return structured tags and description,
parameters: {
type: object,
properties: {
description: {type: string},
objects: {type: array, items: {type: string}},
scene: {type: string}
},
required: [description, objects, scene]
}
}
}]
response = ollama.chat(
model=gemma4-hermes-tools-vision,
messages=[{
role: user,
content: Analyze this image and return structured output.,
images: [path/to/image.jpg]
}],
tools=tools
)
print(response[message][tool_calls])
Tool Calling with Vision — Hermes Format (raw)
This model uses the NousResearch Hermes prompt format for tool calls.
<|im_start|>system
You are a helpful assistant with access to tools and vision capabilities.
<tools>
[{type: function, function: {name: tag_image, description: Analyze an image and return structured tags and description, parameters: {type: object, properties: {description: {type: string, description: What is in the image}, objects: {type: array, items: {type: string}, description: List of detected objects}, scene: {type: string, description: Overall scene type}}, required: [description, objects, scene]}}}]
</tools><|im_end|>
<|im_start|>user
Analyze this image and return structured output.
<image>
path/to/image.jpg
</image><|im_end|>
<|im_start|>assistant
<tool_call>
{name: tag_image, arguments: {description: ..., objects: [...], scene: ...}}
</tool_call><|im_end|>
<|im_start|>tool
{status: ok}
<|im_end|>
<|im_start|>assistant
[Model summarizes findings based on its own analysis of the image]<|im_end|>
llama.cpp
llama-cli --model gemma4-hermes-vision-q4-v2.gguf --image path/to/image.jpg --prompt Describe what you see.
Files
gemma4-hermes-vision-q4-v2.gguf— Q4 quantized for local inference via Ollama/llama.cpp
License
Inherits Gemma Terms of Use
- Downloads last month
- 427
We're not able to determine the quantization variants.
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="brokencircuitranch/gemma4-hermes-tools-vision", filename="gemma4-hermes-vision-q4-v2.gguf", )