[Bugfix][TPU] Add prompt adapter methods to TPUExecutor (#6279)
This commit is contained in:
parent
da78caecfa
commit
5ed3505d82
@ -81,8 +81,7 @@ class TPUExecutor(ExecutorBase):
|
|||||||
|
|
||||||
def determine_num_available_blocks(self) -> Tuple[int, int]:
|
def determine_num_available_blocks(self) -> Tuple[int, int]:
|
||||||
"""Determine the number of available KV blocks by invoking the
|
"""Determine the number of available KV blocks by invoking the
|
||||||
underlying worker.
|
underlying worker."""
|
||||||
"""
|
|
||||||
return self.driver_worker.determine_num_available_blocks()
|
return self.driver_worker.determine_num_available_blocks()
|
||||||
|
|
||||||
def execute_model(
|
def execute_model(
|
||||||
@ -93,16 +92,36 @@ class TPUExecutor(ExecutorBase):
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
def add_lora(self, lora_request: LoRARequest) -> bool:
|
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:
|
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:
|
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]:
|
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:
|
def check_health(self) -> None:
|
||||||
# TPUExecutor will always be healthy as long as it's running.
|
# TPUExecutor will always be healthy as long as it's running.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user