← back to Exo
70B model unit test only runs if its downloaded
c1d5b381f4cec691d2b396d26169091f6c21323e · 2025-08-07 10:41:56 +0100 · Matt Beton
Files touched
M worker/tests/test_multimodel/test_inference_llama70B.py
Diff
commit c1d5b381f4cec691d2b396d26169091f6c21323e
Author: Matt Beton <matthew.beton@gmail.com>
Date: Thu Aug 7 10:41:56 2025 +0100
70B model unit test only runs if its downloaded
---
.../tests/test_multimodel/test_inference_llama70B.py | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/worker/tests/test_multimodel/test_inference_llama70B.py b/worker/tests/test_multimodel/test_inference_llama70B.py
index 6f0a935a..560faa47 100644
--- a/worker/tests/test_multimodel/test_inference_llama70B.py
+++ b/worker/tests/test_multimodel/test_inference_llama70B.py
@@ -1,6 +1,7 @@
import asyncio
from logging import Logger
from typing import Callable
+import os
import pytest
@@ -48,6 +49,25 @@ MODEL_ID = 'mlx-community/Llama-3.3-70B-Instruct-4bit'
async def model_meta() -> ModelMetadata:
return await get_model_meta(MODEL_ID)
+
+
+def _get_model_size_gb(path: str) -> float:
+ """Calculate total size of directory recursively in GB."""
+ total_size = 0
+ for dirpath, _, filenames in os.walk(path):
+ for filename in filenames:
+ filepath = os.path.join(dirpath, filename)
+ if os.path.isfile(filepath):
+ total_size += os.path.getsize(filepath)
+ return total_size / (1024**3) # Convert bytes to GB
+
+@pytest.mark.skipif(
+ not (
+ os.path.exists(os.path.expanduser("~/.exo/models/mlx-community--Llama-3.3-70B-Instruct-4bit/"))
+ and _get_model_size_gb(os.path.expanduser("~/.exo/models/mlx-community--Llama-3.3-70B-Instruct-4bit/")) > 30
+ ),
+ reason="This test only runs when model mlx-community/Llama-3.3-70B-Instruct-4bit is downloaded"
+)
async def test_2_runner_inference(
logger: Logger,
pipeline_shard_meta: Callable[[int, int], PipelineShardMetadata],
← 473512dd r1 size
·
back to Exo
·
No 70b dbcd09aa →