openpsi-project / ReaLHF

Super-Efficient RLHF Training of LLMs with Parameter Reallocation
Apache License 2.0
82 stars 4 forks source link

Bug fixes: offloading with a single MFC and parameter spec for ReaLModel. #50

Closed garrett4wade closed 1 month ago

garrett4wade commented 1 month ago

The major change:

Original functions are grouped into classes to make the code more readable.

Now the parameter count is automatically derived from the key and the correspnding tensor-parallel shape. It brings two benefits: (1) we don't need to maintain an additional counter function which can be error prone, and (2) the parameter count becomes accurate and it can be used everywhere else beyond just using it for partitioning pipeline stages.

Bug fixes:

New features: