Qwen2.5 VL AWQ 7B

Qwen2.5 VL AWQ 7B is a vision-language model that supports 7 billion parameters, offering advanced capabilities such as visual analysis, agentic reasoning, long video comprehension, visual localization, and structured output generation.

Model details

CategoryDetails
Model NameQwen2.5 VL
VersionAWQ 7B
Model CategoryVLM
Size7B params
HuggingFace ModelQwen/Qwen2.5-VL-7B-Instruct-AWQ
OpenAI Compatible endpointChat Completions
LicenseApache 2.0

Capabilities

FeatureDetails
Tool Calling
Azion Long-term Support (LTS)
Context Length32k tokens
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("qwen-qwen25-vl-7b-instruct-awq", {
"stream": true,
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Name the european capitals"
}
]
})
PropertyTypeDescription
streambooleanIndicates whether to stream the response.
messages[]arrayArray of message objects forming the conversation history.
messages[].rolestringThe role of the message sender.
messages[].contentstringThe content of the message.

Response example:

{
"id": "chatcmpl-e27716424abf4b3f891ff4850470cb09",
"object": "chat.completion",
"created": 1746821581,
"model": "qwen-qwen25-vl-7b-instruct-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.
objectstringType of the object.
creatednumberUnix timestamp of when the response was created.
modelstringIdentifier of the model that generated the response.
choicesarrayArray containing possible completions.
choices[]objectFirst choice returned by the model.
choices[].indexnumberIndex of this choice in the list.
choices[].messageobjectThe message object returned as a response.
choices[].message.rolestringRole of the message sender.
choices[].message.reasoning_contentstringField for reasoning metadata.
choices[].message.contentstringThe textual content of the assistant’s response.
choices[].message.tool_callsarrayAny tool calls made by the assistant.
choices[].logprobsstringLog probability details.
choices[].finish_reasonstringReason why the response was completed.
choices[].stop_reasonstringReason why the response was stopped.
usageobjectToken usage statistics for the request.
usage.prompt_tokensnumberNumber of tokens in the prompt.
usage.total_tokensnumberTotal number of tokens.
usage.completion_tokensnumberNumber of tokens in the model’s response.
usage.prompt_tokens_detailsstringOptional breakdown of prompt tokens.
prompt_logprobsnumberOverall log probabilities for prompt.

Tool Calling Example

This is a tool calling example using this model:

const modelResponse = await Azion.AI.run("qwen-qwen25-vl-7b-instruct-awq", {
"stream": true,
"messages": [
{
"role": "system",
"content": "You are a helpful assistant with access to tools."
},
{
"role": "user",
"content": "What is the weather in London?"
}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state"
}
},
"required": [
"location"
]
}
}
}
]
})
PropertyTypeDescription
streambooleanWhether to stream the response.
messages[]arrayList of messages in the conversation.
messages[].rolestringRole of the message sender.
messages[].contentstringThe user’s prompt.
tools[]arrayList of tools the assistant can use.
tools[].typestringType of tool being registered.
tools[].function.namestringName of the function.
tools[].function.descriptionstringDescription of the function.
tools[].function.parametersobjectSchema for the function’s parameters.

Response example:

{
"id": "chatcmpl-88affc4730cf4219a06d2b15aad9ad44",
"object": "chat.completion",
"created": 1746821866,
"model": "qwen-qwen25-vl-7b-instruct-awq",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"reasoning_content": null,
"content": null,
"tool_calls": [
{
"id": "chatcmpl-tool-fd3311e75aed4cbfbeb7244ced77379f",
"type": "function",
"function": {
"name": "get_weather",
"arguments": "{\"location\": \"London\"}"
}
}
]
},
"logprobs": null,
"finish_reason": "tool_calls",
"stop_reason": null
}
],
"usage": {
"prompt_tokens": 293,
"total_tokens": 313,
"completion_tokens": 20,
"prompt_tokens_details": null
},
"prompt_logprobs": null
}
PropertyTypeDescription
idstringUnique identifier for the completion.
objectstringType of object returned.
creatednumberUnix timestamp of when the completion was created.
modelstringModel name used to generate the response.
choicesarrayList of response choices returned by the model.
choices[].indexnumberIndex of this choice in the returned list.
choices[].message.rolestringRole of the message sender.
choices[].message.reasoning_contentstringPlaceholder for reasoning content.
choices[].message.contentstringMain textual content of the assistant’s response.
choices[].message.tool_calls[]arrayList of tools/functions the assistant intends to call.
choices[].message.tool_calls[].idstringUnique identifier for this tool call.
choices[].message.tool_calls[].typestringType of the tool.
choices[].message.tool_calls[].function.namestringName of the function to be called.
choices[].message.tool_calls[].function.argumentsstringJSON string with arguments passed to the function.
choices[].logprobsstringLog probability data.
choices[].finish_reasonstringReason why the response was finished.
choices[].stop_reasonstringReason why the response was stopped.
usage.prompt_tokensnumberNumber of tokens used in the prompt.
usage.total_tokensnumberTotal tokens used.
usage.completion_tokensnumberTokens used in the model’s response.
usage.prompt_tokens_detailsstringDetailed prompt token usage.
prompt_logprobsnumberLog probabilities for prompt tokens.

Multimodal (text + image) example

This is a multimodal example using this model:

const modelResponse = await Azion.AI.run("qwen-qwen25-vl-7b-instruct-awq", {
"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 should be streamed.
messages[]arrayArray of messages in the conversation.
messages[].rolestringRole of the message sender.
messages[].content[]arrayArray of content blocks.
messages[].content[].typestringType of content block.
messages[].content[].textstringThe actual text content.
messages[].content[].image_urlobjectObject containing the image URL.
messages[].content[].image_url.urlstringURL of the image to be analyzed.

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
},
"tools": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ToolDefinition"
}
}
},
"components": {
"schemas": {
"Message": {
"oneOf": [
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/AssistantMessage"
},
{
"$ref": "#/components/schemas/ToolMessage"
}
]
},
"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"
},
{
"$ref": "#/components/schemas/AssistantMessageWithToolCalls"
}
]
},
"ToolMessage": {
"type": "object",
"required": [
"role",
"content",
"tool_call_id"
],
"properties": {
"role": {
"enum": [
"tool"
]
},
"content": {
"type": "string"
},
"tool_call_id": {
"type": "string"
}
}
},
"AssistantMessageWithoutToolCalls": {
"type": "object",
"required": [
"role",
"content"
],
"properties": {
"role": {
"type": "string",
"enum": [
"assistant"
]
},
"content": {
"$ref": "#/components/schemas/TextContent"
}
},
"not": {
"required": [
"tool_calls"
]
}
},
"AssistantMessageWithToolCalls": {
"type": "object",
"required": [
"role",
"tool_calls"
],
"properties": {
"role": {
"type": "string",
"enum": [
"assistant"
]
},
"tool_calls": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ToolCalls"
}
}
}
},
"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"
}
}
}
}
},
"ToolCalls": {
"type": "object",
"required": [
"function",
"id",
"type"
],
"properties": {
"function": {
"type": "object",
"required": [
"name",
"arguments"
],
"properties": {
"name": {
"type": "string"
},
"arguments": {
"type": "string"
}
}
},
"id": {
"type": "string"
},
"type": {
"enum": [
"function"
]
}
},
"description":"The name and arguments of a function that should be called, as generated by the model."
},
"ToolDefinition": {
"type": "object",
"required": [
"type",
"function"
],
"properties": {
"type": {
"type": "string",
"enum": [
"function"
]
},
"function": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"parameters": {
"type": "object",
"additionalProperties": true
},
"strict": {
"type": "boolean",
"default": false
}
}
}
},
"description": "Definition of a tool that can be used by the model"
}
}
}
}