Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
gongy committed Jan 12, 2024
1 parent ffa5c43 commit 9d25954
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 2 additions & 3 deletions 06_gpu_and_ml/vllm_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

import time

from modal import Image, Stub, method, Secret

from modal import Image, Stub, method

vllm_image = (
Image.from_registry(
Expand All @@ -25,9 +24,9 @@
)
class Model:
def __init__(self, model_name: str):
import torch
from vllm.engine.arg_utils import AsyncEngineArgs
from vllm.engine.async_llm_engine import AsyncLLMEngine
import torch

n_gpus = torch.cuda.device_count()

Expand Down
2 changes: 0 additions & 2 deletions 06_gpu_and_ml/vllm_generic_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@
secrets=[hf_secret],
gpu=modal.gpu.A100(memory=40),
volumes={"/hf-cache": model_vol},
allow_background_volume_commits=True,
)

Model_80GB = Model.with_options(
secrets=[hf_secret],
gpu=modal.gpu.A100(memory=80),
volumes={"/hf-cache": model_vol},
allow_background_volume_commits=True,
)

mistral7b = Model_40GB(model_name="mistralai/Mistral-7B-Instruct-v0.2")
Expand Down

0 comments on commit 9d25954

Please sign in to comment.