mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Update README.md (#7043)
* Fix the precision type (switch from nonexistent `int32` to `fp32`).
This commit is contained in:
parent
2b8513539e
commit
008065aab1
1 changed files with 1 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue