mentee-embed-v1 / __init__.py
SyedSyab's picture
Add HF AutoModel/AutoTokenizer support (trust_remote_code=True)
0b636e9 verified
Raw
History Blame Contribute Delete
787 Bytes
"""
__init__.py — makes hf_hub a proper package and registers
MenteeEmbedConfig + MenteeEmbedModel with the HuggingFace Auto classes.
When HF loads a repo with trust_remote_code=True it imports this file first,
which triggers the AutoModel/AutoConfig registration automatically.
"""
from .configuration_mentee import MenteeEmbedConfig
from .modeling_mentee import MenteeEmbedModel
from .tokenization_mentee import MenteeTokenizer
from transformers import AutoConfig, AutoModel, AutoTokenizer
AutoConfig.register("mentee_embed", MenteeEmbedConfig)
AutoModel.register(MenteeEmbedConfig, MenteeEmbedModel)
AutoTokenizer.register(MenteeEmbedConfig, slow_tokenizer_class=None, fast_tokenizer_class=MenteeTokenizer)
__all__ = ["MenteeEmbedConfig", "MenteeEmbedModel", "MenteeTokenizer"]