File size: 1,984 Bytes
b708194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
    "input_info": [
        {
            "sample_size": [1, 384],
            "type": "long"
        },
        {
            "sample_size": [1, 384],
            "type": "long"
        },
        {
            "sample_size": [1, 384],
            "type": "long"
        }
    ],
    "compression": 
    [
        {
            "algorithm": "movement_sparsity",
            "params": {
                "schedule": "threshold_polynomial_decay",
                "power": 3,
                "init_importance_threshold": 0.0,
                "final_importance_threshold": 0.1,
                "warmup_start_epoch": 1,
                "warmup_end_epoch": 10,
                "steps_per_epoch": 2767, // 5533,
                "importance_regularization_factor": 0.025,
                "update_per_optimizer_step": true,
            },
            "sparse_structure_by_scopes": [
                ["block", [32, 32], "{re}.*BertAttention*"],
                ["per_dim", [0], "{re}.*BertIntermediate*"],
                ["per_dim", [1], "{re}.*BertOutput*"]
            ],
            "ignored_scopes": ["{re}.*NNCFEmbedding", "{re}.*qa_outputs*"]
        },
        {
            "algorithm": "quantization",
            "initializer": {
                "range": {
                    "num_init_samples": 32,
                    "type": "percentile",
                    "params":
                    {
                        "min_percentile": 0.01,
                        "max_percentile": 99.99
                    }
                },

                "batchnorm_adaptation": {
                    // "num_bn_adaptation_samples": 2
                    "num_bn_adaptation_samples": 200
                }
            },
            "activations":
            {
                "mode": "symmetric"
            },
            "weights":
            {
                "mode": "symmetric",
                "signed": true,
                "per_channel": false
            }
        }
    ]
}