Skip to content

Commit 59e707a

Browse files
authored
Fix typo in docs/performance/model-optimizations (#24725)
### Description <!-- Describe your changes. --> Typo inside `docs/performance/model-optimizations` has been fixed ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Improve documentation.
1 parent c9000ba commit 59e707a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/performance/model-optimizations/graph-optimizations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ session = rt.InferenceSession("<model_path>", sess_options)
143143

144144
OrtSession* session;
145145
const ORTCHAR_T* model_path = ORT_TSTR("model_path");
146-
g_ort->CreateSession(env, model_path, session_option, &session);
146+
g_ort->CreateSession(env, model_path, session_options, &session);
147147
```
148148
149149
#### C# API Example

docs/performance/model-optimizations/ort-format-models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ python -m onnxruntime.tools.convert_onnx_models_to_ort <onnx model file or dir>
109109

110110
where:
111111

112-
* onnx mode file or dir is a path to .onnx file or directory containing one or more .onnx models
112+
* onnx model file or dir is a path to .onnx file or directory containing one or more .onnx models
113113

114114
The current optional arguments are available by running the script with the `--help` argument.
115115
Supported arguments and defaults differ slightly across ONNX Runtime versions.

docs/performance/model-optimizations/quantization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ We provide two end-to end examples: [Yolo V3](https://github.com/microsoft/onnxr
233233

234234
## Quantize to Int4/UInt4
235235

236-
ONNX Runtime can quantize certain operators in a model to 4 bit integer types. Block-wise weight-only quantizaiton is applied to the operators. The supported op types are:
236+
ONNX Runtime can quantize certain operators in a model to 4 bit integer types. Block-wise weight-only quantization is applied to the operators. The supported op types are:
237237
- [MatMul](https://github.com/onnx/onnx/blob/main/docs/Operators.md#matmul):
238238
- The node is quantized only if the input `B` is constant
239239
- support QOperator or QDQ format.
@@ -263,7 +263,7 @@ model_int4_path="path/to/save/quantized/model.onnx"
263263

264264
quant_config = matmul_4bits_quantizer.DefaultWeightOnlyQuantConfig(
265265
block_size=128, # 2's exponential and >= 16
266-
is_symmetric=True, # if true, quantize to Int4. otherwsie, quantize to uint4.
266+
is_symmetric=True, # if true, quantize to Int4. otherwise, quantize to uint4.
267267
accuracy_level=4, # used by MatMulNbits, see https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md#attributes-35
268268
quant_format=quant_utils.QuantFormat.QOperator,
269269
op_types_to_quantize=("MatMul","Gather"), # specify which op types to quantize
@@ -272,7 +272,7 @@ quant_config = matmul_4bits_quantizer.DefaultWeightOnlyQuantConfig(
272272
model = quant_utils.load_model_with_shape_infer(Path(model_fp32_path))
273273
quant = matmul_4bits_quantizer.MatMul4BitsQuantizer(
274274
model,
275-
nodes_to_exclude=None, # specify a list of nodes to exclude from quantizaiton
275+
nodes_to_exclude=None, # specify a list of nodes to exclude from quantization
276276
nodes_to_include=None, # specify a list of nodes to force include from quantization
277277
algo_config=quant_config,)
278278
quant.process()

0 commit comments

Comments
 (0)