pixano_inference.schemas.vlm
VLM (Vision-Language Model) I/O types.
UsageInfo(**data)
Bases: _BaseModel
Usage metadata for generation.
Attributes:
| Name | Type | Description |
|---|---|---|
prompt_tokens |
int
|
Number of tokens in the prompt. |
completion_tokens |
int
|
Number of tokens in the completion. |
total_tokens |
int
|
Total number of tokens. |
Source code in pydantic/main.py
VLMInput(**data)
Bases: _BaseModel
Input for vision-language model generation.
Attributes:
| Name | Type | Description |
|---|---|---|
prompt |
str | list[dict[str, Any]]
|
Prompt for the generation. Can be a string or a list of dicts for chat templates. |
images |
list[str | Path | bytes] | None
|
Images for the generation (paths, URLs, base64, or raw bytes from the binary route). Can be None if images are passed in the prompt. |
max_new_tokens |
int
|
Maximum number of new tokens to generate. |
temperature |
float
|
Temperature for the generation. |
Source code in pydantic/main.py
VLMOutput(**data)
Bases: _BaseModel
Output for vision-language model generation.
Attributes:
| Name | Type | Description |
|---|---|---|
generated_text |
str
|
Generated text. |
usage |
UsageInfo
|
Usage metadata. |
generation_config |
dict[str, Any]
|
Configuration used for the generation. |