remisultan commited on
Commit
cea9470
·
1 Parent(s): b2c43be

feat: quantization per channel

Browse files
Files changed (5) hide show
  1. README.md +7 -7
  2. config.json +2 -2
  3. model.onnx +2 -2
  4. model.quant.onnx +2 -2
  5. tokenizer_config.json +1 -2
README.md CHANGED
@@ -38,16 +38,16 @@ This repository provides a ONNX converted and quantized version of meta-llama/Ll
38
  ## 📥 Evaluation Dataset
39
 
40
  We use [`jackhhao/jailbreak-classification`](https://huggingface.co/datasets/jackhhao/jailbreak-classification)
41
- for the evaluation
42
 
43
  ## 🧪 Evaluation Results
44
 
45
- | Model | Accuracy | Precision | Recall | F1 Score | AUC-ROC | Inference Time |
46
- |----------------------------|----------|-----------|--------|----------|---------|----------------|
47
- | Llama-Prompt-Guard-2-22M | 0.9569 | 0.9879 | 0.9260 | 0.9559 | 0.9259 | 33s |
48
- | Llama-Prompt-Guard-2-22M-q | 0.9473 | 1.0000 | 0.8956 | 0.9449 | 0.9032 | 29s |
49
- | Llama-Prompt-Guard-2-86M | 0.9770 | 0.9980 | 0.9564 | 0.9767 | 0.9523 | 1m29s |
50
- | Llama-Prompt-Guard-2-86M-q | 0.8937 | 1.0000 | 0.7894 | 0.8823 | 0.7263 | 1m15s |
51
 
52
  ## 🤗 Usage
53
 
 
38
  ## 📥 Evaluation Dataset
39
 
40
  We use [`jackhhao/jailbreak-classification`](https://huggingface.co/datasets/jackhhao/jailbreak-classification)
41
+ for the evaluation (train+test)
42
 
43
  ## 🧪 Evaluation Results
44
 
45
+ | Model | Accuracy | Precision | Recall | F1 Score | AUC-ROC |
46
+ |----------------------------|----------|-----------|--------|----------|---------|
47
+ | Llama-Prompt-Guard-2-22M | 0.9564 | 0.9888 | 0.9249 | 0.9558 | 0.9234 |
48
+ | Llama-Prompt-Guard-2-22M-q | 0.9579 | 0.9967 | 0.9204 | 0.9449 | 0.9180 |
49
+ | Llama-Prompt-Guard-2-86M | 0.9801 | 0.9984 | 0.9625 | 0.9801 | 0.9519 |
50
+ | Llama-Prompt-Guard-2-86M-q | 0.8989 | 1.0000 | 0.8018 | 0.89 | 0.7452 |
51
 
52
  ## 🤗 Usage
53
 
config.json CHANGED
@@ -1,4 +1,5 @@
1
  {
 
2
  "architectures": [
3
  "DebertaV2ForSequenceClassification"
4
  ],
@@ -9,7 +10,6 @@
9
  "initializer_range": 0.02,
10
  "intermediate_size": 1536,
11
  "layer_norm_eps": 1e-07,
12
- "legacy": true,
13
  "max_position_embeddings": 512,
14
  "max_relative_positions": -1,
15
  "model_type": "deberta-v2",
@@ -29,7 +29,7 @@
29
  "relative_attention": true,
30
  "share_att_key": true,
31
  "torch_dtype": "float32",
32
- "transformers_version": "4.51.3",
33
  "type_vocab_size": 0,
34
  "vocab_size": 128100,
35
  "id2label": {
 
1
  {
2
+ "_name_or_path": "meta-llama/Llama-Prompt-Guard-2-22M",
3
  "architectures": [
4
  "DebertaV2ForSequenceClassification"
5
  ],
 
10
  "initializer_range": 0.02,
11
  "intermediate_size": 1536,
12
  "layer_norm_eps": 1e-07,
 
13
  "max_position_embeddings": 512,
14
  "max_relative_positions": -1,
15
  "model_type": "deberta-v2",
 
29
  "relative_attention": true,
30
  "share_att_key": true,
31
  "torch_dtype": "float32",
32
+ "transformers_version": "4.40.2",
33
  "type_vocab_size": 0,
34
  "vocab_size": 128100,
35
  "id2label": {
model.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:61fe892154f76fffdb583ea9671a89ea5733a5ba5776a714780241559e820c0a
3
- size 284233055
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c6f4d2ebf59be36f3557ad484bf11a51f1b356f570958d1ec1cbbe322a8dfddf
3
+ size 284217797
model.quant.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ab5903d2c34dfc728a36074bbf272840d75df95cec6472efbb311ad06ddc99ee
3
- size 72563602
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ceefc0eedded030caf427faf828729b25a97f3ce70a043987aa68b912fdf836a
3
+ size 72752037
tokenizer_config.json CHANGED
@@ -46,7 +46,6 @@
46
  "cls_token": "[CLS]",
47
  "do_lower_case": false,
48
  "eos_token": "[SEP]",
49
- "extra_special_tokens": {},
50
  "mask_token": "[MASK]",
51
  "max_length": 512,
52
  "model_max_length": 1000000000000000019884624838656,
@@ -58,7 +57,7 @@
58
  "sp_model_kwargs": {},
59
  "split_by_punct": false,
60
  "stride": 0,
61
- "tokenizer_class": "DebertaV2TokenizerFast",
62
  "truncation_side": "right",
63
  "truncation_strategy": "longest_first",
64
  "unk_token": "[UNK]",
 
46
  "cls_token": "[CLS]",
47
  "do_lower_case": false,
48
  "eos_token": "[SEP]",
 
49
  "mask_token": "[MASK]",
50
  "max_length": 512,
51
  "model_max_length": 1000000000000000019884624838656,
 
57
  "sp_model_kwargs": {},
58
  "split_by_punct": false,
59
  "stride": 0,
60
+ "tokenizer_class": "DebertaV2Tokenizer",
61
  "truncation_side": "right",
62
  "truncation_strategy": "longest_first",
63
  "unk_token": "[UNK]",