[v1] Fix device mesh, fix lora for reward model and fix sp (#10555)

This commit is contained in:
jiaqiw09
2026-06-25 20:05:56 +08:00
committed by GitHub
parent 666ee0ca78
commit b7615dbdc9
7 changed files with 58 additions and 20 deletions

View File

@@ -149,8 +149,8 @@ def _pack_padding_free_samples(samples: list[ModelInput], cutoff_len: int) -> Ba
return None
packed["position_ids"] = position_ids
packed["attention_mask"] = [1] * len(position_ids)
return {key: torch.tensor(value).unsqueeze(0) for key, value in packed.items()}
packed["attention_mask"] = None
return {key: None if value is None else torch.tensor(value).unsqueeze(0) for key, value in packed.items()}
@BatchingPlugin("padding_free").register("get_data_provider_batch_size")