abhishek HF staff commited on
Commit
d28e4b6
1 Parent(s): d3b5bcc

Commit From AutoNLP

Browse files
.gitattributes CHANGED
@@ -25,3 +25,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
25
  *.zip filter=lfs diff=lfs merge=lfs -text
26
  *.zstandard filter=lfs diff=lfs merge=lfs -text
27
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
25
  *.zip filter=lfs diff=lfs merge=lfs -text
26
  *.zstandard filter=lfs diff=lfs merge=lfs -text
27
  *tfevents* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.gz filter=lfs diff=lfs merge=lfs -text
29
+ *.pkl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - autonlp
4
+ - question-answering
5
+ language: unk
6
+ widget:
7
+ - text: "Who loves AutoNLP?"
8
+ context: "Everyone loves AutoNLP"
9
+ datasets:
10
+ - teacookies/autonlp-data-roberta-base-squad2
11
+ co2_eq_emissions: 58.51753681929935
12
+ ---
13
+
14
+ # Model Trained Using AutoNLP
15
+
16
+ - Problem type: Extractive Question Answering
17
+ - Model ID: 24465524
18
+ - CO2 Emissions (in grams): 58.51753681929935
19
+
20
+ ## Validation Metrics
21
+
22
+ - Loss: 0.5759999752044678
23
+
24
+ ## Usage
25
+
26
+ You can use cURL to access this model:
27
+
28
+ ```
29
+ $ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"question": "Who loves AutoNLP?", "context": "Everyone loves AutoNLP"}' https://api-inference.huggingface.co/models/teacookies/autonlp-roberta-base-squad2-24465524
30
+ ```
31
+
32
+ Or Python API:
33
+
34
+ ```
35
+ import torch
36
+
37
+ from transformers import AutoModelForQuestionAnswering, AutoTokenizer
38
+
39
+ model = AutoModelForQuestionAnswering.from_pretrained("teacookies/autonlp-roberta-base-squad2-24465524", use_auth_token=True)
40
+
41
+ tokenizer = AutoTokenizer.from_pretrained("teacookies/autonlp-roberta-base-squad2-24465524", use_auth_token=True)
42
+
43
+ from transformers import BertTokenizer, BertForQuestionAnswering
44
+
45
+ question, text = "Who loves AutoNLP?", "Everyone loves AutoNLP"
46
+
47
+ inputs = tokenizer(question, text, return_tensors='pt')
48
+
49
+ start_positions = torch.tensor([1])
50
+
51
+ end_positions = torch.tensor([3])
52
+
53
+ outputs = model(**inputs, start_positions=start_positions, end_positions=end_positions)
54
+
55
+ loss = outputs.loss
56
+
57
+ start_scores = outputs.start_logits
58
+
59
+ end_scores = outputs.end_logits
60
+ ```
config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "AutoNLP",
3
+ "architectures": [
4
+ "XLMRobertaForQuestionAnswering"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "eos_token_id": 2,
9
+ "gradient_checkpointing": false,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 3072,
15
+ "language": "english",
16
+ "layer_norm_eps": 1e-05,
17
+ "max_length": 512,
18
+ "max_position_embeddings": 514,
19
+ "model_type": "xlm-roberta",
20
+ "name": "XLMRoberta",
21
+ "num_attention_heads": 12,
22
+ "num_hidden_layers": 12,
23
+ "output_past": true,
24
+ "pad_token_id": 1,
25
+ "padding": "max_length",
26
+ "position_embedding_type": "absolute",
27
+ "transformers_version": "4.8.0",
28
+ "type_vocab_size": 1,
29
+ "use_cache": true,
30
+ "vocab_size": 250002
31
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7940816b580dfd60a62dcd2c53c626a8228a2b648814bbfcb838575000b6b7cc
3
+ size 1109903089
sample_input.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d22c4b0703481a327f22e50409860beb1b6023d79cf85865f3887a5a03c86122
3
+ size 2527
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
3
+ size 5069051
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": "<mask>"}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "sep_token": "</s>", "cls_token": "<s>", "unk_token": "<unk>", "pad_token": "<pad>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "do_lower_case": false, "model_max_length": 512, "full_tokenizer_file": null, "special_tokens_map_file": "/root/.cache/huggingface/transformers/b285d730ad6193f7e96b41152fbc5fb05620f0961f6f513e2d36868dfb1eb2a7.0dc5b1041f62041ebbd23b1297f2f573769d5c97d8b7c28180ec86b8f6185aa8", "name_or_path": "AutoNLP", "sp_model_kwargs": {}, "tokenizer_class": "XLMRobertaTokenizer"}