> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Train Model • AI Agents Framework

> train_model: API reference for TrainVisionModel.train_model

# train\_model

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**TrainVisionModel**](../classes/TrainVisionModel) class in the [**train\_vision**](../modules/train_vision) module.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def train_model() -> Any
```

### Returns

<ResponseField name="Returns" type="Any">
  The result of the operation.
</ResponseField>

## Uses

* `load_datasets`
* `TrainingArguments`
* `is_bf16_supported`
* `os.getenv`
* `SFTTrainer`
* `UnslothVisionDataCollator`
* `trainer.train`
* `save_pretrained`

## Used By

* [`TrainModel.run`](../functions/TrainModel-run)
* [`TrainVisionModel.run`](../functions/TrainVisionModel-run)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai/praisonai/train_vision.py#L150">
  `praisonai/train_vision.py` at line 150
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Agent Train" icon="dumbbell" href="/docs/concepts/agent-train" />

  <Card title="Training" icon="chart-line" href="/docs/train" />
</CardGroup>
