Skip to content

Commit c68b0ca

Browse files
fix py script
1 parent 1176f07 commit c68b0ca

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

guides/ipynb/quantization/overview.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@
7373
"\n",
7474
"## Quantizing Keras Models\n",
7575
"\n",
76-
"Quantization is applied explicitly after layers or models are built. The API is designed to be predictable: you call quantize, the graph is rewritten,the weights are replaced, and you can immediately run inference or save the model.\n",
76+
"Quantization is applied explicitly after layers or models are built. The API is designed to be predictable: you call quantize, the graph is rewritten, the weights are replaced, and you can immediately run inference or save the model.\n",
7777
"\n",
7878
"Typical workflow:\n",
7979
"\n",
8080
"1. **Build / load your FP model.** Train if needed. Ensure `build()` or a forward pass has materialized weights.\n",
81-
"2. **(GPTQ only)** Keras may run a short calibration pass to collect activation ranges (you can pass a small, representative dataset).\n",
81+
"2. **(GPTQ only)** For GPTQ, Keras runs a short calibration pass to collect activation statistics. You will need to provide a small, representative dataset for this purpose.\n",
8282
"3. **Invoke quantization.** Call `model.quantize(\"<mode>\")` or `layer.quantize(\"<mode>\")` with `\"int8\"`, `\"int4\"`, `\"float8\"`, or `\"gptq\"` (weight-only).\n",
8383
"4. **Use or save.** Run inference, or `model.save(...)`. Quantization state (packed weights, scales, metadata) is preserved on save/load.\n",
8484
"\n",

guides/md/quantization/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ Keras currently focuses on the following numeric formats. Each mode can be appli
7171

7272
## Quantizing Keras Models
7373

74-
Quantization is applied explicitly after layers or models are built. The API is designed to be predictable: you call quantize, the graph is rewritten,the weights are replaced, and you can immediately run inference or save the model.
74+
Quantization is applied explicitly after layers or models are built. The API is designed to be predictable: you call quantize, the graph is rewritten, the weights are replaced, and you can immediately run inference or save the model.
7575

7676
Typical workflow:
7777

7878
1. **Build / load your FP model.** Train if needed. Ensure `build()` or a forward pass has materialized weights.
79-
2. **(GPTQ only)** Keras may run a short calibration pass to collect activation ranges (you can pass a small, representative dataset).
79+
2. **(GPTQ only)** For GPTQ, Keras runs a short calibration pass to collect activation statistics. You will need to provide a small, representative dataset for this purpose.
8080
3. **Invoke quantization.** Call `model.quantize("<mode>")` or `layer.quantize("<mode>")` with `"int8"`, `"int4"`, `"float8"`, or `"gptq"` (weight-only).
8181
4. **Use or save.** Run inference, or `model.save(...)`. Quantization state (packed weights, scales, metadata) is preserved on save/load.
8282

guides/quantization/overview.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
6464
## Quantizing Keras Models
6565
66-
Quantization is applied explicitly after layers or models are built. The API is designed to be predictable: you call quantize, the graph is rewritten,the weights are replaced, and you can immediately run inference or save the model.
66+
Quantization is applied explicitly after layers or models are built. The API is designed to be predictable: you call quantize, the graph is rewritten, the weights are replaced, and you can immediately run inference or save the model.
6767
6868
Typical workflow:
6969
7070
1. **Build / load your FP model.** Train if needed. Ensure `build()` or a forward pass has materialized weights.
71-
2. **(GPTQ only)** Keras may run a short calibration pass to collect activation ranges (you can pass a small, representative dataset).
71+
2. **(GPTQ only)** For GPTQ, Keras runs a short calibration pass to collect activation statistics. You will need to provide a small, representative dataset for this purpose.
7272
3. **Invoke quantization.** Call `model.quantize("<mode>")` or `layer.quantize("<mode>")` with `"int8"`, `"int4"`, `"float8"`, or `"gptq"` (weight-only).
7373
4. **Use or save.** Run inference, or `model.save(...)`. Quantization state (packed weights, scales, metadata) is preserved on save/load.
7474

0 commit comments

Comments
 (0)