nanochat/scripts
google-labs-jules[bot] 08c628cb83 feat: Add ROCm and device-agnostic support
This change adds support for ROCm and makes the codebase device-agnostic, allowing it to run on different hardware backends including ROCm, CUDA, and CPU.

The key changes are:
- Modified `pyproject.toml` to use ROCm-compatible PyTorch wheels and added the `pytorch-triton-rocm` dependency.
- Refactored `nanochat/common.py` to dynamically detect the available hardware and set the device and distributed backend accordingly.
- Updated all training, evaluation, and inference scripts to be device-agnostic, removing hardcoded CUDA references.
- Adapted `speedrun.sh` for single-device execution by replacing `torchrun` with `python`.
- Updated `nanochat/report.py` to provide more generic GPU information.
2025-10-14 05:07:30 +00:00
..
base_eval.py feat: Add ROCm and device-agnostic support 2025-10-14 05:07:30 +00:00
base_loss.py feat: Add ROCm and device-agnostic support 2025-10-14 05:07:30 +00:00
base_train.py feat: Add ROCm and device-agnostic support 2025-10-14 05:07:30 +00:00
chat_cli.py feat: Add ROCm and device-agnostic support 2025-10-14 05:07:30 +00:00
chat_eval.py feat: Add ROCm and device-agnostic support 2025-10-14 05:07:30 +00:00
chat_rl.py feat: Add ROCm and device-agnostic support 2025-10-14 05:07:30 +00:00
chat_sft.py feat: Add ROCm and device-agnostic support 2025-10-14 05:07:30 +00:00
chat_web.py feat: Add ROCm and device-agnostic support 2025-10-14 05:07:30 +00:00
mid_train.py feat: Add ROCm and device-agnostic support 2025-10-14 05:07:30 +00:00
tok_eval.py initial commit 2025-10-13 06:49:24 -07:00
tok_train.py initial commit 2025-10-13 06:49:24 -07:00