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

Documentation issue, tokenization_llama.py, legacy = True #25828

Closed
4 tasks
dpaleka opened this issue Aug 29, 2023 · 1 comment · Fixed by #25833
Closed
4 tasks

Documentation issue, tokenization_llama.py, legacy = True #25828

dpaleka opened this issue Aug 29, 2023 · 1 comment · Fixed by #25833

Comments

@dpaleka
Copy link

dpaleka commented Aug 29, 2023

System Info

v4.32.1

Who can help?

@ArthurZucker

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

The error message in tokenization_llama.py asks the user to provide a flag which does nothing:

if legacy is None:
logger.warning_once(
f"You are using the default legacy behaviour of the {self.__class__}. If you see this, DO NOT PANIC! This is"
" expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you."
" If you want to use the new behaviour, set `legacy=True`. This should only be set if you understand what it"
" means, and thouroughly read the reason why this was added as explained in"
" https://github.com/huggingface/transformers/pull/24565"
)
legacy = True
seems wrong:

(Or the documentation is faulty. Does legacy = True turn the legacy behavior on or off?)

Expected behavior

Not sure, but possibly, the error message should ask the user to set legacy=False to get the new behavior.

@ArthurZucker
Copy link
Collaborator

No, not everyone needs / should be using the new behaviour. legacy = True means True, I want to use legacy.
However there is indeed a type, legacy = False should be set for the new behaviour !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants