mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-22 22:02:51 +08:00
fix bug
Former-commit-id: caa0eda27dbb6cd198b2c2c244edae468417b77d
This commit is contained in:
parent
70b53d9503
commit
9e49438c41
@ -119,10 +119,10 @@ def preprocess_dataset(
|
||||
print("input_ids:\n{}".format(example["input_ids"]))
|
||||
print("inputs:\n{}".format(tokenizer.decode(example["input_ids"], skip_special_tokens=False)))
|
||||
print("label_ids:\n{}".format(example["labels"]))
|
||||
print("labels:\n{}".format(
|
||||
tokenizer.decode([d if d != IGNORE_INDEX else tokenizer.pad_token_id for d in example["labels"]],
|
||||
skip_special_tokens=False)
|
||||
))
|
||||
print("labels:\n{}".format(''.join([
|
||||
tokenizer.decode(d, skip_special_tokens=False)
|
||||
if d != IGNORE_INDEX else '-100' for d in example["labels"]
|
||||
])))
|
||||
|
||||
def print_pairwise_dataset_example(example):
|
||||
print("accept_ids:\n{}".format(example["accept_ids"]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user