Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
Qwen_lmdeploy
Commits
59f8e674
Unverified
Commit
59f8e674
authored
Aug 25, 2023
by
AllentDan
Committed by
GitHub
Aug 25, 2023
Browse files
Import turbomind in gradio server only when it is needed (#303)
parent
4279d8ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lmdeploy/serve/async_engine.py
lmdeploy/serve/async_engine.py
+1
-1
No files found.
lmdeploy/serve/async_engine.py
View file @
59f8e674
...
@@ -6,7 +6,6 @@ import random
...
@@ -6,7 +6,6 @@ import random
from
contextlib
import
contextmanager
from
contextlib
import
contextmanager
from
typing
import
Literal
,
Optional
from
typing
import
Literal
,
Optional
from
lmdeploy
import
turbomind
as
tm
from
lmdeploy.model
import
MODELS
,
BaseModel
from
lmdeploy.model
import
MODELS
,
BaseModel
...
@@ -30,6 +29,7 @@ class AsyncEngine:
...
@@ -30,6 +29,7 @@ class AsyncEngine:
"""
"""
def
__init__
(
self
,
model_path
,
instance_num
=
32
,
tp
=
1
)
->
None
:
def
__init__
(
self
,
model_path
,
instance_num
=
32
,
tp
=
1
)
->
None
:
from
lmdeploy
import
turbomind
as
tm
from
lmdeploy.turbomind.tokenizer
import
Tokenizer
from
lmdeploy.turbomind.tokenizer
import
Tokenizer
tokenizer_model_path
=
osp
.
join
(
model_path
,
'triton_models'
,
tokenizer_model_path
=
osp
.
join
(
model_path
,
'triton_models'
,
'tokenizer'
)
'tokenizer'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment