vectorllm_v1 / __init__.py
insomnia7's picture
Upload folder using huggingface_hub
bcc6605 verified
from transformers import AutoConfig, AutoModel, AutoModelForCausalLM
from .configuration_vectorllm import VectorLLMConfig
from .hf_model import RADIOConfig, RADIOModel
from .image_processing_vectorllm import VectorLLMImageProcessor
from .modeling_vectorllm import VectorLLMForCausalLM
from .processing_vectorllm import VectorLLMProcessor
def _safe_register(register_fn, *args):
try:
register_fn(*args)
except ValueError:
pass
def bootstrap_local_registry():
_safe_register(AutoConfig.register, VectorLLMConfig.model_type, VectorLLMConfig)
_safe_register(AutoModel.register, VectorLLMConfig, VectorLLMForCausalLM)
_safe_register(AutoModelForCausalLM.register, VectorLLMConfig, VectorLLMForCausalLM)
bootstrap_local_registry()
__all__ = [
"RADIOConfig",
"RADIOModel",
"VectorLLMConfig",
"VectorLLMForCausalLM",
"VectorLLMImageProcessor",
"VectorLLMProcessor",
"bootstrap_local_registry",
]