mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-02 01:28:31 +00:00
[chat]: update rm, add wandb and fix bugs (#4471)
* feat: modify forward fn of critic and reward model * feat: modify calc_action_log_probs * to: add wandb in sft and rm trainer * feat: update train_sft * feat: update train_rm * style: modify type annotation and add warning * feat: pass tokenizer to ppo trainer * to: modify trainer base and maker base * feat: add wandb in ppo trainer * feat: pass tokenizer to generate * test: update generate fn tests * test: update train tests * fix: remove action_mask * feat: remove unused code * fix: fix wrong ignore_index * fix: fix mock tokenizer * chore: update requirements * revert: modify make_experience * fix: fix inference * fix: add padding side * style: modify _on_learn_batch_end * test: use mock tokenizer * fix: use bf16 to avoid overflow * fix: fix workflow * [chat] fix gemini strategy * [chat] fix * sync: update colossalai strategy * fix: fix args and model dtype * fix: fix checkpoint test * fix: fix requirements * fix: fix missing import and wrong arg * fix: temporarily skip gemini test in stage 3 * style: apply pre-commit * fix: temporarily skip gemini test in stage 1&2 --------- Co-authored-by: Mingyan Jiang <1829166702@qq.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import time
|
||||
|
||||
import pytest
|
||||
import torch
|
||||
from model_zoo import GPTLMLoss, get_gpt2_components
|
||||
from torch.utils._pytree import tree_map
|
||||
|
||||
import colossalai
|
||||
@@ -13,7 +14,6 @@ from colossalai.fx.profiler import parameter_size
|
||||
from colossalai.nn.optimizer import HybridAdam
|
||||
from colossalai.testing import spawn
|
||||
from colossalai.utils import get_current_device
|
||||
from model_zoo import GPTLMLoss, get_gpt2_components
|
||||
|
||||
|
||||
def parse_args():
|
||||
|
@@ -3,6 +3,7 @@ import time
|
||||
from functools import partial
|
||||
|
||||
import torch
|
||||
from model_zoo import model_builder
|
||||
from torch import nn
|
||||
|
||||
from colossalai.fx import ColoTracer
|
||||
@@ -12,7 +13,6 @@ from colossalai.legacy.pipeline.middleware.adaptor import get_fx_topology
|
||||
from colossalai.legacy.pipeline.rpc._pipeline_schedule import FillDrainPipelineEngine
|
||||
from colossalai.legacy.pipeline.rpc.utils import rpc_run
|
||||
from colossalai.logging import disable_existing_loggers, get_dist_logger
|
||||
from model_zoo import model_builder
|
||||
|
||||
|
||||
def parse_args():
|
||||
|
Reference in New Issue
Block a user