Repository navigation
sglang环境 运行错误 #29
Description
根据步骤拉取镜像和安装transformer-5.0.0rc1
运行 python3 -m sglang.launch_server 后会报错:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/sgl-workspace/sglang/python/sglang/launch_server.py", line 29, in
server_args = prepare_server_args(sys.argv[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/server_args.py", line 4991, in prepare_server_args
return ServerArgs.from_cli_args(raw_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/server_args.py", line 4482, in from_cli_args
return cls(**{attr: getattr(args, attr) for attr in attrs})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 314, in init
File "/sgl-workspace/sglang/python/sglang/srt/server_args.py", line 671, in post_init
self._handle_gpu_memory_settings(gpu_mem)
File "/sgl-workspace/sglang/python/sglang/srt/server_args.py", line 954, in _handle_gpu_memory_settings
model_config = self.get_model_config()
^^^^^^^^^^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/server_args.py", line 4496, in get_model_config
self.model_config = ModelConfig.from_server_args(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/configs/model_config.py", line 241, in from_server_args
return ModelConfig(
^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/configs/model_config.py", line 126, in init
self.hf_config = get_config(
^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/utils/common.py", line 3169, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/utils/hf_transformers_utils.py", line 278, in get_config
raise e
File "/sgl-workspace/sglang/python/sglang/srt/utils/hf_transformers_utils.py", line 273, in get_config
config = AutoConfig.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/transformers/src/transformers/models/auto/configuration_auto.py", line 1315, in from_pretrained
trust_remote_code = resolve_trust_remote_code(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/transformers/src/transformers/dynamic_module_utils.py", line 749, in resolve_trust_remote_code
raise ValueError(
ValueError: The repository zai-org/GLM-ASR-Nano-2512 contains custom code which must be executed to correctly load the model. You can inspect the repository content at /sgl-workspace/sglang/zai-org/GLM-ASR-Nano-2512 .
You can inspect the repository content at https://hf.co/zai-org/GLM-ASR-Nano-2512.
Please pass the argument trust_remote_code=True to allow custom code to be run.
Activity
QJYJH commentedon Dec 31, 2025
我现在安装了transformers-5.0.0.dev0
新的错误:
[2025-12-31 05:18:08] Init torch distributed ends. mem usage=0.00 GB
[2025-12-31 05:18:08] MOE_RUNNER_BACKEND is not initialized, the backend will be automatically selected
[2025-12-31 05:18:11] Scheduler hit an exception: Traceback (most recent call last):
File "/sgl-workspace/sglang/python/sglang/srt/managers/scheduler.py", line 2905, in run_scheduler_process
scheduler = Scheduler(
^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/managers/scheduler.py", line 333, in init
self.init_model_worker()
File "/sgl-workspace/sglang/python/sglang/srt/managers/scheduler.py", line 471, in init_model_worker
self.tp_worker = TpModelWorker(
^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/managers/tp_worker.py", line 253, in init
self._model_runner = ModelRunner(
^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/model_executor/model_runner.py", line 355, in init
self.initialize(min_per_gpu_memory)
File "/sgl-workspace/sglang/python/sglang/srt/model_executor/model_runner.py", line 398, in initialize
compute_initial_expert_location_metadata(
File "/sgl-workspace/sglang/python/sglang/srt/eplb/expert_location.py", line 541, in compute_initial_expert_location_metadata
return ExpertLocationMetadata.init_trivial(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/eplb/expert_location.py", line 92, in init_trivial
common = ExpertLocationMetadata._init_common(server_args, model_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/eplb/expert_location.py", line 193, in _init_common
ModelConfigForExpertLocation.from_model_config(model_config)
File "/sgl-workspace/sglang/python/sglang/srt/eplb/expert_location.py", line 525, in from_model_config
model_class, _ = get_model_architecture(model_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/model_loader/utils.py", line 105, in get_model_architecture
architectures = resolve_transformers_arch(model_config, architectures)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sgl-workspace/sglang/python/sglang/srt/model_loader/utils.py", line 45, in resolve_transformers_arch
name: get_class_from_dynamic_module(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/transformers/dynamic_module_utils.py", line 583, in get_class_from_dynamic_module
return get_class_in_module(class_name, final_module, force_reload=force_download)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/dist-packages/transformers/dynamic_module_utils.py", line 309, in get_class_in_module
module_spec.loader.exec_module(module)
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/root/.cache/huggingface/modules/transformers_modules/GLM_hyphen_ASR_hyphen_Nano_hyphen_2512/modeling_glmasr.py", line 9, in
from .modeling_audio import WhisperSpecialEncoder
File "/root/.cache/huggingface/modules/transformers_modules/GLM_hyphen_ASR_hyphen_Nano_hyphen_2512/modeling_audio.py", line 7, in
from transformers.models.whisper.modeling_whisper import WhisperEncoder, WhisperEncoderLayer, WhisperFlashAttention2
ImportError: cannot import name 'WhisperFlashAttention2' from 'transformers.models.whisper.modeling_whisper' (/usr/local/lib/python3.12/dist-packages/transformers/models/whisper/modeling_whisper.py)
[2025-12-31 05:18:11] Received sigquit from a child process. It usually means the child failed.
Killed