Gemma3

Gemma3 is a model designed for fast deployment on devices, offering advanced capabilities such as multilingual support, text and visual reasoning, expanded context windows, function calling, and quantized models for high performance.

Model details

CategoryDetails
Model NameGemma3
Version27B INT4
Model CategoryLLM
Size27B parameters
HuggingFace ModelISTA-DASLab/gemma-3-27b-it-GPTQ-4b-128g
OpenAI Compatible endpointChat Completions
LicenseGemma

Capabilities

FeatureDetails
Tool Calling
Azion Long-term Support (LTS)
Context Length32k
Supports LoRA
Input dataText + Image

Usage

Basic chat completion

This is a basic chat completion example using this model:

const modelResponse = await Azion.AI.run("ista-daslab-gemma-3-27b-it-gptq-4b-128g", {
"stream": true,
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Name the european capitals"
}
]
})
PropertyTypeDescription
streambooleanWhether the response is streamed.
messages[]arrayArray of chat messages forming the prompt.
messages[].rolestringThe role of the message sender.
messages[].contentstringThe content of the message.

Response example:

{
"id": "chatcmpl-e27716424abf4b3f891ff4850470cb09",
"object": "chat.completion",
"created": 1746821581,
"model": "casperhansen-mistral-small-24b-instruct-2501-awq",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"reasoning_content": null,
"content": "Sure! Here is a list of some European capitals...",
"tool_calls": []
},
"logprobs": null,
"finish_reason": "stop",
"stop_reason": null
}
],
"usage": {
"prompt_tokens": 9,
"total_tokens": 527,
"completion_tokens": 518,
"prompt_tokens_details": null
},
"prompt_logprobs": null
}
PropertyTypeDescription
idstringUnique identifier for the chat completion.
objectstringThe type of object.
creatednumberTimestamp in Unix format for when the completion was created.
modelstringThe name of the model used for the completion.
choices[]arrayArray of possible choices in the response.
choices[].indexnumberThe index of the choice in the array.
choices[].message.rolestringThe role of the sender of the message.
choices[].message.reasoning_contentstringThe reasoning content provided by the assistant.
choices[].message.contentstringThe actual content of the assistant’s response.
choices[].message.tool_calls[]arrayArray of tool calls made during the response.
choices[].logprobsnumberLog probabilities for the tokens.
choices[].finish_reasonstringThe reason the response ended.
choices[].stop_reasonstringThe reason the response stopped.
usage.prompt_tokensnumberThe number of tokens used in the prompt.
usage.total_tokensnumberThe total number of tokens used.
usage.completion_tokensnumberThe number of tokens used in the completion.
usage.prompt_tokens_detailsstringAdditional details about the prompt tokens.
prompt_logprobsnumberLog probabilities for the prompt tokens.

Multimodal (text + image) example

This is a multimodal request example using this model:

const modelResponse = await Azion.AI.run("ista-daslab-gemma-3-27b-it-gptq-4b-128g", {
"stream": true,
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is in this image?"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/image.jpg"
}
}
]
}
]
})
PropertyTypeDescription
streambooleanIndicates whether the response is streamed.
messages[]arrayArray of message objects, containing the system and user messages.
messages[].rolestringThe role of the message sender.
messages[].contentstringThe content of the message.
messages[].content[].typestringThe type of the content item.
messages[].content[].textstringContent of the message (only if type is "text").
messages[].content[].image_urlstringContent of the message (only if type is "image_url").
messages[].content[].image_url.urlstringThe actual URL of the image.

The response will be similar to the one in the basic chat completion example.

JSON schema

{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"messages"
],
"properties": {
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
}
},
"temperature": {
"type": "number",
"minimum": 0,
"maximum": 2
},
"top_p": {
"type": "number",
"minimum": 0,
"maximum": 1,
"default": 1
},
"n": {
"type": "integer",
"minimum": 1,
"default": 1
},
"stream": {
"type": "boolean",
"default": false
},
"max_tokens": {
"type": "integer",
"minimum": 1
},
"presence_penalty": {
"type": "number",
"minimum": -2,
"maximum": 2,
"default": 0
},
"frequency_penalty": {
"type": "number",
"minimum": -2,
"maximum": 2,
"default": 0
}
},
"components": {
"schemas": {
"Message": {
"oneOf": [
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/AssistantMessage"
}
]
},
"SystemMessage": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"enum": [
"system"
]
},
"content": {
"$ref": "#/components/schemas/TextContent"
}
}
},
"UserMessage": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"enum": [
"user"
]
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/TextContentItem"
},
{
"$ref": "#/components/schemas/ImageContentItem"
}
]
}
}
]
}
}
},
"AssistantMessage": {
"oneOf": [
{
"$ref": "#/components/schemas/AssistantMessageWithoutToolCalls"
}
]
},
"AssistantMessageWithoutToolCalls": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"enum": [
"assistant"
]
},
"content": {
"$ref": "#/components/schemas/TextContent"
}
},
"not": {
"required": [
"tool_calls"
]
}
},
"TextContent": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"$ref": "#/components/schemas/TextContentItem"
}
}
],
"description": "Text content that can be provided either as a simple string or as an array of TextContentItem objects"
},
"ImageContent": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ImageContentItem"
}
},
"TextContentItem": {
"type": "object",
"required": [
"type",
"text"
],
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
},
"text": {
"type": "string"
}
}
},
"ImageContentItem": {
"type": "object",
"required": [
"type",
"image_url"
],
"properties": {
"type": {
"type": "string",
"enum": [
"image_url"
]
},
"image_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"format": "uri"
}
}
}
}
}
}
}
}