LLukas22 commited on
Commit
9111f57
1 Parent(s): 7b850ee

Auto Upload

Browse files
README.md ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ pipeline_tag: question-answering
4
+ tags:
5
+ - question-answering
6
+ - transformers
7
+ - generated_from_trainer
8
+ datasets:
9
+ - squad_v2
10
+ - LLukas22/nq-simplified
11
+ ---
12
+
13
+ # deberta-v3-base-qa-en
14
+ This model is an extractive qa model.
15
+ It's a fine-tuned version of [deberta-v3-base](https://huggingface.co/microsoft/deberta-v3-base) on the following datasets: [squad_v2](https://huggingface.co/datasets/squad_v2), [LLukas22/nq-simplified](https://huggingface.co/datasets/LLukas22/nq-simplified).
16
+
17
+
18
+
19
+ ## Usage
20
+
21
+ You can use the model like this:
22
+
23
+ ```python
24
+ from transformers import pipeline
25
+
26
+ #Make predictions
27
+ model_name = "LLukas22/deberta-v3-base-qa-en"
28
+ nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
29
+
30
+ QA_input = {
31
+ "question": "What's my name?",
32
+ "context": "My name is Clara and I live in Berkeley."
33
+ }
34
+
35
+ result = nlp(QA_input)
36
+ print(result)
37
+ ```
38
+ Alternatively you can load the model and tokenizer on their own:
39
+ ```python
40
+ from transformers import AutoModelForQuestionAnswering, AutoTokenizer
41
+
42
+ #Make predictions
43
+ model_name = "LLukas22/deberta-v3-base-qa-en"
44
+ model = AutoModelForQuestionAnswering.from_pretrained(model_name)
45
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
46
+ ```
47
+
48
+ ## Training hyperparameters
49
+ The following hyperparameters were used during training:
50
+
51
+ - learning_rate: 2E-05
52
+ - per device batch size: 15
53
+ - effective batch size: 45
54
+ - seed: 42
55
+ - optimizer: AdamW with betas (0.9,0.999) and eps 1E-08
56
+ - weight decay: 1E-02
57
+ - D-Adaptation: False
58
+ - Warmup: False
59
+ - number of epochs: 10
60
+ - mixed_precision_training: bf16
61
+
62
+ ## Training results
63
+ | Epoch | Train Loss | Validation Loss |
64
+ | ----- | ---------- | --------------- |
65
+ | 0 | 1.57 | 1.47 |
66
+
67
+ ## Evaluation results
68
+ | Epoch | f1 | exact_match |
69
+ | ----- | ----- | ----- |
70
+ | 0 | 0.658 | 0.514 |
71
+
72
+ ## Framework versions
73
+ - Transformers: 4.25.1
74
+ - PyTorch: 2.0.0+cu118
75
+ - PyTorch Lightning: 1.8.6
76
+ - Datasets: 2.7.1
77
+ - Tokenizers: 0.13.1
78
+ - Sentence Transformers: 2.2.2
79
+
80
+ ## Additional Information
81
+ This model was trained as part of my Master's Thesis **'Evaluation of transformer based language models for use in service information systems'**. The source code is available on [Github](https://github.com/LLukas22/Master).
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "[MASK]": 128000
3
+ }
config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/deberta-v3-base",
3
+ "architectures": [
4
+ "DebertaV2ForQuestionAnswering"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 768,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 3072,
12
+ "layer_norm_eps": 1e-07,
13
+ "max_position_embeddings": 512,
14
+ "max_relative_positions": -1,
15
+ "model_type": "deberta-v2",
16
+ "norm_rel_ebd": "layer_norm",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 0,
20
+ "pooler_dropout": 0,
21
+ "pooler_hidden_act": "gelu",
22
+ "pooler_hidden_size": 768,
23
+ "pos_att_type": [
24
+ "p2c",
25
+ "c2p"
26
+ ],
27
+ "position_biased_input": false,
28
+ "position_buckets": 256,
29
+ "relative_attention": true,
30
+ "share_att_key": true,
31
+ "torch_dtype": "float32",
32
+ "transformers_version": "4.25.1",
33
+ "type_vocab_size": 0,
34
+ "vocab_size": 128100
35
+ }
lightning_logs/version_0/events.out.tfevents.1679217724.ki-jupyternotebook-8bdd ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f594a654970ddb23e4e1da460c44b8a42fbe5f64bce91dc5a6ffb48699941f0
3
+ size 17954
lightning_logs/version_0/hparams.yaml ADDED
@@ -0,0 +1 @@
 
 
1
+ {}
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c4210486e0d2400fc764f680c5b530e0daea2fa5ed1ffcd6c931c00144f60ad1
3
+ size 735405809
special_tokens_map.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "[CLS]",
3
+ "cls_token": "[CLS]",
4
+ "eos_token": "[SEP]",
5
+ "mask_token": "[MASK]",
6
+ "pad_token": "[PAD]",
7
+ "sep_token": "[SEP]",
8
+ "unk_token": "[UNK]"
9
+ }
spm.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c679fbf93643d19aab7ee10c0b99e460bdbc02fedf34b92b05af343b4af586fd
3
+ size 2464616
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "[CLS]",
3
+ "cls_token": "[CLS]",
4
+ "do_lower_case": false,
5
+ "eos_token": "[SEP]",
6
+ "mask_token": "[MASK]",
7
+ "model_max_length": 1000000000000000019884624838656,
8
+ "name_or_path": "microsoft/deberta-v3-base",
9
+ "pad_token": "[PAD]",
10
+ "sep_token": "[SEP]",
11
+ "sp_model_kwargs": {},
12
+ "special_tokens_map_file": null,
13
+ "split_by_punct": false,
14
+ "tokenizer_class": "DebertaV2Tokenizer",
15
+ "unk_token": "[UNK]",
16
+ "vocab_type": "spm"
17
+ }