Skip to content

Commit

Permalink
fix vLLM example (make dirs)
Browse files Browse the repository at this point in the history
  • Loading branch information
aksh-at committed Sep 24, 2023
1 parent 9f717ad commit c353752
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions 06_gpu_and_ml/vllm_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from modal import Image, Secret, Stub, method

MODEL_DIR = "/model"

# ## Define a container image
#
Expand All @@ -45,15 +46,15 @@
def download_model_to_folder():
from huggingface_hub import snapshot_download

os.makedirs(MODEL_DIR, exist_ok=True)

snapshot_download(
"meta-llama/Llama-2-13b-chat-hf",
local_dir="/model",
local_dir=MODEL_DIR,
token=os.environ["HUGGINGFACE_TOKEN"],
)


MODEL_DIR = "/model"

# ### Image definition
# We’ll start from a Dockerhub image recommended by `vLLM`, upgrade the older
# version of `torch` to a new one specifically built for CUDA 11.8. Next, we install `vLLM` from source to get the latest updates.
Expand Down

0 comments on commit c353752

Please sign in to comment.