byzhu
byzhu
感谢您的解答。我的服务器不能联网,因此我把train.py里需要从huggingface上下载的model下载后放到了服务器上。有以下两个问题想跟您请教一下: 1、不加载https://huggingface.co/Plachta/FAcodec/tree/main 里的预训练模型,我把strict=false,可以进行训练。但会报Wav2Vec2ForCTC模型权重未正确初始化的错误。(nvidia/speakerverification_en_titanet_large可以正常加载) 2、加载https://huggingface.co/Plachta/FAcodec/tree/main 里的预训练模型,进行训练,会同时报Wav2Vec2ForCTC模型权重未正确初始化的错误和KeyError: 'net' 的错误。 ps: 1、这里的两个模型我离线下载到了我的服务器上。 w2v_processor = Wav2Vec2Processor.from_pretrained("facebook/wav2vec2-xlsr-53-espeak-cv-ft") w2v_model = Wav2Vec2ForCTC.from_pretrained("facebook/wav2vec2-xlsr-53-espeak-cv-ft").to(device) w2v_model.eval() speaker_model = nemo_asr.models.EncDecSpeakerLabelModel.from_pretrained("nvidia/speakerverification_en_titanet_large") 2、报错如图所示。  
除了这个地方您还发现了dpo代码的其他问题吗?
Is this right?:chosen_lm_mask = (chosen_lm_target != IGNORE_ID) rejected_lm_mask = (rejected_lm_target != IGNORE_ID) chosen_logps = torch.gather( chosen_logits.log_softmax(dim=-1), dim=2, index=chosen_lm_target.masked_fill(~chosen_lm_mask, 0).unsqueeze(-1) ).squeeze(-1) rejected_logps = torch.gather( rejected_logits.log_softmax(dim=-1), dim=2, index=rejected_lm_target.masked_fill(~rejected_lm_mask, 0).unsqueeze(-1) ).squeeze(-1) chosen_logps =...
Do you find others error in dpo finetune code?