File size: 383 Bytes
60965be
 
 
49422ae
60965be
 
 
49422ae
60965be
49422ae
60965be
1
2
3
4
5
6
7
8
9
10
11
12
import transformers
from packaging import version

MIN_VERSION = "4.35.2"


def check_transformers_version():
    if version.parse(transformers.__version__) < version.parse(MIN_VERSION):
        raise ImportError(
            f"You are using transformers=={transformers.__version__}, but transformers>={MIN_VERSION} is required to use DeciLM. Please upgrade transformers."
        )