mirror of https://github.com/inclusionAI/AReaL
fix
This commit is contained in:
parent
3c5f603f59
commit
e30790db11
|
@ -101,7 +101,7 @@ class SFTInterface(model_api.ModelInterface):
|
|||
stat = module.train_batch(
|
||||
input_=data,
|
||||
loss_fn=compute_packed_sft_loss,
|
||||
loss_weight_fn=lambda x: x.data["prompt_mask"]
|
||||
loss_weight_fn=lambda x: x.data["prompt_mask"].count_nonzero()
|
||||
.logical_not()
|
||||
.count_nonzero(),
|
||||
token_normalize_scope=self.token_normalize_scope,
|
||||
|
|
Loading…
Reference in New Issue