Browse Source

check for the last file that downloads in case it fails part way through

Alex Cheema 1 year ago
parent
commit
10a043773f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      exo/inference/tinygrad/inference.py

+ 1 - 1
exo/inference/tinygrad/inference.py

@@ -173,7 +173,7 @@ class TinygradDynamicShardInferenceEngine(InferenceEngine):
         models_dir = Path(_cache_dir) / "tinygrad" / "downloads"
         model_path = models_dir / shard.model_id
         size = "8B"
-        if model_path.exists():
+        if Path(model_path / "model.safetensors.index.json").exists():
             model = model_path
         else:
             from tinygrad.helpers import fetch