gxy commited on
Commit
d839502
1 Parent(s): 6238e21

ADD: add model

Browse files
README.md CHANGED
@@ -1,3 +1,38 @@
1
  ---
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - zh
4
  license: apache-2.0
5
+
6
+ inference: true
7
+
8
+ widget:
9
+ - text: 'summarize: 在北京冬奥会自由式滑雪女子坡面障碍技巧决赛中,中国选手谷爱凌夺得银牌。祝贺谷爱凌!今天上午,自由式滑雪女子坡面障碍技巧决赛举行。决赛分三轮进行,取选手最佳成绩排名决出奖牌。第一跳,中国选手谷爱凌获得69.90分。在12位选手中排名第三。完成动作后,谷爱凌又扮了个鬼脸,甚是可爱。第二轮中,谷爱凌在道具区第三个障碍处失误,落地时摔倒。获得16.98分。网友:摔倒了也没关系,继续加油!在第二跳失误摔倒的情况下,谷爱凌顶住压力,第三跳稳稳发挥,流畅落地!获得86.23分!此轮比赛,共12位选手参赛,谷爱凌第10位出场。网友:看比赛时我比谷爱凌紧张,加油!'
10
+
11
+
12
  ---
13
+ # Randeng-BART-139M-SUMMARY model (Chinese),one model of [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM).
14
+ The 139M million parameter Randeng-BART large model, using 180G Chinese data, 8 A100(40G) training for 3 days,which is a standard transformer structure. Finetune on summary downstream task.
15
+
16
+
17
+ ## Usage
18
+ ```python
19
+ from transformers import BartForConditionalGeneration, AutoTokenizer, Text2TextGenerationPipeline
20
+ import torch
21
+
22
+ tokenizer=AutoTokenizer.from_pretrained('IDEA-CCNL/Randeng-BART-139M', use_fast=false)
23
+ model=BartForConditionalGeneration.from_pretrained('IDEA-CCNL/Randeng-BART-139M')
24
+ text = 'summarize: 在北京冬奥会自由式滑雪女子坡面障碍技巧决赛中,中国选手谷爱凌夺得银牌。祝贺谷爱凌!今天上午,自由式滑雪女子坡面障碍技巧决赛举行。决赛分三轮进行,取选手最佳成绩排名决出奖牌。第一跳,中国选手谷爱凌获得69.90分。在12位选手中排名第三。完成动作后,谷爱凌又扮了个鬼脸,甚是可爱。第二轮中,谷爱凌在道具区第三个障碍处失误,落地时摔倒。获得16.98分。网友:摔倒了也没关系,继续加油!在第二跳失误摔倒的情况下,谷爱凌顶住压力,第三跳稳稳发挥,流畅落地!获得86.23分!此轮比赛,共12位选手参赛,谷爱凌第10位出场。网友:看比赛时我比谷爱凌紧张,加油!'
25
+ text2text_generator = Text2TextGenerationPipeline(model, tokenizer)
26
+ print(text2text_generator(text, max_length=50, do_sample=False))
27
+ ```
28
+
29
+ ## Citation
30
+ If you find the resource is useful, please cite the following website in your paper.
31
+ ```
32
+ @misc{Fengshenbang-LM,
33
+ title={Fengshenbang-LM},
34
+ author={IDEA-CCNL},
35
+ year={2022},
36
+ howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
37
+ }
38
+ ```
added_tokens.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"<mask>": 40001, "<pad>": 40000}
config.json ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "bart-base",
3
+ "activation_dropout": 0.1,
4
+ "activation_function": "gelu",
5
+ "add_bias_logits": false,
6
+ "add_final_layer_norm": false,
7
+ "architectures": [
8
+ "BartForConditionalGeneration"
9
+ ],
10
+ "attention_dropout": 0.1,
11
+ "bos_token_id": 0,
12
+ "classif_dropout": 0.1,
13
+ "classifier_dropout": 0.0,
14
+ "d_model": 768,
15
+ "decoder_attention_heads": 12,
16
+ "decoder_ffn_dim": 3072,
17
+ "decoder_layerdrop": 0.0,
18
+ "decoder_layers": 6,
19
+ "decoder_start_token_id": 2,
20
+ "dropout": 0.1,
21
+ "encoder_attention_heads": 12,
22
+ "encoder_ffn_dim": 3072,
23
+ "encoder_layerdrop": 0.0,
24
+ "encoder_layers": 6,
25
+ "eos_token_id": 2,
26
+ "forced_eos_token_id": 2,
27
+ "id2label": {
28
+ "0": "LABEL_0",
29
+ "1": "LABEL_1",
30
+ "2": "LABEL_2"
31
+ },
32
+ "init_std": 0.02,
33
+ "is_encoder_decoder": true,
34
+ "label2id": {
35
+ "LABEL_0": 0,
36
+ "LABEL_1": 1,
37
+ "LABEL_2": 2
38
+ },
39
+ "max_position_embeddings": 1024,
40
+ "model_type": "bart",
41
+ "no_repeat_ngram_size": 3,
42
+ "normalize_before": false,
43
+ "normalize_embedding": true,
44
+ "num_beams": 4,
45
+ "num_hidden_layers": 6,
46
+ "pad_token_id": 1,
47
+ "scale_embedding": false,
48
+ "torch_dtype": "float16",
49
+ "transformers_version": "4.16.0.dev0",
50
+ "use_cache": true,
51
+ "vocab_size": 50265
52
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa915473db82068c2bffc39666bad4629fb9016868c477a9da01d3a50ee58b14
3
+ size 278987747
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>", "mask_token": "<mask>", "additional_special_tokens": ["<s>", "<mask>"]}
spiece.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a1836aa16c5e41fb9bec14c477218b83812919d19dfdde1c49a419cd9935615
3
+ size 858518
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "eos_token": "</s>",
3
+ "unk_token": "<unk>",
4
+ "pad_token": "<pad>",
5
+ "extra_ids": 0,
6
+ "additional_special_tokens": [
7
+ "<s>",
8
+ "<mask>"
9
+ ],
10
+ "sp_model_kwargs": {},
11
+ "name_or_path": "/cognitive_comp/gaoxinyu/hf_hub/Randeng-BART-139M",
12
+ "special_tokens_map_file": "/cognitive_comp/gaoxinyu/hf_hub/Randeng-BART-139M/special_tokens_map.json",
13
+ "tokenizer_class": "T5Tokenizer"
14
+ }