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
5ed3505d
"vscode:/vscode.git/clone" did not exist on "f007cd060bc5e05eedd8be2e906dee207bd0979e"
Unverified
Commit
5ed3505d
authored
Jul 09, 2024
by
Woosuk Kwon
Committed by
GitHub
Jul 09, 2024
Browse files
[Bugfix][TPU] Add prompt adapter methods to TPUExecutor (#6279)
parent
da78caec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
6 deletions
+25
-6
vllm/executor/tpu_executor.py
vllm/executor/tpu_executor.py
+25
-6
No files found.
vllm/executor/tpu_executor.py
View file @
5ed3505d
...
...
@@ -81,8 +81,7 @@ class TPUExecutor(ExecutorBase):
def
determine_num_available_blocks
(
self
)
->
Tuple
[
int
,
int
]:
"""Determine the number of available KV blocks by invoking the
underlying worker.
"""
underlying worker."""
return
self
.
driver_worker
.
determine_num_available_blocks
()
def
execute_model
(
...
...
@@ -93,16 +92,36 @@ class TPUExecutor(ExecutorBase):
return
output
def
add_lora
(
self
,
lora_request
:
LoRARequest
)
->
bool
:
raise
NotImplementedError
(
"LoRA is not implemented for TPU backend."
)
raise
NotImplementedError
(
"LoRA is currently not supported by the TPU backend."
)
def
remove_lora
(
self
,
lora_id
:
int
)
->
bool
:
raise
NotImplementedError
(
"LoRA is not implemented for TPU backend."
)
raise
NotImplementedError
(
"LoRA is currently not supported by the TPU backend."
)
def
pin_lora
(
self
,
lora_id
:
int
)
->
bool
:
raise
NotImplementedError
(
"LoRA is not implemented for TPU backend."
)
raise
NotImplementedError
(
"LoRA is currently not supported by the TPU backend."
)
def
list_loras
(
self
)
->
Set
[
int
]:
raise
NotImplementedError
(
"LoRA is not implemented for TPU backend."
)
raise
NotImplementedError
(
"LoRA is currently not supported by the TPU backend."
)
def
add_prompt_adapter
(
self
,
prompt_adapter_request
)
->
bool
:
raise
NotImplementedError
(
"Soft prompt is currently not supported by the TPU backend."
)
def
remove_prompt_adapter
(
self
,
prompt_adapter_id
:
int
)
->
bool
:
raise
NotImplementedError
(
"Soft prompt is currently not supported by the TPU backend."
)
def
pin_prompt_adapter
(
self
,
prompt_adapter_id
:
int
)
->
bool
:
raise
NotImplementedError
(
"Soft prompt is currently not supported by the TPU backend."
)
def
list_prompt_adapters
(
self
)
->
Set
[
int
]:
raise
NotImplementedError
(
"Soft prompt is currently not supported by the TPU backend."
)
def
check_health
(
self
)
->
None
:
# TPUExecutor will always be healthy as long as it's running.
...
...
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