ColossalAI/applications/Chat/coati/trainer
Wenhao Chen 9d02590c9a
[chat] refactor actor class (#3968)
* refactor: separate log_probs fn from Actor forward fn

* refactor: separate generate fn from Actor class

* feat: update unwrap_model and get_base_model
* unwrap_model returns model not wrapped by Strategy
* get_base_model returns HF model for Actor, Critic and RewardModel

* feat: simplify Strategy.prepare

* style: remove get_base_model method of Actor

* perf: tokenize text in batches

* refactor: move calc_action_log_probs to utils of model

* test: update test with new forward fn

* style: rename forward fn args

* fix: do not unwrap model in save_model fn of naive strategy

* test: add gemini test for train_prompts

* fix: fix _set_default_generate_kwargs
2023-06-13 13:31:56 +08:00
..
callbacks [chat] polish performance evaluator (#3647) 2023-04-26 17:34:59 +08:00
strategies [chat] refactor actor class (#3968) 2023-06-13 13:31:56 +08:00
__init__.py [Coati] first commit (#3283) 2023-03-28 20:25:36 +08:00
base.py [chat] refactor trainer (#3648) 2023-04-26 18:11:49 +08:00
ppo.py [chat] refactor actor class (#3968) 2023-06-13 13:31:56 +08:00
rm.py [chat] refactor model save/load logic (#3654) 2023-04-27 18:41:49 +08:00
sft.py [chat] typo accimulation_steps -> accumulation_steps (#3662) 2023-04-28 15:42:57 +08:00
utils.py [chat] refactor trainer (#3648) 2023-04-26 18:11:49 +08:00