PufferLib Docs
These docs will get you started. Join the Discord to get help and report bugs. If you're new to RL, building and contributing a new env is the best way to learn, and we review PRs live. The PufferLib 4.0 native backend is ~1500 lines of Python and ~5000 lines of CUDA C. A PyTorch backend is provided as an additional ~1000 lines of Python for quick prototyping and as a fallback. Fork the project and edit directly. There is no prebuilt package blackboxing functionality. Everything is written as simply and transparently as possible. If you're new to low-level dev, it's much easier than you think. Give the environment tutorial a try! Memory Management: Tensors in PufferLib are just structs with a shape and a data pointer. Every tensor registers its size with an allocator at init time. After all tensors are registered, the allocator sums up the sizes and does a single allocation of continuous memory. There are separate allocators for weights, gradients, and activations. No tensors are creat
PufferLib is a fast and sane reinforcement learning library. Our key features are: These docs will get you started. Join the Discord to get help and report bugs. If you're new to RL, building and contributing a new env is the best way to learn, and we review PRs live. curl -fsSL https://raw.githubusercontent.com/PufferAI/PufferTank/refs/heads/5.0/install.sh | bash Or use our prebuilt CUDA Docker: git clone --filter=blob:none --single-branch --branch 5.0 https://github.com/pufferai/puffertank cd puffertank ./docker.sh test Installation Test Train a policy in under a second (RTX 5090)…
saved by
related reading
- The 37 Implementation Details of Proximal Policy Optimization · The ICLR Blog Trackiclr-blog-track.github.io
- Debugging Reinforcement Learning Systemsandyljones.com
- Keep the Tokens Flowing: Lessons from 16 Open-Source RL Librarieshuggingface.co
- RLHF & Post-Training Course by Nathan Lambertrlhfbook.com
- Composer2.pdfcursor.com
- PiTorch: ML on Baremetal Raspberry Pis | projectsmasonjwang.com
- Pavlov's List: A List of RL Environment Startupspavlovslist.com
- A vision researcher’s guide to some RL stuff: PPO & GRPO - Yuge (Jimmy) Shiyugeten.github.io
- State of RL for reasoning LLMs | A. Weersaweers.de
- Joseph Suarez 🐡 (@jsuarez) on Xx.com
- PyTorch internals : ezyang's blogblog.ezyang.com
- Joseph Suarez 🐡 (@jsuarez) on Xx.com