Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
justinchuby authored Aug 14, 2024
1 parent d65568d commit c71c0ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import onnx_safetensors
model: onnx.ModelProto
tensor_file = "model.safetensors"
# Save weights from to the safetensors file
onnx_safetensors.save_file(model, tensor_file, convert_attributes=True)
onnx_safetensors.save_file(model, tensor_file, convert_attributes=False)

# Save weights from to the safetensors file and clear the raw_data fields of the ONNX model to reduce its size
# model will be updated inplace
onnx_safetensors.save_file(model, tensor_file, convert_attributes=True, strip_data=True)
onnx_safetensors.save_file(model, tensor_file, convert_attributes=False, strip_data=True)
```

0 comments on commit c71c0ef

Please sign in to comment.