Spaces:
Running
on
Zero
Running
on
Zero
File size: 778 Bytes
a65550c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import os
AVAILABLE_MODELS = {
"llava_llama": "LlavaLlamaForCausalLM, LlavaConfig",
"llava_gemma": "LlavaGemmaForCausalLM, LlavaGemmaConfig",
"llava_qwen": "LlavaQwenForCausalLM, LlavaQwenConfig",
# "llava_qwen_moe": "LlavaQwenMoeForCausalLM, LlavaQwenMoeConfig",
"llava_mistral": "LlavaMistralForCausalLM, LlavaMistralConfig",
"llava_mixtral": "LlavaMixtralForCausalLM, LlavaMixtralConfig",
# 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 ImportError:
# import traceback
# traceback.print_exc()
print(f"Failed to import {model_name} from llava.language_model.{model_name}")
pass
|