wietsedv commited on
Commit
7d19396
1 Parent(s): 53c36f3

add model files

Browse files
README.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: nl
3
+ tags:
4
+ - adaption
5
+ - recycled
6
+ - gpt2-medium
7
+ pipeline_tag: text-generation
8
+ ---
9
+
10
+ # GPT-2 recycled for Italian (medium, 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 medium OpenAI GPT-2 ([`gpt2-medium`](https://huggingface.co/gpt2-medium)) 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-medium-italian-embeddings")
42
+ ```
43
+
44
+ ```python
45
+ from transformers import AutoTokenizer, AutoModel, TFAutoModel
46
+
47
+ tokenizer = AutoTokenizer.from_pretrained("GroNLP/gpt2-medium-italian-embeddings")
48
+ model = AutoModel.from_pretrained("GroNLP/gpt2-medium-italian-embeddings") # PyTorch
49
+ model = TFAutoModel.from_pretrained("GroNLP/gpt2-medium-italian-embeddings") # Tensorflow
50
+ ```
51
+
52
+ ## BibTeX entry
53
+
54
+ ```bibtex
55
+ ```
config.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "data/hf/gpt2-medium-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": 1024,
17
+ "n_head": 16,
18
+ "n_inner": null,
19
+ "n_layer": 24,
20
+ "n_positions": 1024,
21
+ "n_special": 0,
22
+ "pad_token_id": 0,
23
+ "predict_special_tokens": true,
24
+ "resid_pdrop": 0.1,
25
+ "summary_activation": null,
26
+ "summary_first_dropout": 0.1,
27
+ "summary_proj_to_labels": true,
28
+ "summary_type": "cls_index",
29
+ "summary_use_proj": true,
30
+ "task_specific_params": {
31
+ "text-generation": {
32
+ "do_sample": true,
33
+ "max_length": 100,
34
+ "no_repeat_ngram_size": 4,
35
+ "num_beams": 10,
36
+ "repetition_penalty": 10.0,
37
+ "temperature": 2.0,
38
+ "top_k": 20,
39
+ "top_p": 0.9
40
+ }
41
+ },
42
+ "use_cache": true,
43
+ "vocab_size": 30001
44
+ }
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:b34b641ae618294da7c10341635f7494fe5b3e96792fe07cdec0e8d8feee9eed
3
+ size 1361612080
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:c51b2934c256a59856bcf5ca8c25d88739d30ba095173e7b2782883365269f8d
3
+ size 1336658064
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