Skip to main content
NVIDIA
Explore
Models
Skills
Blueprints
GPUs
Docs
Help Center
Getting Started
  1. Create and verify your account to unlock full access to NVIDIA NIM APIs.
ResourcesDeveloper ForumsContact Support
FAQs
  • Train a Chat Model with NanoChat

    12 HOURS

    Build a ChatGPT-style LLM end-to-end — tokenizer, pretraining, SFT — then chat via web UI or CLI

    • Application
    • DGX Station
    • Docker
    • PyTorch
    View on GitHub
    OverviewOverviewInstructionsInstructionsTroubleshootingTroubleshooting

    Common issues

    The Hardware platform column shows where an issue is most relevant. "All hardware platforms" applies to every supported platform.

    SymptomHardware platformCauseFix
    "permission denied" when running dockerAll hardware platformsUser not in docker groupRun sudo usermod -aG docker $USER && newgrp docker
    WANDB_API_KEY is not set or HF_TOKEN is not setAll hardware platformsRequired env vars not exported before launchexport WANDB_API_KEY=<key> and export HF_TOKEN=<token> in the same shell, then re-run launch
    RuntimeError: CUDA out of memoryAll hardware platformsBatch size or model depth too largeReduce --device-batch-size / --device_batch_size (try 64 → 32 → 16 → 8) or lower --depth in the speedrun script; re-run setup then launch
    Container fails to start / GPU not visibleAll hardware platformsNVIDIA Container Toolkit not configured, or GPU in useTest docker run --rm --gpus all nvcr.io/nvidia/pytorch:<tag> nvidia-smi; ensure no other GPU containers are running; check docker logs
    nanochat image not foundAll hardware platformsSetup not run or Docker build failedFrom assets/, run ./setup.sh and confirm with docker images | grep nanochat
    Training hangs at dataset downloadAll hardware platformsNetwork issue downloading shardsCheck connectivity; downloads can take a long time — restart launch if it stalls indefinitely
    Disk full / No space left on deviceAll hardware platformsDataset + checkpoints exhausted diskEnsure ~50 GB free before training; docker system prune; remove old caches under ~/.cache/nanochat or ./nanochat_cache
    Web UI not reachable on port 8000All hardware platformsServer not running, port blocked, or missing SSH tunnelConfirm chat_web is running; ssh -L 8000:localhost:8000 user@<HOST_IP> if remote; allow port 8000 if firewalled
    Model runs on wrong GPUmulti-GPU hostsDefault GPU selectionPin with GPU_DEVICE='"device=N"' ./launch.sh (N from nvidia-smi)

    Getting additional help

    1. nanochat issues: https://github.com/karpathy/nanochat/issues
    2. Container logs: docker logs <container_id>
    3. System resources: htop and nvidia-smi
    4. NVIDIA Developer Forums: https://forums.developer.nvidia.com/

    Resources

    • nanochat (GitHub)
    • Weights & Biases
    • Hugging Face
    • DGX Station Support
    • NVIDIA Developer Forums
    Terms of Use
    Privacy Policy
    Your Privacy Choices
    Contact

    Copyright © 2026 NVIDIA Corporation