()
| 4 | from utils.config import MODEL_PATH, LLAMA_SERVER_BIN |
| 5 | |
| 6 | def load_model(): |
| 7 | binary = Path(LLAMA_SERVER_BIN) |
| 8 | if not binary.exists(): |
| 9 | error(f"llama-server not found: {LLAMA_SERVER_BIN}") |
| 10 | return None |
| 11 | if not MODEL_PATH.exists(): |
| 12 | error(f"Model not found: {MODEL_PATH}") |
| 13 | return None |
| 14 | success(f"Binary : {LLAMA_SERVER_BIN}") |
| 15 | success(f"Model : {MODEL_PATH}") |
| 16 | return True |
| 17 | |
| 18 | def unload_model(): |
| 19 | from core.inference import stop_server |