transformers version requirement

#18
by GenmX9610 - opened

It seems that if we want to load model with transformers for simple validation, the suggested version 4.57.1+ is not compatible.
Since LossKwargs has been removed from transformers 4.54.0, and the modeling_deepseek.py file in the repo depends the class.
image
Maybe 4.53.3 is better for pure transfomers loading.

You can insert code:

from typing import Optional, TypedDict
class LossKwargs(TypedDict, total=False):
    """
    Keyword arguments to be passed to the loss function

    Attributes:
        num_items_in_batch (`int`, *optional*):
            Number of items in the batch. It is recommended to pass it when
            you are doing gradient accumulation.
    """

    num_items_in_batch: Optional[int]

Sign up or log in to comment