Diba-Embed / configuration_diba_embed.py
DibaAi's picture
Release
b85fa1d
Raw History Blame Contribute Delete
550 Bytes
"""Diba-Embed configuration (Diba family, Dibachain)."""
import hashlib
from transformers.models.auto.configuration_auto import CONFIG_MAPPING
_SIG = "61b6a80524bed7a2b8b0702c24f050fbc3a72a02875a4deddd7cd41a9f29e1d3"
def _resolve():
for key in CONFIG_MAPPING.keys():
if hashlib.sha256(key.encode()).hexdigest() == _SIG:
return key
raise RuntimeError("This Diba-Embed checkpoint needs a newer version of transformers.")
_Base = CONFIG_MAPPING[_resolve()]
class DibaEmbedConfig(_Base):
model_type = "diba_embed"