Skip to content

Commit

Permalink
Import turbomind in gradio server only when it is needed (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
AllentDan authored Aug 25, 2023
1 parent 4279d8c commit 59f8e67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmdeploy/serve/async_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from contextlib import contextmanager
from typing import Literal, Optional

from lmdeploy import turbomind as tm
from lmdeploy.model import MODELS, BaseModel


Expand All @@ -30,6 +29,7 @@ class AsyncEngine:
"""

def __init__(self, model_path, instance_num=32, tp=1) -> None:
from lmdeploy import turbomind as tm
from lmdeploy.turbomind.tokenizer import Tokenizer
tokenizer_model_path = osp.join(model_path, 'triton_models',
'tokenizer')
Expand Down

0 comments on commit 59f8e67

Please sign in to comment.