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
Category | Details |
---|---|
Model Name | Gemma3 |
Version | 27B INT4 |
Model Category | LLM |
Size | 27B parameters |
HuggingFace Model | ISTA-DASLab/gemma-3-27b-it-GPTQ-4b-128g |
OpenAI Compatible endpoint | Chat Completions |
License | Gemma |
Capabilities
Feature | Details |
---|---|
Tool Calling | ❌ |
Azion Long-term Support (LTS) | ✅ |
Context Length | 32k |
Supports LoRA | ✅ |
Input data | Text + 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" } ]})
Property | Type | Description |
---|---|---|
stream | boolean | Whether the response is streamed. |
messages[] | array | Array of chat messages forming the prompt. |
messages[].role | string | The role of the message sender. |
messages[].content | string | The 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}
Property | Type | Description |
---|---|---|
id | string | Unique identifier for the chat completion. |
object | string | The type of object. |
created | number | Timestamp in Unix format for when the completion was created. |
model | string | The name of the model used for the completion. |
choices[] | array | Array of possible choices in the response. |
choices[].index | number | The index of the choice in the array. |
choices[].message.role | string | The role of the sender of the message. |
choices[].message.reasoning_content | string | The reasoning content provided by the assistant. |
choices[].message.content | string | The actual content of the assistant’s response. |
choices[].message.tool_calls[] | array | Array of tool calls made during the response. |
choices[].logprobs | number | Log probabilities for the tokens. |
choices[].finish_reason | string | The reason the response ended. |
choices[].stop_reason | string | The reason the response stopped. |
usage.prompt_tokens | number | The number of tokens used in the prompt. |
usage.total_tokens | number | The total number of tokens used. |
usage.completion_tokens | number | The number of tokens used in the completion. |
usage.prompt_tokens_details | string | Additional details about the prompt tokens. |
prompt_logprobs | number | Log 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" } } ] } ]})
Property | Type | Description |
---|---|---|
stream | boolean | Indicates whether the response is streamed. |
messages[] | array | Array of message objects, containing the system and user messages. |
messages[].role | string | The role of the message sender. |
messages[].content | string | The content of the message. |
messages[].content[].type | string | The type of the content item. |
messages[].content[].text | string | Content of the message (only if type is "text" ). |
messages[].content[].image_url | string | Content of the message (only if type is "image_url" ). |
messages[].content[].image_url.url | string | The 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" } } } } } } }}