MihaiAlexandru1606 commited on
Commit
4f84de3
1 Parent(s): 30d19aa
Files changed (8) hide show
  1. .gitattributes +1 -0
  2. README.md +24 -0
  3. config.json +36 -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,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Model card for RoGPT2-base
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
+ ~~from transformers import AutoTokenizer, TFAutoModelWithLMHead
18
+
19
+ tokenizer = AutoTokenizer.from_pretrained('readerbench/RoGPT2-base')
20
+ model = TFAutoModelWithLMHead.from_pretrained('readerbench/RoGPT2-base')
21
+ inputs = tokenizer.encode("Este o zi de vara", return_tensors='tf')
22
+ text = model.generate(inputs, max_length=1024, no_repeat_ngram_size=2)
23
+ print(tokenizer.decode(text[0]))~~
24
+ ```
config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "model/base",
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
+ "resid_pdrop": 0.1,
22
+ "summary_activation": null,
23
+ "summary_first_dropout": 0.1,
24
+ "summary_proj_to_labels": true,
25
+ "summary_type": "cls_index",
26
+ "summary_use_proj": true,
27
+ "task_specific_params": {
28
+ "text-generation": {
29
+ "do_sample": true,
30
+ "max_length": 50
31
+ }
32
+ },
33
+ "transformers_version": "4.5.1",
34
+ "use_cache": true,
35
+ "vocab_size": 50257
36
+ }
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:433a00b42261edcb8a415b3ffb3a9f84ca8eb5ae79ae4ec5d4355a28db08e56b
3
+ size 497933648
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