> ## 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.

# inference • AI Agents Framework

> inference: API reference for TrainModel.inference

# inference

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

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

## Signature

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

## Parameters

<ParamField query="instruction" type="Any" required={true}>
  No description available.
</ParamField>

<ParamField query="input_text" type="Any" required={true}>
  No description available.
</ParamField>

### Returns

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

## Uses

* `FastLanguageModel.for_inference`
* `to`
* `apply_chat_template`
* `generate`
* `batch_decode`

## Source

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