abhishek HF staff commited on
Commit
17f5995
1 Parent(s): de020d9

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
+ - abhishek/autonlp-data-hindi-question-answering
11
+ co2_eq_emissions: 39.76330395590446
12
+ ---
13
+
14
+ # Model Trained Using AutoNLP
15
+
16
+ - Problem type: Extractive Question Answering
17
+ - Model ID: 23865268
18
+ - CO2 Emissions (in grams): 39.76330395590446
19
+
20
+ ## Validation Metrics
21
+
22
+ - Loss: 0.2826281785964966
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/abhishek/autonlp-hindi-question-answering-23865268
30
+ ```
31
+
32
+ Or Python API:
33
+
34
+ ```
35
+ import torch
36
+
37
+ from transformers import AutoModelForQuestionAnswering, AutoTokenizer
38
+
39
+ model = AutoModelForQuestionAnswering.from_pretrained("abhishek/autonlp-hindi-question-answering-23865268", use_auth_token=True)
40
+
41
+ tokenizer = AutoTokenizer.from_pretrained("abhishek/autonlp-hindi-question-answering-23865268", 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": 1024,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 4096,
15
+ "language": "english",
16
+ "layer_norm_eps": 1e-05,
17
+ "max_length": 384,
18
+ "max_position_embeddings": 514,
19
+ "model_type": "xlm-roberta",
20
+ "name": "XLMRoberta",
21
+ "num_attention_heads": 16,
22
+ "num_hidden_layers": 24,
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:4389646440fc9cc76317a0d0814db0b58ecfb4bf95f9e483f5251c26abad7f1c
3
+ size 2235534897
sample_input.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:704d1fae4b9a668fba7a46eb5897518ece5cdeb90dab4c9c7abf42e2fe608f7a
3
+ size 2083
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, "special_tokens_map_file": "germanQA/saved_models/xlm-roberta-large-squad2/special_tokens_map.json", "full_tokenizer_file": null, "name_or_path": "AutoNLP", "sp_model_kwargs": {}, "tokenizer_class": "XLMRobertaTokenizer"}