Harden model download with timeout and checksum

This commit is contained in:
Thales Maciel 2026-02-26 16:30:04 -03:00
parent 64c8c26bce
commit 0df8c356af
4 changed files with 42 additions and 3 deletions

View file

@ -12,5 +12,7 @@ MODEL_URL = (
"https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/"
"Llama-3.2-3B-Instruct-Q4_K_M.gguf"
)
MODEL_SHA256 = "6c1a2b41161032677be168d354123594c0e6e67d2b9227c84f296ad037c728ff"
MODEL_DOWNLOAD_TIMEOUT_SEC = 60
MODEL_DIR = Path.home() / ".cache" / "aman" / "models"
MODEL_PATH = MODEL_DIR / MODEL_NAME