mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-23 06:12:50 +08:00
update
Former-commit-id: 734e019cc1c120c23305d6f6bc1fb5b8e0d21b30
This commit is contained in:
parent
8a09b1e732
commit
d9fd8f26cc
@ -68,7 +68,7 @@ def _encode_supervised_example(
|
|||||||
)
|
)
|
||||||
index += 1
|
index += 1
|
||||||
message["content"] = content.replace("<|placeholder|>", "<|image_pad|>")
|
message["content"] = content.replace("<|placeholder|>", "<|image_pad|>")
|
||||||
if processor is not None and not hasattr(processor, "image_seq_length"): # llava-like models
|
elif processor is not None and not hasattr(processor, "image_seq_length"): # llava-like models
|
||||||
prompt[0]["content"] = template.image_token + prompt[0]["content"]
|
prompt[0]["content"] = template.image_token + prompt[0]["content"]
|
||||||
|
|
||||||
messages = prompt + response
|
messages = prompt + response
|
||||||
@ -146,6 +146,7 @@ def preprocess_supervised_dataset(
|
|||||||
response=examples["response"][i],
|
response=examples["response"][i],
|
||||||
system=examples["system"][i],
|
system=examples["system"][i],
|
||||||
tools=examples["tools"][i],
|
tools=examples["tools"][i],
|
||||||
|
images=examples["images"][i],
|
||||||
template=template,
|
template=template,
|
||||||
tokenizer=tokenizer,
|
tokenizer=tokenizer,
|
||||||
processor=processor,
|
processor=processor,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user