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

issues when run disinformation #1474

Closed
lumosity4tpj opened this issue Apr 11, 2023 · 2 comments
Closed

issues when run disinformation #1474

lumosity4tpj opened this issue Apr 11, 2023 · 2 comments

Comments

@lumosity4tpj
Copy link

when I run the disinformation like run_specs.conf#L538-L540, I have two issues:

  • capability=reiterationraise helm.benchmark.executor.ExecutorError: HuggingFace error: num_return_sequences has to be 1, but is 5 when doing greedy search. so the settings don't match, this problem also occurs when run real_toxicity_prompts.
  • capability=wedgingraise ValueError: More than one stop sequence is not supported. I find this to define stop_sequence as a list of two lengths, but this only allows one length.

When I looked at the corresponding references this this I still wondered how to solve these problems.

@lumosity4tpj
Copy link
Author

when I run the disinformation like run_specs.conf#L538-L540, I have two issues:

  • capability=reiterationraise helm.benchmark.executor.ExecutorError: HuggingFace error: num_return_sequences has to be 1, but is 5 when doing greedy search. so the settings don't match, this problem also occurs when run real_toxicity_prompts.
  • capability=wedgingraise ValueError: More than one stop sequence is not supported. I find this to define stop_sequence as a list of two lengths, but this only allows one length.

When I looked at the corresponding references this this I still wondered how to solve these problems.

  • For the first point, I'm sorry that it was caused by my mistake in choosing the wrong generate mode of huggingface, so it is not a problem;
  • For the second point, I think that if the length>1, it should be optimized to not pass the stop_sequence as eos_token, but should return the result when the maximum length or the eos of the original tokenizer is reached, and judge whether to truncate outside the model.generate. Is the reason we don't do this because we only want stop sentence as eos and ignore the original tokenizer's eos?
  • Moreover, I found that some tokenizers will tokenize stop_sequence (length==1) tokenize into two ids, then this will report an error, which can also be solved by the above method.

If you would give me some answers, I would really appreciate it

@yifanmai
Copy link
Collaborator

yifanmai commented Aug 8, 2024

This looks like a duplicate of #1501 which was fixed in #1892 i.e. HuggingFaceClient failing if the stop sequence is longer than one token.

@yifanmai yifanmai closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants