Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vllm/lora/layers/fused_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def wrapper(*args, **kwargs):
self.max_loras,
self.adapter_enabled,
expert_map,
naive_block_assignment,
naive_block_assignment=naive_block_assignment,
)

moe_state_dict["sorted_token_ids_lora"] = sorted_token_ids_lora
Expand Down
1 change: 1 addition & 0 deletions vllm/lora/punica_wrapper/punica_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ def moe_lora_align_block_size(
adapter_enabled: torch.Tensor,
expert_map: torch.Tensor | None = None,
pad_sorted_ids: bool = False,
naive_block_assignment: bool = False,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This bug was caused by passing a positional argument that was misinterpreted. To prevent this class of bugs, consider making optional boolean flags keyword-only by adding a * in the function signature before them (e.g., before pad_sorted_ids). This would enforce keyword arguments for all subsequent parameters and would have raised a TypeError for the original buggy call.

) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]:
"""
Aligns tokens and experts into block-sized chunks for LoRA-based
Expand Down