Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Instruction-tuning Support #196
base: main
Are you sure you want to change the base?
Instruction-tuning Support #196
Changes from 57 commits
59f0191
8b60a83
ba2f65c
47e71c3
3303147
0c6bbf5
32f5756
482f7af
1d72770
0bd9bfa
ed2f4ce
6e24ea2
6e716b4
a0376a6
70dc498
242e429
bddcf8b
f86b6ed
7632a02
15719a3
ab0f34c
0a545ca
c6d0a61
0c52856
12c74bc
fc7bec1
25fdcd7
01109e2
7148e1e
75611dd
1f36d64
9921ed3
0f49355
bf2f1a3
99e7ac3
76b34ab
2f4bdb2
9840e0a
3906845
cc57125
603b367
78f4d03
8372b21
c8ba69c
60e9894
b0c69a9
d041900
3912e36
cc4eef7
00a35ee
009bb8a
a47dc8c
705101c
c399b94
483ea83
4ea1d76
3945426
4d7e53d
eee2bac
4f53f0c
ed50d2f
d5867a4
94d89cb
42cf6ce
d98a26a
d95bd46
c6b0e4c
b9fbcec
6538072
2748887
72ed828
6594633
66f0bea
0daec5b
125311f
9cbc8f3
b121eea
396aba5
8416c9d
b08f02f
eb658c9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so basically we represent the special token by at least on of the original tokens in the vocabulary?
For example, assuming "spec_tok_1" is supposed to be a special token, it gets tokenized to e.g.,
["spec", "_", "tok", "_", "1"]
? Since it has been added to the Trie, we therefore still know that it is a special token but during training and inference the special token would still be represented by a 5 token sequence and therefore the embedding matrix can remain unchanged, right?What happens if the special token cannot be represented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite.
Given
spec_tok_1
as a special token, which is part of the trie and given the text to tokenize beingHi there spec_tok_1!
:First, the split method of the trie is used to extract all special tokens. In our case, the split would look like this:
["Hi there", "spec_tok_1", "!"]
, then all strings that are not part of the trie, i.e., the normal tokens, are tokenized leading to e.g.["Hi", "there", "spec_tok_1", "!"]