-
Notifications
You must be signed in to change notification settings - Fork 228
Enable loading ckpt for t0 finetuning #309
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
Open
Muennighoff
wants to merge
16
commits into
main
Choose a base branch
from
t0loading
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
90b8f46
Enable loading ckpt for t0 finetuning
Muennighoff abdd703
Swap decoder_is_inputs & segment_ids
Muennighoff 0fcb19c
Add prepend-space arg
Muennighoff 63daa46
Update tools/preprocess_data.py
Muennighoff 89460c0
Add helpers & set is_causal to true
Muennighoff fb8ecb8
Merge remote
Muennighoff a55d2fb
JSON helper scripts
Muennighoff 2dfe5d1
Remove unnec imports
Muennighoff ca740f1
Remove helper scripts
Muennighoff cb0313b
Avoid loading module when not loading optim
Muennighoff b62dcaf
Allow not using torch distributed
Muennighoff b15ca2d
Add prefixlm arg
Muennighoff dc8d0ab
Add bos option
Muennighoff 0a32459
Merge branch 'main' into t0loading
Muennighoff 2699721
Add reset-progress key
Muennighoff 1e77844
Add option to normalize loss per target (#326)
Muennighoff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,6 +82,8 @@ def encode(self, json_line): | |
| ids = {} | ||
| for key in self.args.json_keys: | ||
| text = data[key] | ||
| if self.args.prepend_space: | ||
| text = " " + text | ||
| doc_ids = [] | ||
| for sentence in Encoder.splitter.tokenize(text): | ||
| sentence_ids = Encoder.tokenizer.tokenize(sentence) | ||
|
|
@@ -117,6 +119,8 @@ def get_args(): | |
| help='Path to the BPE merge file (if necessary).') | ||
| group.add_argument('--append-eod', action='store_true', | ||
| help='Append an <eod> token to the end of a document.') | ||
| group.add_argument('--prepend-space', action='store_true', | ||
| help='Prepends a space to the beginning of a document') | ||
|
Member
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. Add a mention in which context it's useful, typically it is when you compute targets. |
||
| group.add_argument("--tokenizer-name-or-path", type=str, default=None, | ||
| help="Name or path of the huggingface tokenizer.") | ||
| group.add_argument('--make-vocab-size-divisible-by', type=int, default=128, | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.