Skip to content

Commit

Permalink
🎨 fix format
Browse files Browse the repository at this point in the history
Signed-off-by: Prashant Gupta <[email protected]>
  • Loading branch information
prashantgupta24 committed Jun 27, 2024
1 parent cf8b27e commit 95d1306
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion vllm/engine/llm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ def remove_lora(self, lora_id: int) -> bool:

def list_loras(self) -> Set[int]:
return self.model_executor.list_loras()

def pin_lora(self, lora_id: int) -> bool:
return self.model_executor.pin_lora(lora_id)

Expand Down
2 changes: 1 addition & 1 deletion vllm/lora/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from vllm.lora.utils import (from_layer, from_layer_logits_processor,
parse_fine_tuned_lora_name, replace_submodule)
from vllm.model_executor.models.interfaces import SupportsLoRA
from vllm.utils import LRUCache, is_pin_memory_available
from vllm.utils import is_pin_memory_available

logger = init_logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion vllm/prompt_adapter/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def from_local_checkpoint(
device: str = "cuda",
dtype: Optional[torch.dtype] = None) -> "PromptAdapterModel":
from peft.utils import load_peft_weights

adapters_weights = load_peft_weights(adapter_model_path, device)
prompt_embedding = adapters_weights["prompt_embeddings"].to(dtype)
num_virtual_tokens = prompt_embedding.shape[0]
Expand Down
5 changes: 3 additions & 2 deletions vllm/worker/embedding_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ def execute_model(
if self.prompt_adapter_config:
assert model_input.prompt_adapter_requests is not None
assert model_input.prompt_adapter_mapping is not None
self.set_active_prompt_adapters(model_input.prompt_adapter_requests,
model_input.prompt_adapter_mapping)
self.set_active_prompt_adapters(
model_input.prompt_adapter_requests,
model_input.prompt_adapter_mapping)

# Currently cuda graph is only supported by the decode phase.
assert model_input.attn_metadata is not None
Expand Down

0 comments on commit 95d1306

Please sign in to comment.