sliderSun commited on
Commit
91bd35b
1 Parent(s): e7f2f6e

first commit

Browse files
Files changed (4) hide show
  1. README.md +30 -0
  2. config.json +39 -0
  3. pytorch_model.bin +3 -0
  4. vocab.txt +0 -0
README.md CHANGED
@@ -1,3 +1,33 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+ tags:
5
+ - bert
6
+ - NLU
7
+ - NLI
8
+
9
+ inference: true
10
+
11
+ widget:
12
+ - text: "湖北省黄冈市麻城市中国中部(麻城)石材循环经济产业园厦门路麻城盈泰环保科技有限公司[SEP]黄冈市麻城市中国中部石材循环经济产业园厦门路麻城盈泰环保科技有限公司"
13
+
14
+ ---
15
+ # Erlangshen-Roberta-110M-POI, model (Chinese).
16
+ We add POI datasets, with a total of 5000000 samples. Our model is mainly based on [roberta](https://github.com/IDEA-CCNL/Erlangshen-Roberta-110M-Similarity)
17
+
18
+ ## Usage
19
+ ```python
20
+ from transformers import BertForSequenceClassification
21
+ from transformers import BertTokenizer
22
+ import torch
23
+
24
+ tokenizer=BertTokenizer.from_pretrained('swtx/Erlangshen-Roberta-110M-POI')
25
+ model=BertForSequenceClassification.from_pretrained('swtx/Erlangshen-Roberta-110M-POI')
26
+
27
+ texta='湖北省黄冈市麻城市中国中部(麻城)石材循环经济产业园厦门路麻城盈泰环保科技有限公司'
28
+ textb='黄冈市麻城市中国中部石材循环经济产业园厦门路麻城盈泰环保科技有限公司'
29
+
30
+ output=model(torch.tensor([tokenizer.encode(texta,textb)]))
31
+ print(torch.nn.functional.softmax(output.logits,dim=-1))
32
+
33
+ ```
config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "IDEA-CCNL/Erlangshen-Roberta-110M-Similarity",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "directionality": "bidi",
10
+ "eos_token_id": 2,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "id2label": {
15
+ "0": "not similar",
16
+ "1": "similar"
17
+ },
18
+ "initializer_range": 0.02,
19
+ "intermediate_size": 3072,
20
+ "label2id": null,
21
+ "layer_norm_eps": 1e-12,
22
+ "max_position_embeddings": 512,
23
+ "model_type": "bert",
24
+ "num_attention_heads": 12,
25
+ "num_hidden_layers": 12,
26
+ "output_past": true,
27
+ "pad_token_id": 1,
28
+ "pooler_fc_size": 768,
29
+ "pooler_num_attention_heads": 12,
30
+ "pooler_num_fc_layers": 3,
31
+ "pooler_size_per_head": 128,
32
+ "pooler_type": "first_token_transform",
33
+ "position_embedding_type": "absolute",
34
+ "torch_dtype": "float32",
35
+ "transformers_version": "4.20.1",
36
+ "type_vocab_size": 2,
37
+ "use_cache": true,
38
+ "vocab_size": 21128
39
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a069bb2ab2e28f461b2b4f37573734022665c46e597f6282821d45beb0558f86
3
+ size 409145207
vocab.txt ADDED
The diff for this file is too large to render. See raw diff