mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2024-12-11 16:27:01 +01:00
Update list of transformers versions that have broken OPT
This commit is contained in:
parent
52b977a3d3
commit
69da5b7bc2
@ -26,6 +26,7 @@ import json
|
||||
import collections
|
||||
import zipfile
|
||||
import packaging
|
||||
import packaging.version
|
||||
import contextlib
|
||||
import traceback
|
||||
import threading
|
||||
@ -1348,7 +1349,7 @@ if(not vars.use_colab_tpu and vars.model not in ["InferKit", "Colab", "OAI", "Go
|
||||
|
||||
|
||||
# Fix a bug in OPTForCausalLM where self.lm_head is the wrong size
|
||||
if(transformers_version == "4.19.0"):
|
||||
if(packaging.version.parse("4.19.0.dev0") <= packaging.version.parse(transformers_version) <= packaging.version.parse("4.19.2")):
|
||||
try:
|
||||
from transformers import OPTForCausalLM, OPTModel
|
||||
except ImportError:
|
||||
|
Loading…
Reference in New Issue
Block a user