gbrabbit's picture
Auto commit at 09-2025-08 20:34:30
ca781ff
raw
history blame
1.65 kB
#!/usr/bin/env python3
"""
๋ชจ๋ธ ํ”„๋กœํ•„ ๊ด€๋ฆฌ
"""
# from .polyglot_ko_1_3b import PolyglotKo13bProfile
# from .dialogpt_medium import DialoGPTMediumProfile
# from .kanana_1_5_2_1b_instruct import Kanana15V21bInstructProfile
# from .kanana_nano_2_1b_instruct import KananaNano21bInstructProfile
# from .mistral_7b_instruct import Mistral7bInstructProfile
# from .polyglot_ko_5_8b import PolyglotKo58bProfile
from .polyglot_ko_1_3b_chat import PolyglotKo13bChatProfile
from .kanana_1_5_v_3b_instruct import Kanana15V3bInstructProfile
from .polyglot_ko_5_8b_chat import PolyglotKo58bChatProfile
# ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ชจ๋ธ ํ”„๋กœํ•„๋“ค
AVAILABLE_MODELS = {
"polyglot-ko-1.3b-chat": PolyglotKo13bChatProfile,
"kanana-1.5-v-3b-instruct": Kanana15V3bInstructProfile,
"polyglot-ko-5.8b-chat": PolyglotKo58bChatProfile,
}
def get_model_profile(model_id: str):
"""๋ชจ๋ธ ID๋กœ ํ”„๋กœํ•„ ๊ฐ€์ ธ์˜ค๊ธฐ"""
if model_id not in AVAILABLE_MODELS:
raise ValueError(f"์•Œ ์ˆ˜ ์—†๋Š” ๋ชจ๋ธ ID: {model_id}")
return AVAILABLE_MODELS[model_id]()
def list_available_models():
"""์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ชจ๋ธ ๋ชฉ๋ก ๋ฐ˜ํ™˜"""
models = []
for model_id, profile_class in AVAILABLE_MODELS.items():
profile = profile_class()
model_info = profile.get_model_info()
models.append({
"model_id": model_id,
"name": model_info["display_name"],
"description": model_info["description"],
"language": model_info["language"],
"model_size": model_info["model_size"],
"multimodal": model_info.get("multimodal", False)
})
return models