-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[WIP] Gsoc2025 tokenizer data #1276
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
JorgeV92
wants to merge
16
commits into
opencv:5.x
Choose a base branch
from
JorgeV92:gsoc2025-tokenizer
base: 5.x
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 all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
4b78314
Add tokenizer encoder.json for GSoC 2025 project
JorgeV92 82acb8f
Add vocab.bpe for gpt2
JorgeV92 2f50d85
Add tokenizer.json from hugginface for gpt2
JorgeV92 0901395
Add gpt4 json from openai
JorgeV92 2ccf675
Add json from hugginface for gpt4
JorgeV92 92440bf
Add train data from wiki for tokenizer
JorgeV92 b35321d
Add config settings for gpt2
JorgeV92 26b769c
Small config setting for gpt4
JorgeV92 3e87a57
change model name to gpt4
JorgeV92 d5567bb
removed wiki directory
JorgeV92 08aeb16
Added readme
JorgeV92 6667e6e
new readme
JorgeV92 4dabdef
Add test data from huggingFace and tiktoken for validation
JorgeV92 7b83d14
relocated test data
JorgeV92 6520aa8
relocated data
JorgeV92 0dd1683
Add method BPE to config.json for gpt2 and gpt4
JorgeV92 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# GPT-2 tokenizer | ||
|
||
## Contents | ||
- `config.json` | ||
- `tokenizer.json` | ||
- `encoder.json` | ||
- `vocab.bpe` | ||
|
||
## Sources | ||
- `tokenizer.json`: | ||
https://huggingface.co/openai-community/gpt2/tree/main | ||
- `encoder.json`, `vocab.bpe`: | ||
https://openaipublic.blob.core.windows.net/gpt-2/encodings/main/encoder.json | ||
https://openaipublic.blob.core.windows.net/gpt-2/encodings/main/vocab.bpe | ||
|
||
## License & attribution | ||
- GPT-2 code/assets by OpenAI are released under a **Modified MIT License** (see upstream license). | ||
https://github.com/openai/gpt-2/blob/master/LICENSE | ||
- The Hugging Face `openai-community/gpt2` model page lists **MIT** as the license. | ||
|
||
These files are included here **verbatim** for interoperability/testing. | ||
All copyrights remain with the original authors. If you redistribute, keep the original | ||
license notices and links to the sources above. | ||
|
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"model_type": "gpt2", | ||
"method": "BPE", | ||
"vocab_size": 50257, | ||
"tokenizer_class": "GPT2TokenizerFast", | ||
"eos_token": "", | ||
"bos_token": null, | ||
"pad_token": null | ||
} | ||
|
||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Also need to add "gpt2_hf_tik_testdata.json" and a section on how to generate this.