-
Notifications
You must be signed in to change notification settings - Fork 26
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
BPE error #1
Comments
I'm getting this too. And it, or something at least, is also resulting in incorrect output—looking at
🤔 |
Hi! It's because of "tokenizer.encode and tokenizer.decode of the GPT-2". test_str = "hello world."
print("test_str = ", test_str)
out = enc.encode(test_str)
print("out = ", out)
decode_str = enc.decode(out)
print("decode_str = ", decode_str)
print("enc.encode(decode_str) = ", enc.encode(decode_str)) output: test_str = hello world.
out = [23748, 995, 13]
decode_str = hello world.
enc.encode(decode_str) = [220, 23748, 995, 13] An additional "220" is added. So you should add def decode_huffman(model, enc, text, context, bits_per_word, device='cuda'):
# inp is a list of token indices
# context is a list of token indices
# print("start decode_huffman")
inp = enc.encode(text)
inp = inp[1:] |
I think this should be reopened; this might be a good workaround but the bug still exists. |
It's because of "tokenizer.encode and tokenizer.decode of the GPT-2". |
It happens in run_single.py too though—the example included in the
repository.
…On Mon, Sep 9, 2019 at 10:00 PM ruidongtd ***@***.***> wrote:
I think this should be reopened; this might be a good workaround but the
bug still exists.
It's because of "tokenizer.encode and tokenizer.decode of the GPT-2".
It has nothing to do with steganography.
you should read code.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AAFHZUK5NPTDGOINFDTNGGTQI35VHA5CNFSM4IUPHIT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6JSBQY#issuecomment-529735875>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFHZUMMAMXS5XJTWIQWMWDQI35VHANCNFSM4IUPHITQ>
.
|
@ruidongtd make sure you have correct package version. I have got the correct result when run
And the my result
|
Hi, I tried to install the requirements but the torch 1.0.1 is unavailable for 3.10 version of python. If 1.0.1 torch is unavailable to install with pip, can I know what are the ways to download it? Thank you in advance! |
I always got "Unable to fix BPE error". Why?
The text was updated successfully, but these errors were encountered: