Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
89e3c4e9
Unverified
Commit
89e3c4e9
authored
Jul 17, 2025
by
wangxiyuan
Committed by
GitHub
Jul 17, 2025
Browse files
[Misc] Avoid unnecessary import (#21106)
Signed-off-by:
wangxiyuan
<
wangxiyuan1007@gmail.com
>
parent
fe8a2c54
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
vllm/entrypoints/openai/speech_to_text.py
vllm/entrypoints/openai/speech_to_text.py
+1
-1
vllm/lora/utils.py
vllm/lora/utils.py
+12
-8
No files found.
vllm/entrypoints/openai/speech_to_text.py
View file @
89e3c4e9
...
...
@@ -24,7 +24,6 @@ from vllm.entrypoints.openai.serving_engine import (OpenAIServing,
from
vllm.entrypoints.openai.serving_models
import
OpenAIServingModels
from
vllm.inputs.data
import
PromptType
from
vllm.logger
import
init_logger
from
vllm.model_executor.model_loader
import
get_model_cls
from
vllm.model_executor.models
import
SupportsTranscription
from
vllm.outputs
import
RequestOutput
from
vllm.utils
import
PlaceholderModule
...
...
@@ -78,6 +77,7 @@ class OpenAISpeechToText(OpenAIServing):
@
cached_property
def
model_cls
(
self
)
->
type
[
SupportsTranscription
]:
from
vllm.model_executor.model_loader
import
get_model_cls
model_cls
=
get_model_cls
(
self
.
model_config
)
return
cast
(
type
[
SupportsTranscription
],
model_cls
)
...
...
vllm/lora/utils.py
View file @
89e3c4e9
...
...
@@ -2,7 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import
os
from
typing
import
Optional
,
Union
from
typing
import
TYPE_CHECKING
,
Optional
,
Union
import
huggingface_hub
import
regex
as
re
...
...
@@ -31,10 +31,14 @@ from vllm.lora.layers import (BaseLayerWithLoRA, ColumnParallelLinearWithLoRA,
RowParallelLinearWithLoRA
,
VocabParallelEmbeddingWithLoRA
)
from
vllm.model_executor.layers.linear
import
LinearBase
# yapf: enable
from
vllm.model_executor.layers.logits_processor
import
LogitsProcessor
from
vllm.model_executor.layers.vocab_parallel_embedding
import
ParallelLMHead
from
vllm.model_executor.models.utils
import
WeightsMapper
if
TYPE_CHECKING
:
from
vllm.model_executor.layers.logits_processor
import
LogitsProcessor
from
vllm.model_executor.layers.vocab_parallel_embedding
import
(
ParallelLMHead
)
from
vllm.model_executor.models.utils
import
WeightsMapper
logger
=
init_logger
(
__name__
)
...
...
@@ -75,8 +79,8 @@ def from_layer(layer: nn.Module,
def
from_layer_logits_processor
(
layer
:
LogitsProcessor
,
lm_head
:
ParallelLMHead
,
layer
:
"
LogitsProcessor
"
,
lm_head
:
"
ParallelLMHead
"
,
max_loras
:
int
,
lora_config
:
LoRAConfig
,
model_config
:
Optional
[
PretrainedConfig
]
=
None
,
...
...
@@ -99,7 +103,7 @@ def replace_submodule(model: nn.Module, module_name: str,
def
parse_fine_tuned_lora_name
(
name
:
str
,
weights_mapper
:
Optional
[
WeightsMapper
]
=
None
weights_mapper
:
Optional
[
"
WeightsMapper
"
]
=
None
)
->
tuple
[
str
,
bool
,
bool
]:
"""Parse the name of lora weights.
...
...
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