added support for sbert/distilbert model

This commit is contained in:
Andrew 2023-11-17 13:58:06 -05:00
parent 81d305953f
commit 438387e191

View file

@ -20,13 +20,11 @@ from collections import OrderedDict
if TYPE_CHECKING: if TYPE_CHECKING:
from torch import Tensor from torch import Tensor
# hard code because we don't want to use the pypi module
#if 'NO_LOCAL_GGUF' not in os.environ: #if 'NO_LOCAL_GGUF' not in os.environ:
sys.path.insert(0, str(Path(__file__).parent / 'gguf-py')) sys.path.insert(0, str(Path(__file__).parent / 'gguf-py'))
import gguf import gguf
#archs = [n.name for n in gguf.MODEL_ARCH] + ['DISTILBERT']
#gguf.MODEL_ARCH = IntEnum('MODEL_ARCH',archs)
#gguf.MODEL_ARCH_NAMES[gguf.MODEL_ARCH.DISTILBERT] = "distilbert"
###### MODEL DEFINITIONS ###### ###### MODEL DEFINITIONS ######
class SentencePieceTokenTypes(IntEnum): class SentencePieceTokenTypes(IntEnum):