AI-Colab / core /adapters /test_adapters.py
A.Tuin
initial commit
0b2210a
Raw History Blame Contribute Delete
1.31 kB
from qwen_adapter import QwenLocalAdapter
from smollm_adapter import SmolLMAdapter
import os
# Путь к директории, где находятся модели
MODEL_BASE_PATH = "D:\\Gemini\\AIColab\\integrations\\models\\"
def test_adapters():
print("Testing QwenLocalAdapter...")
try:
qwen_model_path = os.path.join(MODEL_BASE_PATH, "Qwen2.5-1.5B-VibeThinker")
qwen_adapter = QwenLocalAdapter(qwen_model_path)
qwen_response = qwen_adapter.generate("Привет! Можешь ответить коротко, чтобы подтвердить, что работаешь?")
print(f"QwenLocalAdapter Response: {qwen_response}")
except Exception as e:
print(f"Error testing QwenLocalAdapter: {e}")
print("\nTesting SmolLMAdapter...")
try:
smollm_model_path = os.path.join(MODEL_BASE_PATH, "SmolLM2-360M-Instruct")
smollm_adapter = SmolLMAdapter(smollm_model_path)
smollm_response = smollm_adapter.generate("Привет! Можешь ответить коротко, чтобы подтвердить, что работаешь?")
print(f"SmolLMAdapter Response: {smollm_response}")
except Exception as e:
print(f"Error testing SmolLMAdapter: {e}")
if __name__ == "__main__":
test_adapters()