Skip to content

Commit

Permalink
get rid of some more hf bloat
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCheema committed Jan 27, 2025
1 parent 1df0230 commit 3c7bd48
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 82 deletions.
2 changes: 1 addition & 1 deletion exo/download/test_new_shard_download.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from exo.download.hf.new_shard_download import download_shard, NewShardDownloader
from exo.download.new_shard_download import download_shard, NewShardDownloader
from exo.inference.shard import Shard
from exo.models import get_model_id
from pathlib import Path
Expand Down
4 changes: 2 additions & 2 deletions exo/inference/mlx/test_non_blocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
import time
import numpy as np
from exo.inference.mlx.sharded_inference_engine import MLXDynamicShardInferenceEngine
from exo.download.hf.hf_shard_download import HFShardDownloader
from exo.download.new_shard_download import NewShardDownloader
from exo.inference.shard import Shard
from exo.models import build_base_shard
from collections import deque
from statistics import mean, median

async def test_non_blocking():
# Setup
shard_downloader = HFShardDownloader()
shard_downloader = NewShardDownloader()
engine = MLXDynamicShardInferenceEngine(shard_downloader)
_shard = build_base_shard("llama-3.1-8b", "MLXDynamicShardInferenceEngine")
shard = Shard(_shard.model_id, _shard.start_layer, _shard.n_layers - 1, _shard.n_layers)
Expand Down
6 changes: 3 additions & 3 deletions exo/inference/test_inference_engine.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from exo.inference.mlx.sharded_inference_engine import MLXDynamicShardInferenceEngine
from exo.download.hf.hf_shard_download import HFShardDownloader
from exo.inference.inference_engine import InferenceEngine
from exo.download.new_shard_download import NewShardDownloader
from exo.inference.shard import Shard
from exo.helpers import DEBUG
import os
Expand Down Expand Up @@ -44,13 +44,13 @@ async def test_inference_engine(inference_engine_1: InferenceEngine, inference_e
assert np.array_equal(next_resp_full, resp4)


asyncio.run(test_inference_engine(MLXDynamicShardInferenceEngine(HFShardDownloader()), MLXDynamicShardInferenceEngine(HFShardDownloader()), "llama-3.2-1b", 16))
asyncio.run(test_inference_engine(MLXDynamicShardInferenceEngine(NewShardDownloader()), MLXDynamicShardInferenceEngine(NewShardDownloader()), "llama-3.2-1b", 16))

if os.getenv("RUN_TINYGRAD", default="0") == "1":
import tinygrad
import os
from exo.inference.tinygrad.inference import TinygradDynamicShardInferenceEngine
tinygrad.helpers.DEBUG.value = int(os.getenv("TINYGRAD_DEBUG", default="0"))
asyncio.run(
test_inference_engine(TinygradDynamicShardInferenceEngine(HFShardDownloader()), TinygradDynamicShardInferenceEngine(HFShardDownloader()), "llama-3-8b", 32)
test_inference_engine(TinygradDynamicShardInferenceEngine(NewShardDownloader()), TinygradDynamicShardInferenceEngine(NewShardDownloader()), "llama-3-8b", 32)
)
50 changes: 0 additions & 50 deletions extra/download_hf.py

This file was deleted.

26 changes: 0 additions & 26 deletions test/test_hf.py

This file was deleted.

0 comments on commit 3c7bd48

Please sign in to comment.