Poc to use safetensors (#19175)

* Poc to use safetensors

* Typo

* Final version

* Add tests

* Save with the right name!

* Update tests/test_modeling_common.py

Co-authored-by: Julien Chaumond <julien@huggingface.co>

* Support for sharded checkpoints

* Test from Hub part 1

* Test from hub part 2

* Fix regular checkpoint sharding

* Bump for fixes

Co-authored-by: Julien Chaumond <julien@huggingface.co>
This commit is contained in:
Sylvain Gugger
2022-09-30 10:58:04 -04:00
committed by GitHub
parent dad578e4c3
commit 3e2dd7f92d
8 changed files with 150 additions and 8 deletions

View File

@@ -148,6 +148,7 @@ _deps = [
"rouge-score!=0.0.7,!=0.0.8,!=0.1,!=0.1.1",
"sacrebleu>=1.4.12,<2.0.0",
"sacremoses",
"safetensors>=0.2.1",
"sagemaker>=2.31.0",
"scikit-learn",
"sentencepiece>=0.1.91,!=0.1.92",
@@ -300,6 +301,7 @@ extras["testing"] = (
"protobuf", # Can be removed once we can unpin protobuf
"sacremoses",
"rjieba",
"safetensors",
)
+ extras["retrieval"]
+ extras["modelcreation"]