MihaiAlexandru1606 commited on
Commit
bb89bc3
1 Parent(s): 8cced45
Files changed (8) hide show
  1. .gitattributes +1 -0
  2. README.md +25 -0
  3. config.json +43 -0
  4. merges.txt +0 -0
  5. special_tokens_map.json +1 -0
  6. tf_model.h5 +3 -0
  7. tokenizer_config.json +1 -0
  8. vocab.json +0 -0
.gitattributes CHANGED
@@ -15,3 +15,4 @@
15
  *.pt filter=lfs diff=lfs merge=lfs -text
16
  *.pth filter=lfs diff=lfs merge=lfs -text
17
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
15
  *.pt filter=lfs diff=lfs merge=lfs -text
16
  *.pth filter=lfs diff=lfs merge=lfs -text
17
  *tfevents* filter=lfs diff=lfs merge=lfs -text
18
+ .h5 filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Model card for RoGPT2-large
2
+
3
+ ---
4
+ language:
5
+ - ro
6
+ ---
7
+
8
+ # RoGPT2: Romanian GPT2 for text generation
9
+
10
+ All models are available:
11
+ * [RoBERT-base](https://huggingface.co/readerbench/RoGPT2-base)
12
+ * [RoBERT-medium](https://huggingface.co/readerbench/RoGPT2-medium)
13
+ * [RoBERT-large](https://huggingface.co/readerbench/RoGPT2-large)
14
+
15
+ #### How to use
16
+ ```python
17
+
18
+ from transformers import AutoTokenizer, TFAutoModelWithLMHead
19
+
20
+ tokenizer = AutoTokenizer.from_pretrained('readerbench/RoGPT2-large')
21
+ model = TFAutoModelWithLMHead.from_pretrained('readerbench/RoGPT2-large')
22
+ inputs = tokenizer.encode("Este o zi de vara", return_tensors='tf')
23
+ text = model.generate(inputs, max_length=1024, no_repeat_ngram_size=2)
24
+ print(tokenizer.decode(text[0]))
25
+ ```
config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "model/check_point_large/1_2.9729225635528564",
3
+ "_num_labels": 1,
4
+ "activation_function": "gelu_new",
5
+ "architectures": [
6
+ "GPT2LMHeadModel"
7
+ ],
8
+ "attn_pdrop": 0.1,
9
+ "bos_token_id": 0,
10
+ "embd_pdrop": 0.1,
11
+ "eos_token_id": 0,
12
+ "gradient_checkpointing": false,
13
+ "id2label": {
14
+ "0": "LABEL_0"
15
+ },
16
+ "initializer_range": 0.02,
17
+ "label2id": {
18
+ "LABEL_0": 0
19
+ },
20
+ "layer_norm_epsilon": 1e-05,
21
+ "model_type": "gpt2",
22
+ "n_ctx": 1024,
23
+ "n_embd": 1280,
24
+ "n_head": 20,
25
+ "n_inner": null,
26
+ "n_layer": 36,
27
+ "n_positions": 1024,
28
+ "resid_pdrop": 0.1,
29
+ "summary_activation": null,
30
+ "summary_first_dropout": 0.1,
31
+ "summary_proj_to_labels": true,
32
+ "summary_type": "cls_index",
33
+ "summary_use_proj": true,
34
+ "task_specific_params": {
35
+ "text-generation": {
36
+ "do_sample": true,
37
+ "max_length": 50
38
+ }
39
+ },
40
+ "transformers_version": "4.5.1",
41
+ "use_cache": true,
42
+ "vocab_size": 50257
43
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
1
+ {"bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}}
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3950ca83a7098f9a5f5cf0c3e5f6b39fdac1233f6947c307655824f9e0b5ab0
3
+ size 3096617152
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"errors": "replace", "unk_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "bos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "eos_token": {"content": "<|endoftext|>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "add_prefix_space": false, "special_tokens_map_file": null, "tokenizer_file": null, "name_or_path": "tokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff