-
Notifications
You must be signed in to change notification settings - Fork 22
dynamic scoring for LM #188
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
9c51d9d
47dbd8c
769b9b8
b9fa354
45e563e
4b76ffb
25afba6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,6 +92,9 @@ def tokenize_string(self, string, side="src", is_train=False): | |
| kwargs = {"max_length": self.max_length, "truncation": True} | ||
| else: | ||
| kwargs = {} | ||
| string = string.replace(DefaultTokens.SEP, "\n").replace( | ||
| DefaultTokens.MASK_BEFORE, self.tokenizers[side].pad_token | ||
| ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't we handle it the same way for other tokenizers ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have only tested for that one (with eurollm) at this point; an error will be raised with the others. |
||
| tokens = self.tokenizers[side].encode(string, **kwargs) | ||
| return tokens | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.