karpathy / minGPT

A minimal PyTorch re-implementation of the OpenAI GPT (Generative Pretrained Transformer) training
MIT License
20.2k stars 2.51k forks source link

Crashed Encoder possible data corruption #111

Closed DayneSorvisto closed 1 year ago

DayneSorvisto commented 1 year ago

Identified bare exception in Encoder that could cause unexpected behavior (example if SystemExit isn't raised)

Created PR with simple fix to add explicit exception handling for these lines.

https://github.com/karpathy/minGPT/pull/110