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

# Models

The `.models` accessor provides methods for listing and downloading models.

Method

Return type

Description

`.list()`

`List[Model]`

List all available models

`.get('<MODEL>')`

`Model`

Fetch model metadata and quantizations

`.download('<MODEL>/<QUANT>')`

`None`

Download a quantized model file

`.delete('<MODEL>/<QUANT>')`

`None`

Delete a downloaded model file

## Model class

Attribute/Method

Type

Description

`.name`

`str`

Model name

`.description`

`str`

Model description

`.num_parameters`

`int`

Number of model parameters

`.trained_for`

`str`

Training purpose (for example, 'text-generation', 'feature-extraction')

`.context_window_size`

`int`

Context window length

`.quantized_files`

`List[QuantizedFile]`

Available quantization files

`.get_quantization('<QUANT>')`

`QuantizedFile`

Get a specific quantization by method

`.download('<QUANT>')`

`None`

Download a specific quantization

`.delete('<QUANT>')`

`None`

Delete a specific quantization

## QuantizedFile class

Attribute/Method

Type

Description

`.sha256`

`str`

SHA256 checksum of the model file

`.size_bytes`

`int`

File size in bytes

`.quant_method`

`str`

Quantization method (for example, 'Q4\_K\_M', 'Q8\_0')

`.max_ram_usage`

`int`

Required RAM in bytes

`.format`

`str`

File format (typically 'gguf')

`.identifier`

`str`

Full filename (for example, 'model\_name\_q4\_k\_m.gguf')

`.is_downloaded`

`bool`

Whether the file is downloaded

`.is_allowed`

`bool`

Whether the file is available on this system

`.local_path`

`Optional[Path]`

Local file path (if downloaded)

`.download()`

`None`

Download this quantization file

`.delete()`

`None`

Delete this quantization file

## Downloading models

Download a quantized model file using one of the following approaches:

> [tab] Using client.models.download()
>
> ```py theme={null}
> client.models.download('OpenHermes-2.5-Mistral-7B/Q4_K_M')
> ```
>
> > [!NOTE]
> >
> > `client.models.download()` accepts either a string reference (`'model/quantization'`) or a `QuantizedFile` object.
> >
> > ***
> >
> > If the model has already been downloaded, the function exits immediately. Otherwise, a progress bar displays.

> [tab] Using Model.download()
>
> ```py theme={null}
> model = client.models.get('OpenHermes-2.5-Mistral-7B')
> model.download('Q4_K_M')
> ```

> [tab] Using QuantizedFile.download()
>
> ```py theme={null}
> model = client.models.get('OpenHermes-2.5-Mistral-7B')
> quantization = model.get_quantization('Q4_K_M')
> quantization.download()
> ```

## Example usage

```py theme={null}
from anaconda_ai import AnacondaAIClient

client = AnacondaAIClient()

# List all models
models = client.models.list()
for model in models:
    print(f"{model.name}: {model.num_parameters / 1e9:.1f}B parameters")

# Get specific model details
model = client.models.get('OpenHermes-2.5-Mistral-7B')
print(f"Description: {model.description}")
print(f"Trained for: {model.trained_for}")

# Check available quantizations
for quant in model.quantized_files:
    status = "downloaded" if quant.is_downloaded else "available"
    print(f"  {quant.quant_method}: {status} ({quant.size_bytes / 1e9:.1f}GB)")

# Download and use a quantization
if not model.get_quantization('Q4_K_M').is_downloaded:
    model.download('Q4_K_M')

quantization = model.get_quantization('Q4_K_M') 
print(f"Local path: {quantization.local_path}")
```
