bergum commited on
Commit
b4afdfd
1 Parent(s): db54c50

Add model card

Browse files
Files changed (1) hide show
  1. README.md +69 -0
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - generated_from_trainer
5
+ datasets:
6
+ - emotion
7
+ metrics:
8
+ - accuracy
9
+ model-index:
10
+ - name: xtremedistil-l6-h384-emotion
11
+ results:
12
+ - task:
13
+ name: Text Classification
14
+ type: text-classification
15
+ dataset:
16
+ name: emotion
17
+ type: emotion
18
+ args: default
19
+ metrics:
20
+ - name: Accuracy
21
+ type: accuracy
22
+ value: 0.928
23
+ ---
24
+ # xtremedistil-l6-h384-emotion
25
+ This model is a fine-tuned version of [microsoft/xtremedistil-l6-h384-uncased](https://huggingface.co/microsoft/xtremedistil-l6-h384-uncased) on the emotion dataset.
26
+ It achieves the following results on the evaluation set:
27
+ - Accuracy: 0.928
28
+
29
+ This model can be quantized to int8 and retain accuracy
30
+ - Accuracy 0.912
31
+
32
+ <pre>
33
+ import transformers
34
+ import transformers.convert_graph_to_onnx as onnx_convert
35
+ from pathlib import Path
36
+
37
+ pipeline = transformers.pipeline("text-classification",model=model,tokenizer=tokenizer)
38
+ onnx_convert.convert_pytorch(pipeline, opset=11, output=Path("xtremedistil-l6-h384-emotion.onnx"), use_external_format=False)
39
+ from onnxruntime.quantization import quantize_dynamic, QuantType
40
+ quantize_dynamic("xtremedistil-l6-h384-emotion.onnx", "xtremedistil-l6-h384-emotion-int8.onnx",
41
+ weight_type=QuantType.QUInt8)
42
+ </pre>
43
+
44
+
45
+ ### Training hyperparameters
46
+ The following hyperparameters were used during training:
47
+ - learning_rate: 3e-05
48
+ - train_batch_size: 128
49
+ - eval_batch_size: 8
50
+ - seed: 42
51
+ - num_epochs: 14
52
+ ### Training results
53
+ <pre>
54
+ Epoch Training Loss Validation Loss Accuracy
55
+ 1 No log 0.960511 0.689000
56
+ 2 No log 0.620671 0.824000
57
+ 3 No log 0.435741 0.880000
58
+ 4 0.797900 0.341771 0.896000
59
+ 5 0.797900 0.294780 0.916000
60
+ 6 0.797900 0.250572 0.918000
61
+ 7 0.797900 0.232976 0.924000
62
+ 8 0.277300 0.216347 0.924000
63
+ 9 0.277300 0.202306 0.930500
64
+ 10 0.277300 0.192530 0.930000
65
+ 11 0.277300 0.192500 0.926500
66
+ 12 0.181700 0.187347 0.928500
67
+ 13 0.181700 0.185896 0.929500
68
+ 14 0.181700 0.185154 0.928000
69
+ </pre>