Skip to content

Conversation

@jonahsamost
Copy link

Add bf16 mixed precision training. You can pass in a config to train with/without.

How it works is theres fp32 master weights for the optimizer and bf16 for forwards/backwards. The bf16 weights will get synced from the fp32 after each optimizer step.

Some tensors are kept in 32 bit for training stability (advantages and advantages statistics)

@jsuarez5341 jsuarez5341 merged commit 9e1f1b4 into PufferAI:4.0 Jan 31, 2026
0 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants