Burn: A next generation Deep Learning Framework.
Many thanks to LLMs from scratch - Rust (candle).
Burn & Wgpu should be compatible with any operating system and will use the GPU.
Clone this repo, and use cargo to run examples ch02 - ch05:
cargo run --example ch02
By default, Wgpu will be used. In some cases (rare though), Wgpu backend is known to generate wrong results. If that happens, you can use the ndarray feature to recheck the results:
cargo run -F ndarray --example ch02
For ch05, gpt2-small-124M.safetensors needs to be downloaded from Hugging Face
You will need to put it under the assets folder.