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

# Persistence

> What survives cassian down and what doesn't.

## Overview

When you run `cassian down`, your workspace is saved to the cloud. Next `cassian up` restores it: fast, incremental, only downloading what's new or changed.

## What persists

| Path                              | Persists? | Mechanism                                   |
| --------------------------------- | --------- | ------------------------------------------- |
| `/workspace` (your code, scripts) | Yes       | Synced to cloud on `down`, restored on `up` |
| `/workspace/storage`              | Yes       | Always available, persists across sessions  |
| `no_sync` folders                 | Yes       | Cloud only, doesn't copy locally            |
| Installed pip packages            | No        | Lost on `down`                              |
| `~/.cache/huggingface`            | No        | Lost on `down`, use `/workspace/storage`    |
| System packages (apt)             | No        | Part of base image                          |

## Keeping model weights persistent

HuggingFace models and large datasets should live in `/workspace/storage`. Downloads happen once and stay available across all your sessions.

```bash theme={null}
# In your container, point HF to persistent storage
export HF_HOME=/workspace/storage/huggingface
```

Or in `cassian.yaml`:

```yaml theme={null}
workspace:
  setup: "export HF_HOME=/workspace/storage/huggingface && pip install -r requirements.txt"
```

## Keeping generated files (checkpoints, logs)

Use `no_sync` for large generated outputs you want to keep but don't need locally:

```yaml theme={null}
workspace:
  no_sync:
    - "checkpoints/"
    - "outputs/"
    - "wandb/"
```

These persist in the cloud across sessions but never download locally, keeping things fast.

## Pip packages

Packages are re-installed on every `cassian up`. Keep a `requirements.txt` in your project root. Cassian detects it automatically and runs `pip install` as part of startup.

Or specify explicitly:

```yaml theme={null}
workspace:
  setup: "pip install -r requirements.txt"
```

Pre-installed in the default image: `torch`, `transformers`, `accelerate`, `peft`, `datasets`, `bitsandbytes`, `trl`, `wandb`, `numpy`, `pandas`, `scipy`, `jupyter`.

<Note>
  Package caching is coming soon. Your installed packages will be cached between sessions so you only pay the install cost once.
</Note>

## Switching GPU types

Your volumes are cloud-backed and node-agnostic. `cassian switch` lets you pick a different GPU type. Your entire workspace moves with you, no re-download.
