wietsedv commited on
Commit
b4c7c40
1 Parent(s): 4b7727e

add model files

Browse files
README.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 Italian (small, adapted lexical embeddings)
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
+ The Transformer layer weights in this model are identical to the original English, model but the lexical layer has been retrained for an Italian vocabulary.
19
+
20
+ 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).
21
+
22
+
23
+ ## Related models
24
+
25
+ ### Dutch
26
+ - [`gpt2-small-dutch-embeddings`](https://huggingface.co/GroNLP/gpt2-small-dutch): Small model size with only retrained lexical embeddings.
27
+ - [`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**)
28
+ - [`gpt2-medium-dutch-embeddings`](https://huggingface.co/GroNLP/gpt2-medium-dutch-embeddings): Medium model size with only retrained lexical embeddings.
29
+
30
+ ### Italian
31
+ - [`gpt2-small-italian-embeddings`](https://huggingface.co/GroNLP/gpt2-small-italian-embeddings): Small model size with only retrained lexical embeddings.
32
+ - [`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**)
33
+ - [`gpt2-medium-italian-embeddings`](https://huggingface.co/GroNLP/gpt2-medium-italian-embeddings): Medium model size with only retrained lexical embeddings.
34
+
35
+
36
+ ## How to use
37
+
38
+ ```python
39
+ from transformers import pipeline
40
+
41
+ pipe = pipeline("text-generation", model="GroNLP/gpt2-small-italian-embeddings")
42
+ ```
43
+
44
+ ```python
45
+ from transformers import AutoTokenizer, AutoModel, TFAutoModel
46
+
47
+ tokenizer = AutoTokenizer.from_pretrained("GroNLP/gpt2-small-italian-embeddings")
48
+ model = AutoModel.from_pretrained("GroNLP/gpt2-small-italian-embeddings") # PyTorch
49
+ model = TFAutoModel.from_pretrained("GroNLP/gpt2-small-italian-embeddings") # Tensorflow
50
+ ```
51
+
52
+ ## BibTeX entry
53
+
54
+ ```bibtex
55
+ ```
config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "data/hf/gpt2-small-italian-embeddings",
3
+ "activation_function": "gelu_new",
4
+ "architectures": [
5
+ "GPT2LMHeadModel"
6
+ ],
7
+ "attn_pdrop": 0.1,
8
+ "bos_token_id": 0,
9
+ "embd_pdrop": 0.1,
10
+ "eos_token_id": 0,
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": 30001
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:6f4f0566cb237a50d9a704ae1ddbe75390831d2afdcbb2745bcc41f3f933d5aa
3
+ size 448177399
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "unk_token": "<|endoftext|>"}
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f44249fa6809cd92522d0bea75373939f7c06bce5d4d606caa3a2e6374df7382
3
+ size 435706328
tokenizer_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "unk_token": "<|endoftext|>",
3
+ "bos_token": "<|endoftext|>",
4
+ "eos_token": "<|endoftext|>",
5
+ "add_prefix_space": false
6
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff