Skip to main content

Logging & Debugging

Monitor training progress and diagnose issues.

Logging Options

Weights & Biases

Features:
  • Real-time loss curves
  • Hardware metrics
  • Hyperparameter tracking
  • Model artifacts

TensorBoard

View in browser:

W&B Visualizer (LEET)

Built-in terminal visualizer that shows real-time metrics in your terminal.
The W&B visualizer is enabled by default when using --log wandb. Use --no-wandb-visualizer to disable it.

Logging Steps

Control logging frequency:

Verbose Output

Capture Full Logs

Environment Variables

These environment variables affect logging and debugging behavior:

Noise Suppression

These are set automatically to reduce log noise:

Common Issues

Out of Memory (OOM)

Symptoms:
  • “CUDA out of memory” error
  • Training crashes suddenly
Solutions:

Slow Training

Check:
  1. GPU utilization:
  1. Enable optimizations:
  1. Data loading bottleneck:
    • Ensure data is on fast storage (SSD)
    • Pre-process data to reduce tokenization overhead
    • Use smaller sequence lengths if possible

NaN Loss

Symptoms:
  • Loss becomes NaN
  • Training diverges
Solutions:

Data Issues

Symptoms:
  • Unexpected behavior
  • Poor model quality
Debug steps:

Checkpointing

Save Strategy

Resume Training

If training crashes, resume from checkpoint:

Monitoring Tools

GPU Monitoring

System Resources

Debugging Checklist

  1. Check logs - Look for error messages
  2. Verify data - Ensure correct format
  3. Check GPU - Memory and utilization
  4. Try smaller - Reduce batch/model size
  5. Isolate issue - Minimal reproduction

Next Steps

Batch Processing

Run multiple experiments

Pipeline Automation

Automate workflows