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

# Google Colab (AI Ultra) & GPU/River Evidence

> Train open-weight RL agents on Google Colab (AI Ultra H100/A100/L4), run River AI 0.11 end-to-end, embed 3D Weight Studio inline, and capture SHA-256 GPU/River GA evidence.

StateSet Agents ships first-class **Google Colab** support (`stateset_agents.utils.colab`
and `stateset-agents rl --cloud colab`), tuned for **Google AI Ultra / Colab Pro+** GPU
tiers (**H100 80GB**, **A100 80GB**, **A100 40GB**, **L4 24GB**) with automatic T4 16GB and
CPU fallback.

## Flagship v1.0 Colab notebooks

| Notebook | Runtime | What it runs |
| - | - | - |
| `notebooks/open_weight_rl_colab_gpu.ipynb` | H100 / A100 / L4 (T4/CPU fallback) | Auto-tunes GPU tier, measures live CUDA peak VRAM & Triton chunked LM-head parity, runs all 6 enterprise verifiable MCP sandboxes, executes Step-0 PyTorch CAA warm-start + Chunked GSPO LoRA training on Qwen, and saves LoRA checkpoints to Google Drive |
| `notebooks/river_ai_full_lifecycle_colab.ipynb` | CPU (auto Python 3.12 `uv` side-venv) | Full River AI `0.11` lifecycle: `river-preflight --live`, all 6 verifiable sandboxes inside real `river_client.rl.RolloutEngine`, `cispo`/`dro` blueprints, opt-in live SFT + `river-chat`, and dedicated deployment create/meter/delete with guaranteed cleanup |
| `notebooks/weight_studio_3d_colab.ipynb` | CPU or GPU | Embeds interactive WebGL2 **3D Weight Studio** inline inside Colab (`serve_kernel_port_as_iframe`, no ngrok), runs 6-domain sandbox pool + SQLite WAL sparklines + Streamable HTTP MCP + Autonomous Auto-Heal/Red-Team/Canary autopilot, and downloads a standalone 3D HTML PR report |
| `notebooks/v1_ga_gpu_river_evidence_colab.ipynb` | Colab Ultra H100 / A100 / L4 | 1-click runner for `benchmarks/capture_v1_gpu_river_evidence.py`, bundling SHA-256 attested `v1_ga_evidence.json` and `v1_ga_evidence.md` for download |
| `notebooks/controlled_frontier_rl_colab.ipynb` *(post-`v0.99.1`)* | Colab Ultra H100 / A100 / L4 (T4/CPU fallback) | End-to-end [Controlled Frontier RL Stack](https://docs.stateset.com/stateset-agents/controlled-rl-stack.md): `ClientMatterSandbox` + `.jsonl` loader, `HierarchicalRubricReward` (`length_penalty = 0.0`), real rank-64 attention LoRA `dr_cispo` updates via `FrontierRLRunner`, Nemotron 3.5 Super VL sweep + Appendix export, and opt-in Inkling 2 Small `TinkerRLRunner` |

## Auto-tuned GPU profiles

`stateset_agents.utils.colab.detect_colab_runtime()` inspects the attached CUDA device,
BF16 capability, Triton availability, Python version, and Google Drive mount status without
requiring manual flags:

| Colab tier | Recommended model | Precision | LoRA `r` | Chunk size | Group size |
| - | - | - | -: | -: | -: |
| `h100_80gb` | `Qwen/Qwen3-8B` | BF16 + Triton | 32 | 256 | 8 |
| `a100_80gb` | `Qwen/Qwen3-8B` | BF16 + Triton | 32 | 256 | 8 |
| `a100_40gb` | `Qwen/Qwen3-4B` | BF16 + Triton | 16 | 256 | 8 |
| `l4_24gb` | `Qwen/Qwen2.5-3B-Instruct` | BF16 + Triton | 16 | 128 | 4 |
| `t4_16gb` | `Qwen/Qwen2.5-1.5B-Instruct` | FP16 | 8 | 64 | 4 |
| `cpu_fallback` | `stub://quickstart` | FP32 | 8 | 32 | 2 |

Generate a Colab Ultra launch plan directly from the CLI:

```bash theme={null}
stateset-agents rl --cloud colab --gpu-type A100-80GB --model Qwen/Qwen3-8B --algorithm gspo --json
```

## Capture unified GPU + River AI 0.11 GA evidence

Use `benchmarks/capture_v1_gpu_river_evidence.py` in Colab Ultra, RunPod, Modal, or a local
workstation to capture reproducible, SHA-256 attested JSON and Markdown reports:

```bash theme={null}
# Offline CPU/GPU contract verification (no model download, zero API spend)
python benchmarks/capture_v1_gpu_river_evidence.py --skip-hf-model --river-mode offline

# Full Colab Ultra GPU + live Qwen LoRA + live River AI 0.11 preflight
python benchmarks/capture_v1_gpu_river_evidence.py \
  --hf-model Qwen/Qwen2.5-1.5B-Instruct \
  --hf-steps 6 \
  --river-mode preflight \
  --output-dir outputs/v1_ga_evidence
```

> [!NOTE]
>
> Store `RIVER_API_KEY` in **Colab Secrets** (never hardcode keys in notebook cells).
> `get_colab_secret("RIVER_API_KEY")` reads `google.colab.userdata` first and falls back to
> environment variables outside Colab.

Continue with [Open-Weight RL](https://docs.stateset.com/stateset-agents/open-weight-rl.md),
[3D Weight Studio](https://docs.stateset.com/stateset-agents/weight-studio.md), or
[River training and serving](https://docs.stateset.com/stateset-agents/river-training.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.