Update README.md (#7043)

* Fix the precision type (switch from nonexistent `int32` to `fp32`).
This commit is contained in:
Marek Šuppa 2021-04-05 19:03:14 +02:00 committed by GitHub
parent 2b8513539e
commit 008065aab1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,7 +31,7 @@ You can use commands like the following to convert a pre-trained PyTorch GPT-2 m
```
python -m onnxruntime.transformers.convert_to_onnx -m gpt2 --model_class GPT2LMHeadModel --output gpt2.onnx -p fp32
python -m onnxruntime.transformers.convert_to_onnx -m distilgpt2 --model_class GPT2LMHeadModel --output distilgpt2.onnx -p fp16 --use_gpu --optimize_onnx
python -m onnxruntime.transformers.convert_to_onnx -m [path_to_gpt2_pytorch_model_directory] --output quantized.onnx -p int32 --optimize_onnx
python -m onnxruntime.transformers.convert_to_onnx -m [path_to_gpt2_pytorch_model_directory] --output quantized.onnx -p fp32 --optimize_onnx
```
The tool will also verify whether the ONNX model and corresponding PyTorch model generate same outputs given same random inputs.