support BLOOM models

This commit is contained in:
hiyouga
2023-05-31 16:54:06 +08:00
parent a72492e649
commit 740a5daf56
16 changed files with 134 additions and 90 deletions

View File

@@ -9,9 +9,9 @@ from transformers.tokenization_utils import PreTrainedTokenizer
from .other import IGNORE_INDEX
class DataCollatorForLLaMA(DataCollatorWithPadding):
class DynamicDataCollatorWithPadding(DataCollatorWithPadding):
r"""
Data collator for LLaMA. It is capable of dynamically padding for batched data.
Inherits DataCollatorWithPadding. It is capable of dynamically padding for batched data.
"""
def __init__(
self,