()
| 19 | |
| 20 | |
| 21 | def test_gguf_model_load(): |
| 22 | |
| 23 | # feel free to adapt this model list |
| 24 | |
| 25 | model_list = ["bling-answer-tool", |
| 26 | "bling-phi-3-gguf", |
| 27 | "dragon-yi-answer-tool", |
| 28 | "dragon-llama-answer-tool", |
| 29 | "llama-2-7b-chat-gguf", |
| 30 | "dragon-mistral-answer-tool"] |
| 31 | |
| 32 | # please note that the unusually short and simple prompt at times actually yields more variability in the model |
| 33 | # response - we are only testing for successful loading and inference |
| 34 | |
| 35 | sample_prompt = ("The company stock declined by $12 after poor earnings results." |
| 36 | "\nHow much did the stock price decline?") |
| 37 | |
| 38 | for model_name in model_list: |
| 39 | |
| 40 | print("\nmodel name: ", model_name) |
| 41 | |
| 42 | model = ModelCatalog().load_model(model_name, temperature=0.0, sample=False) |
| 43 | |
| 44 | response = model.inference(sample_prompt) |
| 45 | |
| 46 | print(f"{model_name} - response: ", response) |
| 47 | |
| 48 | assert response is not None |
| 49 |
nothing calls this directly
no test coverage detected