From a223402ffb7c4c4c8ec0a86685836dcc1cee3bf6 Mon Sep 17 00:00:00 2001 From: alisonshao <54658187+alisonshao@users.noreply.github.com> Date: Wed, 26 Nov 2025 14:52:46 -0800 Subject: [PATCH] Add adapter_model.safetensors to corruption validation for LoRA (#14022) --- python/sglang/srt/model_loader/weight_utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/model_loader/weight_utils.py b/python/sglang/srt/model_loader/weight_utils.py index a534be5a6..4c236f715 100644 --- a/python/sglang/srt/model_loader/weight_utils.py +++ b/python/sglang/srt/model_loader/weight_utils.py @@ -393,7 +393,12 @@ def find_local_hf_snapshot_dir( for f in local_weight_files: base_name = os.path.basename(f) # Check if this is a single model file (not sharded) - if base_name in ["model.safetensors", "pytorch_model.safetensors"]: + # Include adapter_model.safetensors for LoRA adapters + if base_name in [ + "model.safetensors", + "pytorch_model.safetensors", + "adapter_model.safetensors", + ]: if not _validate_safetensors_file(f): logger.info( "Corrupted model file %s for %s. "