MihaiAlexandru1606 commited on
Commit
b0c1531
1 Parent(s): 2faa3b7
Files changed (6) hide show
  1. README.md +25 -0
  2. config.json +38 -0
  3. merges.txt +0 -0
  4. special_tokens_map.json +1 -0
  5. tf_model.h5 +3 -0
  6. tokenizer_config.json +1 -0
README.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Model card for RoGPT2-medium
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-medium')
21
+ model = TFAutoModelWithLMHead.from_pretrained('readerbench/RoGPT2-medium')
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,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "model/check_point_medium/5_2.9211485385894775",
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
+ "predict_special_tokens": true,
23
+ "resid_pdrop": 0.1,
24
+ "summary_activation": null,
25
+ "summary_first_dropout": 0.1,
26
+ "summary_proj_to_labels": true,
27
+ "summary_type": "cls_index",
28
+ "summary_use_proj": true,
29
+ "task_specific_params": {
30
+ "text-generation": {
31
+ "do_sample": true,
32
+ "max_length": 50
33
+ }
34
+ },
35
+ "transformers_version": "4.5.1",
36
+ "use_cache": true,
37
+ "vocab_size": 50257
38
+ }
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:5872100e8fe7a503d832e4d07d64c1b4cbd8d9056a51a40a4ea7f26502f72ada
3
+ size 1419628392
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"}