diff --git a/python/sglang/jit_kernel/flash_attention.py b/python/sglang/jit_kernel/flash_attention.py index 633863d0a..79a9140ae 100644 --- a/python/sglang/jit_kernel/flash_attention.py +++ b/python/sglang/jit_kernel/flash_attention.py @@ -4,8 +4,6 @@ import torch from .flash_attention_v3 import flash_attn_varlen_func as fa3_flash_attn_varlen_func from .flash_attention_v3 import flash_attn_with_kvcache as fa3_flash_attn_with_kvcache -from .flash_attention_v4 import flash_attn_varlen_func as fa4_flash_attn_varlen_func -from .flash_attention_v4 import flash_attn_with_kvcache as fa4_flash_attn_with_kvcache def flash_attn_with_kvcache( @@ -168,6 +166,10 @@ def flash_attn_with_kvcache( sinks=sinks, ) elif ver == 4: + from .flash_attention_v4 import ( + flash_attn_with_kvcache as fa4_flash_attn_with_kvcache, + ) + return fa4_flash_attn_with_kvcache( q, k_cache, @@ -260,6 +262,10 @@ def flash_attn_varlen_func( sinks=sinks, ) elif ver == 4: + from .flash_attention_v4 import ( + flash_attn_varlen_func as fa4_flash_attn_varlen_func, + ) + return fa4_flash_attn_varlen_func( q, k, diff --git a/python/sglang/srt/model_loader/weight_utils.py b/python/sglang/srt/model_loader/weight_utils.py index ef672c5c0..d978eefdf 100644 --- a/python/sglang/srt/model_loader/weight_utils.py +++ b/python/sglang/srt/model_loader/weight_utils.py @@ -551,9 +551,9 @@ def download_safetensors_index_file_from_hf( # If file not found on remote or locally, we should not fail since # only some models will have index_file. except huggingface_hub.utils.EntryNotFoundError: - logger.info("No %s found in remote.", index_file) + logger.debug("No %s found in remote.", index_file) except huggingface_hub.utils.LocalEntryNotFoundError: - logger.info("No %s found in local cache.", index_file) + logger.debug("No %s found in local cache.", index_file) # For models like Mistral-7B-v0.3, there are both sharded diff --git a/python/sglang/srt/utils/numa_utils.py b/python/sglang/srt/utils/numa_utils.py index 40e69aa9f..8d145cd41 100644 --- a/python/sglang/srt/utils/numa_utils.py +++ b/python/sglang/srt/utils/numa_utils.py @@ -56,7 +56,7 @@ def _mp_set_executable(executable: str, debug_str: str): old_executable = os.fsdecode(multiprocessing.spawn.get_executable()) multiprocessing.spawn.set_executable(executable) - logger.info(f"mp.set_executable {old_executable} -> {executable} ({debug_str})") + logger.debug(f"mp.set_executable {old_executable} -> {executable} ({debug_str})") try: yield finally: @@ -64,7 +64,7 @@ def _mp_set_executable(executable: str, debug_str: str): os.fsdecode(multiprocessing.spawn.get_executable()) == executable ), f"{multiprocessing.spawn.get_executable()=}" multiprocessing.spawn.set_executable(old_executable) - logger.info(f"mp.set_executable revert to {old_executable}") + logger.debug(f"mp.set_executable revert to {old_executable}") def get_numa_node_if_available(server_args: ServerArgs, gpu_id: int) -> Optional[int]: