edmundmills commited on
Commit
dbd25a0
1 Parent(s): 27ee064

Upload . with huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - deberta-v3
4
+ inference:
5
+ parameters:
6
+ function_to_apply: "none"
7
+ widget:
8
+ - text: "I care only about my own utility. I like dogs. | I cuddled with my dog today."
9
+ ---
10
+ # Conditional Utilitarian Deberta 01
11
+
12
+ ## Model description
13
+
14
+ This is a [Deberta-based](https://huggingface.co/microsoft/deberta-v3-large) model.
15
+ ## Intended use
16
+
17
+ The main use case is the computation of utility estimates of first-person and third-person text scenarios, under extra contextual information. The person's utility to evaluate can be specified in the context.
18
+
19
+ ## Limitations
20
+
21
+ The model was trained on only ~10000 general utility examples and ~800 conditional utility examples, so it should be expected to have limited performance.
22
+
23
+ It does not have the capability of interpreting highly complex or unusual scenarios, and it does not have hard guarantees on its domain of accuracy.
24
+
25
+ ## How to use
26
+
27
+ Given a scenario S under a context C, and the model U, one computes the estimated conditional utility with `U(f'{C} | {S}') - U(C)`.
28
+
29
+ In addition, you should specify the person for whom to evaluate utility. The model was trained using the phrases `f"I care only about {person}'s utility."` and `"I care only about my own utility."`.
30
+
31
+ ## Training data
32
+
33
+ The first training data is the train split from the Utilitarianism part of the [ETHICS dataset](https://arxiv.org/abs/2008.02275).
34
+
35
+ The second training data consists of ~800 crowdsourced examples of triples (S, C0, C1) consisting of one scenario and two possible contexts, where `U(S | C0) > U(S | C1)`.
36
+
37
+ Both of these sets are converted from the first person to the third person using GPT3.
38
+
39
+ ## Training procedure
40
+
41
+ DeBERTa-v3-large was fine-tuned the model over the training data, with a learning rate of `1e-5`, a batch size of `16`, and for 1 epoch.
42
+
43
+ The training procedure generally follows [tune.py](https://github.com/hendrycks/ethics/blob/3e4c09259a1b4022607da093e9452383fc1bb7e3/utilitarianism/tune.py). In addition to the ranked pairs of both first and third person scenarios, the examples were included to apply the following restrictions:
44
+
45
+ - First person examples where you care about your own utility and the corresponding third person example where the subject's utility is cared about should have the same utility.
46
+ - Third person examples where you care about your own utility and first person examples where you care about a random person's utility (not in the scenario) should each have zero utility.
47
+
48
+ ## Evaluation results
49
+
50
+ The model achieves ~80% accuracy over the ethics test set, from the same distribution as the training data.
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "[MASK]": 128000
3
+ }
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/deberta-v3-large",
3
+ "architectures": [
4
+ "DebertaV2ForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 1024,
10
+ "id2label": {
11
+ "0": "LABEL_0"
12
+ },
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 4096,
15
+ "label2id": {
16
+ "LABEL_0": 0
17
+ },
18
+ "layer_norm_eps": 1e-07,
19
+ "max_position_embeddings": 512,
20
+ "max_relative_positions": -1,
21
+ "model_type": "deberta-v2",
22
+ "norm_rel_ebd": "layer_norm",
23
+ "num_attention_heads": 16,
24
+ "num_hidden_layers": 24,
25
+ "pad_token_id": 0,
26
+ "pooler_dropout": 0,
27
+ "pooler_hidden_act": "gelu",
28
+ "pooler_hidden_size": 1024,
29
+ "pos_att_type": [
30
+ "p2c",
31
+ "c2p"
32
+ ],
33
+ "position_biased_input": false,
34
+ "position_buckets": 256,
35
+ "relative_attention": true,
36
+ "share_att_key": true,
37
+ "torch_dtype": "float32",
38
+ "transformers_version": "4.24.0",
39
+ "type_vocab_size": 0,
40
+ "vocab_size": 128100
41
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66531f5a7258eb1a1e539737ab35eddf82d82afd8fd5b92d7ca20510019f387b
3
+ size 1740389291
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_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "[CLS]",
3
+ "cls_token": "[CLS]",
4
+ "do_lower_case": false,
5
+ "eos_token": "[SEP]",
6
+ "mask_token": "[MASK]",
7
+ "name_or_path": "microsoft/deberta-v3-large",
8
+ "pad_token": "[PAD]",
9
+ "sep_token": "[SEP]",
10
+ "sp_model_kwargs": {},
11
+ "special_tokens_map_file": null,
12
+ "split_by_punct": false,
13
+ "tokenizer_class": "DebertaV2Tokenizer",
14
+ "unk_token": "[UNK]",
15
+ "vocab_type": "spm"
16
+ }