Skip to content

TypeError: GPTModel.forward() got an unexpected keyword argument 'mm_token_type_ids' #457

Description

@liubowei2003

请问跑qwen3.5的强化学习训练报错这个是什么意思?
TypeError: GPTModel.forward() got an unexpected keyword argument 'mm_token_type_ids'

具体:
Traceback (most recent call last):
File "/data_storage/zyf/liubowei/ROLL/examples/start_rlvr_vl_pipeline.py", line 34, in
main()
File "/data_storage/zyf/liubowei/ROLL/examples/start_rlvr_vl_pipeline.py", line 30, in main
pipeline.run()
File "/root/miniconda3/envs/roll/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 124, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/data_storage/zyf/liubowei/ROLL/roll/pipeline/rlvr/rlvr_vlm_pipeline.py", line 618, in run
ref_log_probs = self.reference.compute_log_probs(batch, blocking=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data_storage/zyf/liubowei/ROLL/roll/distributed/scheduler/decorator.py", line 243, in func
output = ray.get(output, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/roll/lib/python3.12/site-packages/ray/_private/auto_init_hook.py", line 22, in auto_init_wrapper
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/roll/lib/python3.12/site-packages/ray/_private/client_mode_hook.py", line 107, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/roll/lib/python3.12/site-packages/ray/_private/worker.py", line 2980, in get
values, debugger_breakpoint = worker.get_objects(
^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/roll/lib/python3.12/site-packages/ray/_private/worker.py", line 1023, in get_objects
raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(TypeError): ray::ActorWorker.compute_log_probs() (pid=1374343, ip=192.168.59.34, actor_id=f2413411da5c37162125efd201000000, repr=ActorWorker(reference-7-G7))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data_storage/zyf/liubowei/ROLL/roll/distributed/scheduler/decorator.py", line 308, in inner
raise e
File "/data_storage/zyf/liubowei/ROLL/roll/distributed/scheduler/decorator.py", line 296, in inner
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/data_storage/zyf/liubowei/ROLL/roll/pipeline/base_worker.py", line 144, in compute_log_probs
results: Dict[str, torch.Tensor] = self.strategy.forward_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data_storage/zyf/liubowei/ROLL/roll/distributed/strategy/megatron_strategy.py", line 209, in forward_step
losses_reduced: List[Dict[str, torch.Tensor]] = self.forward_backward_func(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/roll/lib/python3.12/site-packages/megatron/core/pipeline_parallel/schedules.py", line 686, in forward_backward_no_pipelining
output_tensor, num_tokens = forward_step(
^^^^^^^^^^^^^
File "/root/miniconda3/envs/roll/lib/python3.12/site-packages/megatron/core/pipeline_parallel/schedules.py", line 428, in forward_step
output_tensor, loss_func = forward_step_func(data_iterator, model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data_storage/zyf/liubowei/ROLL/roll/distributed/strategy/megatron_strategy.py", line 464, in inner_forward_step
output_tensor = model(
^^^^^^
File "/root/miniconda3/envs/roll/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1776, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/roll/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1787, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data_storage/zyf/liubowei/ROLL/mcore_adapter/src/mcore_adapter/models/qwen3_5/modeling_qwen3_5.py", line 315, in forward
return super().forward(
^^^^^^^^^^^^^^^^
TypeError: GPTModel.forward() got an unexpected keyword argument 'mm_token_type_ids'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions