mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-23 14:22:51 +08:00
[data] Fix minicpmv/o dpo training (#6657)
* fix template name * tiny fix * support minicpm-o-2.6 * support inference of minicpmv * update readme * support dpo of minicpmv Former-commit-id: 027942789bf3a28b2506a5730c05c8392ef5c885
This commit is contained in:
parent
8895cf1152
commit
555f17c1ee
@ -155,7 +155,7 @@ class MultiModalDataCollatorForSeq2Seq(DataCollatorForSeq2Seq):
|
||||
if "image_bound" in features: # for minicpmv inputs
|
||||
bsz, seq_length = features["input_ids"].shape
|
||||
features["position_ids"] = torch.arange(seq_length).long().repeat(bsz, 1)
|
||||
return {"data": features, "labels": features["labels"]}
|
||||
return {"data": features, "input_ids": features["input_ids"], "labels": features["labels"]}
|
||||
|
||||
return features
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user