This commit is contained in:
co63oc
2025-05-08 16:10:54 +08:00
committed by GitHub
parent 8e88ddb022
commit c30bfeb777
19 changed files with 32 additions and 32 deletions

View File

@@ -143,8 +143,8 @@ def print_example(example: Dict[str, Any], tokenizer) -> None:
print(f'[INPUT] {tokenizer.decode(input_ids)}')
print()
n_mask = Counter(labels)[-100]
print(f'[LABLES_IDS] {labels}')
print(f'[LABLES] <-100 * {n_mask}>{tokenizer.decode(labels[n_mask:])}')
print(f'[LABELS_IDS] {labels}')
print(f'[LABELS] <-100 * {n_mask}>{tokenizer.decode(labels[n_mask:])}')
def data_collate_fn(batch: List[Dict[str, Any]], tokenizer) -> Dict[str, Any]: