Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kfertakis opened this issue Nov 29, 2023 · 0 comments
Open

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

kfertakis opened this issue Nov 29, 2023 · 0 comments

Comments

@kfertakis
Copy link
Contributor

kfertakis commented Nov 29, 2023

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.

@kfertakis kfertakis changed the title origin_inputs size problem for bloom,pangu models origin_inputs size problem for llama,pangu models Nov 29, 2023
@kfertakis kfertakis changed the title origin_inputs size problem for llama,pangu models origin_inputs size problem for llama,pangu,baichuan models Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant