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

# Installation & Setup

> Get AITraining CLI ready to use

# Installation & Setup

The AITraining CLI is included when you install the `aitraining` package.

## Installation

### Using pip

```bash theme={null}
pip install aitraining torch torchvision torchaudio
```

### Using uv (Recommended)

```bash theme={null}
uv pip install aitraining torch torchvision torchaudio
```

## Verify Installation

Check that the CLI is working:

```bash theme={null}
aitraining --version
```

You should see the version number printed.

## First Run

Running `aitraining` without arguments launches the interactive wizard:

```bash theme={null}
aitraining
```

This displays the Monostate banner and starts the configuration wizard.

## GPU Setup

For GPU training, ensure you have CUDA installed and PyTorch can detect your GPU:

```python theme={null}
import torch
print(torch.cuda.is_available())  # Should print True
print(torch.cuda.device_count())  # Number of GPUs
```

### Apple Silicon (M1/M2/M3)

On Apple Silicon Macs, MPS is used automatically:

```python theme={null}
import torch
print(torch.backends.mps.is_available())  # Should print True
```

## Environment Variables

Common environment variables:

| Variable               | Description                                    |
| ---------------------- | ---------------------------------------------- |
| `HF_TOKEN`             | Hugging Face token for private models/datasets |
| `WANDB_API_KEY`        | Weights & Biases API key for logging           |
| `CUDA_VISIBLE_DEVICES` | Specify which GPUs to use                      |

Set these before running training:

```bash theme={null}
export HF_TOKEN="your_token_here"
export WANDB_API_KEY="your_key_here"
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Command Structure" href="/cli/command-structure">
    Learn the CLI command syntax
  </Card>

  <Card title="LLM Training" href="/cli/llm-training">
    Train language models
  </Card>
</CardGroup>
