l294265421 / alpaca-rlhf

Finetuning LLaMA with RLHF (Reinforcement Learning with Human Feedback) based on DeepSpeed Chat
https://88aeeb3aef5040507e.gradio.live/
MIT License
103 stars 13 forks source link

Step 3: Actor model和Reward model使用不同的tokenizer #14

Open Kevin-myxu opened 11 months ago

Kevin-myxu commented 11 months ago

作者您好,首先感谢开源。 我在训练第三阶段的时候,用40G显存的GPU无法加载actor model=llama-7b, reward model =llama-7b,会有OOM的问题,因此我尝试把reward model改为更小的bloom1.7b。但是两个模型不互通tokenizer,在step 3,create model的阶段,加载了不同的tokenizer,然而在计算critic_loss的时候,是不是需要把数据转化为critic tokenizer下的表示,然后再计算critic loss?还是说用actor tokenizer处理的数据计算critic loss时不会有影响? 再次感谢!