File size: 503 Bytes
36b5c70 | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import json
from dispatchai import load_model
suite = json.load(open('test_suite.json'))['tests']
models = ['SmolLM2-135M-Instruct-mobile', 'Qwen2.5-0.5B-Instruct-mobile-int4']
for model_name in models:
model = load_model(model_name, backend='gguf')
for test in suite:
resp = model.chat(test['prompt'], max_tokens=50)
correct = test.get('expected_contains', '').lower() in resp.lower()
print(f'{"✅" if correct else "❌"} {model_name}: {test["id"]} = "{resp[:60]}"')
|