File size: 2,029 Bytes
457ac1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# AtmosIQ — GPU Training Setup (run when you rent the Vast.ai machine)

Everything (tensors + code) is on HuggingFace: AtmosIQ/atmosiq-processed.
The Azure CPU VM is gone; this rebuilds nothing on GPU — just download + train.

## 0. Pick the machine (budget: ~$3.49)
- VRAM: 16 GB comfortable (12 GB works with --window 5). 24 GB (RTX 3090/4090) ideal.
- Disk: ~40 GB (tensors ~9 GB + torch env ~6 GB + checkpoints).
- Cheap picks: RTX 3090 24GB (~$0.20-0.30/hr), RTX 4090 (~$0.30-0.40/hr),
  RTX 3060 12GB (~$0.10-0.15/hr), T4 16GB. Any of these finishes in budget.
- Full training (~30 min) costs well under $1 on a 3090/4090.

## 1. Setup
    pip install torch numpy pandas huggingface_hub

    hf download AtmosIQ/atmosiq-processed --repo-type dataset --local-dir atmosiq --include "tensors/*" "scripts/model.py" "scripts/dataset.py" "scripts/train.py"

    # (or download the whole repo; tensors/ is the ~9GB part you need)


## 2. Smoke test (confirm GPU + loss drops, ~1 min)
    python scripts/train.py --tensors atmosiq/tensors --ssl_epochs 1 --epochs 2 --max_days 100 --log_every 20

    # expect: "device: cuda", s/day ~0.01-0.05, val_nll decreasing


## 3. Full training (~30-60 min)
    python scripts/train.py --tensors atmosiq/tensors --ssl_epochs 10 --epochs 30

    # -> atmosiq_best.pt (best val_nll checkpoint)


## 4. Save the trained model back
    hf upload AtmosIQ/atmosiq-processed atmosiq_best.pt models/atmosiq_best.pt --repo-type dataset


## Memory knobs if VRAM is tight
- --window 5  (or 3)         # shorter temporal window = less activation memory
- tensors stay in CPU RAM; only per-day windows go to GPU (already how dataset.py works)
- if still OOM: reduce hidden in model.py AtmosIQNet(hidden=64)

## What the run does
SSL masked-reconstruction pretrain (all nodes) -> supervised Student-t fine-tune
on TRAIN-fold labeled cells (spatial split, leakage-safe). Beats the M1 baseline
floor (PM ~0.30 / gases <0.10) via spatial message-passing + physics + temporal.