Skip to content
Merged
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
11 changes: 11 additions & 0 deletions python/sglang/srt/server_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -4297,6 +4297,17 @@ def check_lora_server_args(self):
), "If 'all' is specified in --lora-target-modules, it should be the only module specified."
self.lora_target_modules = set(SUPPORTED_LORA_TARGET_MODULES)

# When using the chunked SGMV backend, skip embedding / lm_head layers for now,
# since it does not support these yet (TODO: implement embedding / lm_head support)
if self.lora_backend == "csgmv":
logger.warning(
"LoRA backend 'csgmv' does not yet support embedding or lm_head layers; "
"dropping 'embed_tokens' and 'lm_head' from --lora-target-modules=all. "
"To apply LoRA to these, use --lora-backend triton."
)
self.lora_target_modules.discard("embed_tokens")
self.lora_target_modules.discard("lm_head")

# Ensure sufficient information is provided for LoRA initialization.
assert self.lora_paths or (
self.max_lora_rank and self.lora_target_modules
Expand Down
Loading