Gemma 3 4B
Google's versatile 4 billion parameter model - the default Gemma 3 variant
Serve the model
Start server
Choose module, then engine and optional parameters on the left, then copy the serve command by clicking the button on the right.
Command
·
No command for this module and engine in model data.
Call the model over Web API
Copy a client command below and paste it into your terminal to make a Web API request to the model you just served.
curl -s http://${JETSON_HOST}:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "RedHatAI/gemma-3-4b-it-quantized.w4a16",
"messages": [{"role": "user", "content": "Hello!"}]
}' With ollama serve on the Jetson, call from another host (set ${JETSON_HOST} or use the field). Match the model name to what you pulled on device.
curl -s http://${JETSON_HOST}:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "gemma-3-4b-it-quantized.w4a16",
"messages": [{"role": "user", "content": "Why is the sky blue?"}]
}' With ollama serve on the Jetson, call from another host (set ${JETSON_HOST} or use the field). Match the model name to what you pulled on device.
curl -s http://${JETSON_HOST}:11434/api/generate -d '{
"model": "gemma-3-4b-it-quantized.w4a16",
"prompt": "Why is the sky blue?",
"stream": false
}' One-shot inference
Choose a Jetson module, adjust optional parameters, then copy the command to run a single inference on the device.
Command
·Shell
No snippet for this module and type in model data.
Model Details
Gemma is a family of lightweight, state-of-the-art open models from Google, built from the same research and technology used to create the Gemini models. Gemma 3 models are multimodal, handling text and image input and generating text output, with open weights for both pre-trained variants and instruction-tuned variants. Gemma 3 has a large, 128K context window, multilingual support in over 140 languages, and is available in more sizes than previous versions. Gemma 3 models are well-suited for a variety of text generation and image understanding tasks, including question answering, summarization, and reasoning. Their relatively small size makes it possible to deploy them in environments with limited resources such as laptops, desktops or your own cloud infrastructure, democratizing access to state of the art AI models and helping foster innovation for everyone.
Inputs and outputs
Input:
- Text string, such as a question, a prompt, or a document to be summarized
- Images, normalized to 896 x 896 resolution and encoded to 256 tokens each
- Total input context of 128K tokens for the 4B size
Output:
- Generated text in response to the input, such as an answer to a question, analysis of image content, or a summary of a document
- Total output context of 8192 tokens