ds_config_gpt_TEMPLATE_compression.json 1.91 KB
Newer Older
liangjing's avatar
update  
liangjing committed
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
  "train_batch_size" : CONFIG_BATCH_SIZE,
  "train_micro_batch_size_per_gpu": CONFIG_MBSIZE,
  "steps_per_print": LOG_INTERVAL,

  "zero_optimization": {
    "stage": ZERO_STAGE
  },

  "gradient_clipping": 1.0,
  "prescale_gradients": PRESCALE_GRAD,

  "fp16": {
    "enabled": CONFIG_FP16_ENABLED,
    "loss_scale": 0,
    "loss_scale_window": 500,
    "hysteresis": 2,
    "min_loss_scale": 1,
    "initial_scale_power": 11
  },

  "bf16": {
    "enabled": CONFIG_BF16_ENABLED
  },
  "curriculum_learning": {
    "enabled": CONFIG_CL_ENABLED,
    "curriculum_type": "seqlen",
    "min_difficulty": CONFIG_CL_MIN,
    "max_difficulty": CONFIG_CL_MAX,
    "schedule_type": "fixed_linear",
    "schedule_config": {
      "total_curriculum_step": CONFIG_CL_DURATION,
      "difficulty_step": 8
    }
  },

  "wall_clock_breakdown" : false,

  "compression_training": {
    "weight_quantization": {
      "shared_parameters":{
        "enabled": true,
        "quantizer_kernel": false,
        "schedule_offset": 50,
        "quantize_groups": 48,
        "quantize_verbose": false,
        "quantization_type": "symmetric",
        "rounding": "nearest",
        "fp16_mixed_quantize":{
          "enabled": false,
          "quantize_change_ratio": 0.001
        }
      },
      "different_groups":{
        "wq1": {
          "params": {
              "start_bits": 12, 
              "target_bits": 4,
              "quantization_period": 50
          },
          "modules": [
            "encoder.layers"
          ]
        }
      }
    },
    "activation_quantization": {
      "shared_parameters":{
        "enabled": true,
        "quantization_type": "asymmetric",
        "range_calibration": "static",
        "schedule_offset": 50
      },
      "different_groups":{
        "aq1": {
          "params": { 
              "bits": 8
          },
          "modules": [
            "encoder.layers"
          ]
        }
      }
    }
  }
}