Skip to content

origin_inputs size problem for llama,pangu,baichuan models  #41

Open
@kfertakis

Description

@kfertakis

Hi,

When trying to run either llama or pangu or baichuan models, I get the following error regarding the size of origin_inputs and seq_length configuration.

Traceback (most recent call last):
  File "~/mindrlhf/train.py", line 109, in <module>
    run_rlhf(args)
  File "~/mindrlhf/train.py", line 99, in run_rlhf
    trainer.make_experience(num_rollouts=ppo_config.num_rollouts)
  File "~/mindrlhf/mindrlhf/trainer/ppo_trainer.py", line 240, in make_experience
    samples, resposne_array, left_padding_prompt = self.generate(prompt_tensors)
  File "~/mindrlhf/mindrlhf/trainer/ppo_trainer.py", line 190, in generate
    outputs = self.ppo_model.policy_model.model.generate(input_ids_list, max_length=self.ppo_config.seq_length)
  File "~/venv/lib/python3.9/site-packages/mindformers/generation/text_generator.py", line 557, in generate
    output_ids = self._forward(
  File "~/venv/lib/python3.9/site-packages/mindformers/generation/text_generator.py", line 278, in _forward
    input_ids = self._pad_inputs_using_max_length(
  File "~/venv/lib/python3.9/site-packages/mindformers/generation/text_generator.py", line 179, in _pad_inputs_using_max_length
    raise ValueError(
ValueError: origin_inputs size is (1, 11000), you should increase the seq_length of the model 2048.

How should this be addressed? Thanks.

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