import os AVAILABLE_MODELS = { #"llava_llama": "LlavaLlamaForCausalLM, LlavaConfig", "llava_qwen": "LlavaQwenForCausalLM, LlavaQwenConfig", #"llava_mistral": "LlavaMistralForCausalLM, LlavaMistralConfig", #"naive_llava_qwen":"Naive_LlavaQwenForCausalLM, LlavaQwenConfig" # Add other models as needed } for model_name, model_classes in AVAILABLE_MODELS.items(): try: exec(f"from .language_model.{model_name} import {model_classes}") except Exception as e: raise e print(f"Failed to import {model_name} from longva.language_model.{model_name}")