You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was looking at the code auditing it and I came across this.
But this does nothing since 29871 is the letter \ and 13 is n and character and it adds a '\n' to the string after.
So it makes me wonder if it works fine without this code anyways?
the token it adds is 1 or btw.
Llama adds this extra token when the first character is '\n', and this
compromises the stopping criteria, so we just remove it
if type(shared.tokenizer) is transformers.LlamaTokenizer and input_ids[0][0] == 29871:
input_ids = input_ids[:, 1:]
Is there an existing issue for this?
I have searched the existing issues
Reproduction
The code should be
if type(shared.tokenizer) is transformers.LlamaTokenizer and input_ids[0][1] == 29871:
input_ids = input_ids[:, 1:]
to remove the character.
Screenshot
No response
Logs
none
System Info
none
The text was updated successfully, but these errors were encountered:
Describe the bug
Was looking at the code auditing it and I came across this.
But this does nothing since 29871 is the letter \ and 13 is n and character and it adds a '
\n' to the string after.So it makes me wonder if it works fine without this code anyways?
the token it adds is 1 or
btw.Llama adds this extra token when the first character is '\n', and this
compromises the stopping criteria, so we just remove it
if type(shared.tokenizer) is transformers.LlamaTokenizer and input_ids[0][0] == 29871:
input_ids = input_ids[:, 1:]
Is there an existing issue for this?
Reproduction
The code should be
if type(shared.tokenizer) is transformers.LlamaTokenizer and input_ids[0][1] == 29871:
input_ids = input_ids[:, 1:]
to remove the character.
Screenshot
No response
Logs
System Info
The text was updated successfully, but these errors were encountered: