4000x Speedup in Reinforcement Learning with Jax
chrislu.page
4000x Speedup in Reinforcement Learning with Jax
1–10 of 32 posts
Re: 4000x Speedup in Reinforcement Learning with Jax
#2Re: 4000x Speedup in Reinforcement Learning with Jax
#3jax.vmap() is all you need?
Re: 4000x Speedup in Reinforcement Learning with Jax
#4Re: 4000x Speedup in Reinforcement Learning with Jax
#5My long-term ambition is to replicate OpenAI's Dota 2 reinforcement learning work, since it's one of the most impactful (or at least most entertaining) use of RL. It would be more or less impossible to translate the game logic into Jax, short of transpiling C++ to Jax somehow. Which isn't a bad idea – someone should make that.
It should also be noted that there's a long history of RL being done on accelerators. AlphaZero's chess evaluations ran entirely on TPUs. Pytorch CUDA graphs also make it easier to implement this kind of thing nowadays, since (again, as much as I love Jax) some Pytorch constructs are simply easier to use than turning everything into a functional programming paradigm.
All that said, you should really try out Jax. The fact that you can calculate gradients w.r.t. any arbitrary function is just amazing, and you have complete control over what's JIT'ed into a GPU graph and what's not. It's a wonderful feeling compared to using Pytorch's accursed .backwards() accumulation scheme.
Can't wait for a framework that feels closer to pure arbitrary Python. Maybe AI can figure out how to do it.
Re: 4000x Speedup in Reinforcement Learning with Jax
#6 if you made something 2x faster, you might have done something smart
if you made something 100x faster, you definitely just stopped doing something stupidRe: 4000x Speedup in Reinforcement Learning with Jax
#7Reminds me of this evergreen tweet from ryg: https://mobile.twitter.com/rygorous/status/12712968344392826... if you made something 2x faster, you might have done something smart if you made something 100x faster, you definitely just stopped doing something stupid
Re: 4000x Speedup in Reinforcement Learning with Jax
#8Reminds me of this evergreen tweet from ryg: https://mobile.twitter.com/rygorous/status/12712968344392826... if you made something 2x faster, you might have done something smart if you made something 100x faster, you definitely just stopped doing something stupid
Meh. This tweet is a lot less clever than it seems. Shave a factor of n off the complexity of your your algorithm, as happens regularly in CS and informatics, and have all the 1000x speedups you want.
Re: 4000x Speedup in Reinforcement Learning with Jax
#9Reminds me of this evergreen tweet from ryg: https://mobile.twitter.com/rygorous/status/12712968344392826... if you made something 2x faster, you might have done something smart if you made something 100x faster, you definitely just stopped doing something stupid
Meh. This tweet is a lot less clever than it seems. Shave a factor of n off the complexity of your your algorithm, as happens regularly in CS and informatics, and have all the 1000x speedups you want.
Re: 4000x Speedup in Reinforcement Learning with Jax
#10Reminds me of this evergreen tweet from ryg: https://mobile.twitter.com/rygorous/status/12712968344392826... if you made something 2x faster, you might have done something smart if you made something 100x faster, you definitely just stopped doing something stupid
Meh. This tweet is a lot less clever than it seems. Shave a factor of n off the complexity of your your algorithm, as happens regularly in CS and informatics, and have all the 1000x speedups you want.