THUDM / THUDM/slime

[Question] 'Namespace' object has no attribute 'post_self_attn_layernorm'

Open
#1,656 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Python
Stars
8.5k
Forks
1.3k
Avg merge
5h 36m
Merged PRs (30d)
22

Description

Your Question

commit hash: bd70add6ab27e773294081fd260888f003984146

slime/slime_plugins/models/glm4.py", line 11, in get_glm_spec
(pid=35379, ip=[fdbd:dccd:cdc2:12c8:0:1c3::])     post_self_attn_layernorm=args.post_self_attn_layernorm,
(pid=35379, ip=[fdbd:dccd:cdc2:12c8:0:1c3::])                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(pid=35379, ip=[fdbd:dccd:cdc2:12c8:0:1c3::]) AttributeError: 'Namespace' object has no attribute 'post_self_attn_layernorm'
(pid=35379, ip=[fdbd:dccd:cdc2:12c8:0:1c3::]) 2026-03-02 14:16:37,933   ERROR worker.py:961 -- MEGAVISION_PREFIX: Traceback (most recent call last):  File "python/ray/_raylet.pyx", line 1979, in ray._raylet.execute_task  File "python/ray/_raylet.pyx", line 2087, in ray._raylet.execute_task  File "python/ray/_raylet.pyx", line 1986, in ray._raylet.execute_task  File "python/ray/_raylet.pyx", line 1920, in ray._raylet.execute_task.function_executor  File "/opt/pyenv/versions/3.12.12/lib/python3.12/site-packages/ray/_private/function_manager.py", line 687, in actor_method_executor    return method(__ray_actor, *args, **kwargs)           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/opt/pyenv/versions/3.12.12/lib/python3.12/site-packages/ray/util/tracing/tracing_helper.py", line 463, in _resume_span    return method(self, *_args, **_kwargs)           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/sy/slime/slime/utils/timer.py", line 97, in wrapper    return fn(*args, **kwargs)           ^^^^^^^^^^^^^^^^^^^  File "/sy/slime/slime/backends/megatron_utils/actor.py", line 91, in init    (self.model, self.optimizer, self.opt_param_scheduler, loaded_rollout_id) = initialize_model_and_optimizer(                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "sy/slime/slime/backends/megatron_utils/model.py", line 773, in initialize_model_and_optimizer    model, optimizer, opt_param_scheduler = setup_model_and_optimizer(args, role)                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "sy/slime/slime/backends/megatron_utils/model.py", line 108, in setup_model_and_optimizer    model = get_model(            ^^^^^^^^^^  File "/opt/tiger/Megatron-LM/megatron/training/training.py", line 997, in get_model    model = build_model()            ^^^^^^^^^^^^^  File "/opt/tiger/Megatron-LM/megatron/training/training.py", line 989, in build_model    model = model_provider_func(pre_process=pre_process, post_process=post_process)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/slime/slime/backends/megatron_utils/model_provider.py", line 215, in wrapped_provider    model = original_provider(pre_process=pre_process, post_process=post_process, vp_stage=vp_stage)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/slime/slime/backends/megatron_utils/model_provider.py", line 123, in model_provider    transformer_layer_spec = transformer_layer_spec(args, config, vp_stage)                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "slime/slime_plugins/models/glm4.py", line 11, in get_glm_spec    post_self_attn_layernorm=args.post_self_attn_layernorm,                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AttributeError: 'Namespace' object has no attribute 'post_self_attn_layernorm'
What I've Tried
  • I read the Quick start and follow the guide
  • since the ray is running in company paltform, and run ray job submit directly and not kill and start
Environment (if relevant)
  • slime version:bd70add6ab27e773294081fd260888f003984146
  • Python version: 3.12.12
  • PyTorch version:2.91
  • CUDA/ROCm version:2.9.1+cu129
  • GPU type and count:H100 8
  • OS:Linux n124-105-135 5.15.120.bsk.6-amd64 #5.15.120.bsk.6 SMP Debian 5.15.120.bsk.6 Fri Apr 19 02:51:48 UT x86_64 GNU/Linux
Additional Context

No response

Pre-submission Checklist

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at slime/slime_plugins/models/glm4.py in get_glm_spec, then trace how the Namespace is built through slime/backends/megatron_utils/model_provider.py and the model setup path. Reproduce the reported failure at commit bd70add6ab27e773294081fd260888f003984146 and determine how the missing argument is expected to be supplied. Done means GLM4 model initialization reaches completion without this AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.