wietsedv commited on
Commit
edbc4b0
1 Parent(s): bab95dd

add model files

Browse files
README.md ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: nl
3
+ tags:
4
+ - adaption
5
+ - recycled
6
+ - gpt2-small
7
+ pipeline_tag: text-generation
8
+ ---
9
+
10
+ # GPT-2 recycled for Dutch (small)
11
+ [Wietse de Vries](https://www.semanticscholar.org/author/Wietse-de-Vries/144611157) •
12
+ [Malvina Nissim](https://www.semanticscholar.org/author/M.-Nissim/2742475)
13
+
14
+ ## Model description
15
+
16
+ This model is based on the small OpenAI GPT-2 ([`gpt2`](https://huggingface.co/gpt2)) model.
17
+
18
+ For details, check out our paper on [arXiv](https://arxiv.org/abs/XXXX.XXXXX) and the code on [Github](https://github.com/wietsedv/gpt2-recycle).
19
+
20
+
21
+ ## Related models
22
+
23
+ ### Dutch
24
+ - [`gpt2-small-dutch-embeddings`](https://huggingface.co/GroNLP/gpt2-small-dutch): Small model size with only retrained lexical embeddings.
25
+ - [`gpt2-small-dutch`](https://huggingface.co/GroNLP/gpt2-small-dutch): Small model size with retrained lexical embeddings and additional fine-tuning of the full model. (**Recommended**)
26
+ - [`gpt2-medium-dutch-embeddings`](https://huggingface.co/GroNLP/gpt2-medium-dutch-embeddings): Medium model size with only retrained lexical embeddings.
27
+
28
+ ### Italian
29
+ - [`gpt2-small-italian-embeddings`](https://huggingface.co/GroNLP/gpt2-small-italian-embeddings): Small model size with only retrained lexical embeddings.
30
+ - [`gpt2-small-italian`](https://huggingface.co/GroNLP/gpt2-small-italian): Small model size with retrained lexical embeddings and additional fine-tuning of the full model. (**Recommended**)
31
+ - [`gpt2-medium-italian-embeddings`](https://huggingface.co/GroNLP/gpt2-medium-italian-embeddings): Medium model size with only retrained lexical embeddings.
32
+
33
+
34
+ ## How to use
35
+
36
+ ```python
37
+ from transformers import pipeline
38
+
39
+ pipe = pipeline("text-generation", model="GroNLP/gpt2-small-dutch")
40
+ ```
41
+
42
+ ```python
43
+ from transformers import AutoTokenizer, AutoModel, TFAutoModel
44
+
45
+ tokenizer = AutoTokenizer.from_pretrained("GroNLP/gpt2-small-dutch")
46
+ model = AutoModel.from_pretrained("GroNLP/gpt2-small-dutch") # PyTorch
47
+ model = TFAutoModel.from_pretrained("GroNLP/gpt2-small-dutch") # Tensorflow
48
+ ```
49
+
50
+ ## BibTeX entry
51
+
52
+ ```bibtex
53
+ ```
config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "data/hf/gpt2-small-dutch",
3
+ "activation_function": "gelu_new",
4
+ "architectures": [
5
+ "GPT2LMHeadModel"
6
+ ],
7
+ "attn_pdrop": 0.1,
8
+ "bos_token_id": 1,
9
+ "embd_pdrop": 0.1,
10
+ "eos_token_id": 2,
11
+ "gradient_checkpointing": false,
12
+ "initializer_range": 0.02,
13
+ "layer_norm_epsilon": 1e-05,
14
+ "model_type": "gpt2",
15
+ "n_ctx": 1024,
16
+ "n_embd": 768,
17
+ "n_head": 12,
18
+ "n_inner": null,
19
+ "n_layer": 12,
20
+ "n_positions": 1024,
21
+ "pad_token_id": 0,
22
+ "resid_pdrop": 0.1,
23
+ "summary_activation": null,
24
+ "summary_first_dropout": 0.1,
25
+ "summary_proj_to_labels": true,
26
+ "summary_type": "cls_index",
27
+ "summary_use_proj": true,
28
+ "task_specific_params": {
29
+ "text-generation": {
30
+ "do_sample": true,
31
+ "max_length": 100,
32
+ "no_repeat_ngram_size": 4,
33
+ "num_beams": 10,
34
+ "repetition_penalty": 10.0,
35
+ "temperature": 2.0,
36
+ "top_k": 20,
37
+ "top_p": 0.9
38
+ }
39
+ },
40
+ "use_cache": true,
41
+ "vocab_size": 40000
42
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43815d3e0be19aa180237bd28a1ae356d058343a26f4493799f70e85f0f23c09
3
+ size 478894341
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>"}
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:37cd44fad76e480b4b8a748a89dcd1669f5dd63c509c5223374f5cb0e898e94e
3
+ size 466423256
tokenizer_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "unk_token": "<unk>",
3
+ "bos_token": "<s>",
4
+ "eos_token": "</s>",
5
+ "add_prefix_space": false
6
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff