Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## Model info
|
2 |
+
|
3 |
+
This is a BPE tokenizer retrained from scratch on the concatenated [Wikitext-103](https://paperswithcode.com/dataset/wikitext-103) train, evaluation, and test sets. The vocabulary had 28,439 entries.
|
4 |
+
|
5 |
+
This tokenizer was use to tokenize text for [the GPT-2 model trained on Wikitext-103](https://huggingface.co/Kristijan/gpt2_wt103-40m_12-layer).
|
6 |
+
|
7 |
+
## Usage
|
8 |
+
|
9 |
+
You can download the tokenizer directly from hub as follows:
|
10 |
+
|
11 |
+
```
|
12 |
+
from transformers import GPT2TokenizerFast
|
13 |
+
|
14 |
+
tokenizer = GPT2TokenizerFast.from_pretrained("Kristijan/wikitext-103-tokenizer")
|
15 |
+
|
16 |
+
```
|
17 |
+
|
18 |
+
After cloning/downloading the files, you can load the tokenizer using the `/from_pretrained()` methods as follows:
|
19 |
+
|
20 |
+
```
|
21 |
+
from transformers import GPT2TokenizerFast
|
22 |
+
|
23 |
+
tokenizer = GPT2TokenizerFast.from_pretrained(path_to_folder_with_merges_and_vocab_files)
|
24 |
+
|
25 |
+
```
|