You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Next, use the <codeclass="docutils literal notranslate"><spanclass="pre">tools/convert_hf_to_hf_int4.py</span></code> script to convert BF16 weights to INT4 format. Ensure that the <codeclass="docutils literal notranslate"><spanclass="pre">--hf-checkpoint</span></code> parameter points to a directory where <codeclass="docutils literal notranslate"><spanclass="pre">config.json</span></code> contains the correct <codeclass="docutils literal notranslate"><spanclass="pre">quantization_config</span></code>. Slime will automatically utilize INT4 quantization during weight updates.</p>
Next, use the `tools/convert_hf_to_hf_int4.py` script to convert BF16 weights to INT4 format. Ensure that the `--hf-checkpoint` parameter points to a directory where `config.json` contains the correct `quantization_config`. Slime will automatically utilize INT4 quantization during weight updates.
100
93
101
94
```bash
102
95
python tools/convert_hf_to_hf_int4.py \
103
-
--model_id /path/to/your/original/models \
104
-
--output_dir /path/to/your/save/models \
105
-
--local_data_path /path/to/your/wikitext
96
+
--input-dir /path/to/your/original/models \
97
+
--output-dir /path/to/your/save/models \
98
+
--data-dir /path/to/your/wikitext
106
99
```
107
100
108
-
#### 3. Start INT4 Training
101
+
#### 2. Start INT4 Training
109
102
110
103
You need to configure the specific environment variables for quantization settings.
<p>Next, use the <codeclass="docutils literal notranslate"><spanclass="pre">tools/convert_hf_to_hf_int4.py</span></code> script to convert BF16 weights to INT4 format. Ensure that the <codeclass="docutils literal notranslate"><spanclass="pre">--hf-checkpoint</span></code> parameter points to a directory where <codeclass="docutils literal notranslate"><spanclass="pre">config.json</span></code> contains the correct <codeclass="docutils literal notranslate"><spanclass="pre">quantization_config</span></code>. Slime will automatically utilize INT4 quantization during weight updates.</p>
Next, use the `tools/convert_hf_to_hf_int4.py` script to convert BF16 weights to INT4 format. Ensure that the `--hf-checkpoint` parameter points to a directory where `config.json` contains the correct `quantization_config`. Slime will automatically utilize INT4 quantization during weight updates.
100
93
101
94
```bash
102
95
python tools/convert_hf_to_hf_int4.py \
103
-
--model_id /path/to/your/original/models \
104
-
--output_dir /path/to/your/save/models \
105
-
--local_data_path /path/to/your/wikitext
96
+
--input-dir /path/to/your/original/models \
97
+
--output-dir /path/to/your/save/models \
98
+
--data-dir /path/to/your/wikitext
106
99
```
107
100
108
-
#### 3. Start INT4 Training
101
+
#### 2. Start INT4 Training
109
102
110
103
You need to configure the specific environment variables for quantization settings.
0 commit comments