]> khamidou — GitHub mirrors - safetensors.git/log
safetensors.git
3 years ago0-sized tensors allowed. (#226)
Nicolas Patry [Thu, 6 Apr 2023 08:27:30 +0000 (10:27 +0200)]
0-sized tensors allowed. (#226)

3 years agoAdding last missing test for validate. (#225)
Nicolas Patry [Thu, 6 Apr 2023 08:27:13 +0000 (10:27 +0200)]
Adding last missing test for validate. (#225)

3 years agoRemove the breaking change of disallowing zero sized tensors. (#221)
Nicolas Patry [Thu, 30 Mar 2023 12:58:08 +0000 (14:58 +0200)]
Remove the breaking change of disallowing zero sized tensors. (#221)

* Remove the breaking change of disallowing zero sized tensors.

Some files out there might exist with this.
While being questionnable, it's not worth doing a breaking change
since there doesn't seem to be either a security implication
nor a performance hit.

* Full support for zero-sized tensor on torch==1.10

* Adding a nice comment.

3 years agoFixing empty shape test. (#218)
Nicolas Patry [Wed, 29 Mar 2023 08:58:08 +0000 (10:58 +0200)]
Fixing empty shape test. (#218)

3 years agoAdd a safety warning in the convertion script. (#219)
Nicolas Patry [Wed, 29 Mar 2023 08:57:32 +0000 (10:57 +0200)]
Add a safety warning in the convertion script. (#219)

* Add a safety warning in the convertion script.

* Fix test temporarily.

3 years agoAdding arithmetic overflow checks (unchecked in release builds). (#207)
Nicolas Patry [Wed, 29 Mar 2023 08:57:14 +0000 (10:57 +0200)]
Adding arithmetic overflow checks (unchecked in release builds). (#207)

* Adding arithmetic overflow checks (unchecked in release builds).

* Fix rebase

3 years agoOverspecify a bit the format. (#215)
Nicolas Patry [Tue, 28 Mar 2023 13:53:50 +0000 (15:53 +0200)]
Overspecify a bit the format. (#215)

* Updating the README to overspecify JSON.

* Overspecify a bit the format.

* Stop being annoying.

* Fixing python cache + gh action.

* Fix audit.

* Fixing rust cache for python directory ?

3 years agoDisallow erroneous buffer. (#206)
Nicolas Patry [Tue, 28 Mar 2023 13:47:23 +0000 (15:47 +0200)]
Disallow erroneous buffer. (#206)

3 years agoDisallowing zero-width tensor. (#205)
Nicolas Patry [Tue, 28 Mar 2023 13:45:39 +0000 (15:45 +0200)]
Disallowing zero-width tensor. (#205)

* Disallowing zero-width tensor.

* Fix test.

3 years agoAdding simple proptest. (#216)
Nicolas Patry [Tue, 28 Mar 2023 13:45:08 +0000 (15:45 +0200)]
Adding simple proptest. (#216)

3 years agoZero width shape are OK (0-rank tensors). They are simply a scalar. (#208)
Nicolas Patry [Tue, 28 Mar 2023 13:32:41 +0000 (15:32 +0200)]
Zero width shape are OK (0-rank tensors). They are simply a scalar. (#208)

* Zero width shape are OK (0-rank tensors). They are simply a scalar.

Reasosn for support is that both torch and numpy support them, and
they flow naturally from the definition that an empty product has
length 1.

* not allowed -> allowed

3 years agoDeactivating codecov commenting. (#217)
Nicolas Patry [Tue, 28 Mar 2023 13:20:39 +0000 (15:20 +0200)]
Deactivating codecov commenting. (#217)

3 years agoIncrease coverage on the error paths. (#214)
Nicolas Patry [Tue, 28 Mar 2023 12:13:38 +0000 (14:13 +0200)]
Increase coverage on the error paths. (#214)

3 years agoFixing codecov rust tag. (#213)
Nicolas Patry [Tue, 28 Mar 2023 10:46:09 +0000 (12:46 +0200)]
Fixing codecov rust tag. (#213)

3 years agoOops. (#212)
Nicolas Patry [Tue, 28 Mar 2023 10:40:20 +0000 (12:40 +0200)]
Oops. (#212)

3 years agoUpload codecov for main branch. (#211)
Nicolas Patry [Tue, 28 Mar 2023 10:33:56 +0000 (12:33 +0200)]
Upload codecov for main branch. (#211)

3 years agoRemove unwrap in prod code. (#209)
Nicolas Patry [Tue, 28 Mar 2023 10:26:19 +0000 (12:26 +0200)]
Remove unwrap in prod code. (#209)

3 years agoMore badges. (#210)
Nicolas Patry [Tue, 28 Mar 2023 10:24:44 +0000 (12:24 +0200)]
More badges. (#210)

* More badges.

* Update action to create codecov.

* Update readmes.

* Fix doc link.

* Two lines for Python and Rust.

* Doc link.

* Fix badge label.

* Use simpler run to get default working-dir.

* Fix ?

* Audit.

* Ignore criterion issue.

* Better command line ?

* codecov token.

* Working dir.

* Specify file.

* Fixing upload only on ubuntu.

* Code coverage only on linux.

* Fix codecov link.

3 years agoMinor improvements for README (#201)
nickkolok [Tue, 28 Mar 2023 08:20:42 +0000 (11:20 +0300)]
Minor improvements for README (#201)

* Use `s for code

* Fix typos in README

* All readmes.

* Adding Rust cache and latest ubuntu for python tests.

---------

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoAdding a minimal version for torch. (#204)
Nicolas Patry [Mon, 27 Mar 2023 08:30:56 +0000 (10:30 +0200)]
Adding a minimal version for torch. (#204)

3 years agoPython 2.0 added a warning on ByteStorage, so using UntypedStorage (#196)
Nicolas Patry [Fri, 17 Mar 2023 14:56:06 +0000 (15:56 +0100)]
Python 2.0 added a warning on ByteStorage, so using UntypedStorage (#196)

* Python 2.0 added a warning on ByteStorage, so using UntypedStorage

directly for that version.

Small error in their docs, `size` got renamed `nbytes`.

* Remove unused work.

3 years agoAdding commit description to convertion PR. (#198)
Nicolas Patry [Fri, 17 Mar 2023 09:42:34 +0000 (10:42 +0100)]
Adding commit description to convertion PR. (#198)

* Adding commit description to convertion PR.

* Update bindings/python/convert.py

Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
* Adding suggestion for reporting issues.

---------

Co-authored-by: Omar Sanseviero <osanseviero@gmail.com>
3 years agoNicer error when failed to find tensor in Rust. (#191)
Nicolas Patry [Mon, 13 Mar 2023 10:35:40 +0000 (11:35 +0100)]
Nicer error when failed to find tensor in Rust. (#191)

Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-94.eu-west-3.compute.internal>
3 years agoMaking sure the safetensors existing PR is up-to-date. (#192)
Nicolas Patry [Mon, 13 Mar 2023 10:35:27 +0000 (11:35 +0100)]
Making sure the safetensors existing PR is up-to-date. (#192)

* Making sure the safetensors existing PR is up-to-date.

* Fixed `target_branch` exists only on details.

3 years agoAdding memmap example to read from file. (#189)
Nicolas Patry [Wed, 8 Mar 2023 12:01:26 +0000 (13:01 +0100)]
Adding memmap example to read from file. (#189)

3 years agoRemove too many keywords. (#187)
Nicolas Patry [Wed, 8 Mar 2023 12:01:11 +0000 (13:01 +0100)]
Remove too many keywords. (#187)

3 years agoVersion 0.3.0 (#186)
Nicolas Patry [Fri, 3 Mar 2023 14:21:07 +0000 (15:21 +0100)]
Version 0.3.0 (#186)

3 years agoPreparing for release 0.3rc1. (#185)
Nicolas Patry [Wed, 1 Mar 2023 20:45:08 +0000 (21:45 +0100)]
Preparing for release 0.3rc1. (#185)

* Preparing for release 0.3rc1.

* Full version number.

3 years agoFaster GPU Loads ?? (#184)
Nicolas Patry [Tue, 28 Feb 2023 15:19:40 +0000 (16:19 +0100)]
Faster GPU Loads ?? (#184)

* Faster GPU Loads ??

Beats my expectations. I wonder what I did do to not see this perf
bottleneck/improvements.

* Pyslice still not fixed on PyO3.

* Upgrade PyO3.

* Using newer pyo3.

* Make benches Windows friendly.

3 years agoBetter Rust API (tch-rs) (#179)
Nicolas Patry [Fri, 24 Feb 2023 13:56:51 +0000 (14:56 +0100)]
Better Rust API (tch-rs) (#179)

* Implementing a trait API for the Rust (should make tch-rs interaction
easier).

* Companion type.

* Re-export major formats + 3rd example in the trait doc.

* Even clearer OpaqueGPU type.

* Moving to `Cow<[u8]>`. Feels simpler.

* Fixes.

3 years agoREADME.md proposed clarity (#181)
Dwayne Robinson [Fri, 24 Feb 2023 10:12:57 +0000 (02:12 -0800)]
README.md proposed clarity (#181)

* README.md proposed clarity

I had to look via a hex editor at an existing .safetensors file to figure it out (maybe this will accelerate others slightly to adopt it 😅), because parentheses "(...)" are not legal JSON, and it wasn't clear to me whether the offsets were file relative or byte buffer relative.

* Update other readme.

---------

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years ago[Major Change] Enforcing tensor alignment (#148)
Nicolas Patry [Tue, 21 Feb 2023 14:23:56 +0000 (15:23 +0100)]
[Major Change] Enforcing tensor alignment (#148)

* [Major Change] Enforcing tensor alignment

- Now the header will automatically align itself to 8 bytes (f64) with
  appending extra spaces as necessary.
- This will allow extra fast memory mapping by reinterpreting bytes as
  f32/f64 etc.. Unaligned bytes do not allow for this. https://www.reddit.com/r/rust/comments/tanaxm/mutating_a_buffer_of_u8s_as_f32s_in_place/
- This does not change contiguousness of tensors
- This does not change the actual spec (we're just putting extra valid bytes
  in the header and using a different serialization ordering)
- Readers should still be able to read old files, they would just need
  to be copied before being cast as their final destination when using
  mmap
- This has no effect for GPU since copy is already necessary (*I think*,
  depends on the cuda API actually if it allows filling f32 addresses
  from raw unaligned bytes).

This change will only be interesting if things like https://github.com/Narsil/fast_gpt2
actually pick up. And even with the copy, load times are still vastly
superior to `pytorch`.

We need to be able to read old files.

* Fixup.

* Clippy fix.

* Cargo fmt (clippy --fix broke it ? :( )

3 years agoadd paddle docs (#177)
yujun [Wed, 8 Feb 2023 10:06:05 +0000 (18:06 +0800)]
add paddle docs (#177)

3 years agoAdd PaddlePaddle backend (#176)
yujun [Tue, 7 Feb 2023 14:44:54 +0000 (22:44 +0800)]
Add PaddlePaddle backend (#176)

* add paddle backend

* add paddle ace

* update docs

* Some modifications.

* Consistency.

* Showing Paddle format.

* donot modify lib.rs

* remove test_deserialization_safe_open test

* rm unused import

* make style

* Style.

---------

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoFixing error message for FileNotFound. (#175)
Nicolas Patry [Mon, 6 Feb 2023 11:05:40 +0000 (12:05 +0100)]
Fixing error message for FileNotFound. (#175)

* Fixing error message for FileNotFound.

* Old PR readme fix.

3 years agoUpdate README.md (#170)
Nicolas Patry [Mon, 30 Jan 2023 13:00:51 +0000 (14:00 +0100)]
Update README.md (#170)

Fixes #169 169

3 years agoClippy fix. (#171)
Nicolas Patry [Mon, 30 Jan 2023 12:59:40 +0000 (13:59 +0100)]
Clippy fix. (#171)

* Clippy fix.

* And tests.

3 years agoBetter error messages on outdated context manager. (#168)
Nicolas Patry [Fri, 20 Jan 2023 14:05:24 +0000 (15:05 +0100)]
Better error messages on outdated context manager. (#168)

* Better error messages on outdated context manager.

* Clippy.

* Remove unwrap.

* Fix.

3 years agoMinor pydoc fixes for torch bindings (#167)
John B Nelson [Fri, 20 Jan 2023 10:07:11 +0000 (02:07 -0800)]
Minor pydoc fixes for torch bindings (#167)

3 years agoFixing the fact that the context manager wasn't properly cleaning up after itself...
Nicolas Patry [Thu, 19 Jan 2023 13:30:56 +0000 (14:30 +0100)]
Fixing the fact that the context manager wasn't properly cleaning up after itself. (#166)

* Adding failing test for windows.

* This should fail.

* Fixing Windows issue by actually dropping the rust resources.

* Making the rust module private.

3 years agoAdding custom error type for users to properly catch. (#165)
Nicolas Patry [Tue, 17 Jan 2023 17:06:34 +0000 (18:06 +0100)]
Adding custom error type for users to properly catch. (#165)

3 years agoAdded JSONSchema of the header. (#151)
KOLANICH [Tue, 17 Jan 2023 16:39:47 +0000 (16:39 +0000)]
Added JSONSchema of the header. (#151)

3 years agoEnabling 3.8 support for M1. (#162)
Nicolas Patry [Tue, 17 Jan 2023 09:04:04 +0000 (10:04 +0100)]
Enabling 3.8 support for M1. (#162)

3 years agoUpdate README.md (#163)
Thomas Wang [Tue, 17 Jan 2023 09:02:28 +0000 (10:02 +0100)]
Update README.md (#163)

* Update README.md

Link to huggingface.co documentation

* Make rust doc match

* Why is the documentation at three different places?

3 years agoNew unreleased version. (#161)
Nicolas Patry [Mon, 16 Jan 2023 15:40:29 +0000 (16:40 +0100)]
New unreleased version. (#161)

* New unreleased version.

* Making only 1 release now.

3 years agoImprove type hinting (#159)
Thomas Wang [Mon, 16 Jan 2023 14:28:18 +0000 (15:28 +0100)]
Improve type hinting (#159)

3 years agoFix byte order detection for `np.uint8` and other types for which byte order is not...
Nicolas Patry [Mon, 16 Jan 2023 12:42:22 +0000 (13:42 +0100)]
Fix byte order detection for `np.uint8` and other types for which byte order is not defined. (#160)

* Fix byte order detection for `np.uint8` and other types for which byte order is not defined.

* Fixing np.uint8 endianness for `save`.

Co-authored-by: KOLANICH <kolan_n@mail.ru>
3 years agoPreparing next version. (#158)
Nicolas Patry [Mon, 16 Jan 2023 09:34:28 +0000 (10:34 +0100)]
Preparing next version. (#158)

3 years agoUpdating rust ergonomics. (#144)
Nicolas Patry [Fri, 30 Dec 2022 13:28:44 +0000 (14:28 +0100)]
Updating rust ergonomics. (#144)

- `get_` prefix removed in a few functions.
- Make error implement Error.

3 years agoFixing torch version parsing. (#143)
Nicolas Patry [Thu, 29 Dec 2022 07:17:56 +0000 (08:17 +0100)]
Fixing torch version parsing. (#143)

* Fixing torch version parsing.

* Anticipating a bit more variations of this.

3 years agoUpdate docstrings & type-hints (#139)
Alvaro Bartolome [Tue, 27 Dec 2022 09:02:52 +0000 (10:02 +0100)]
Update docstrings & type-hints (#139)

3 years agoMaking SAFETENSORS_FAST_GPU=1 work on Windows again. (#140)
Nicolas Patry [Tue, 27 Dec 2022 08:13:28 +0000 (09:13 +0100)]
Making SAFETENSORS_FAST_GPU=1 work on Windows again. (#140)

* Making Windows load cudart differently.

* Remove unsafe.

* Misplaced comment

3 years agoAdding stale bot. (#135)
Nicolas Patry [Mon, 19 Dec 2022 12:50:15 +0000 (13:50 +0100)]
Adding stale bot. (#135)

* Adding stale bot.

* Clippy.

3 years agoFix readme typos (#133)
Vilém Zouhar [Thu, 15 Dec 2022 08:38:37 +0000 (09:38 +0100)]
Fix readme typos (#133)

* fix readme typos

* Replicating docs on all 3 files.

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoNew version. (#132)
Nicolas Patry [Wed, 14 Dec 2022 12:55:28 +0000 (13:55 +0100)]
New version. (#132)

3 years agoUpdate README.md (#131)
Thomas Wang [Wed, 14 Dec 2022 10:23:50 +0000 (11:23 +0100)]
Update README.md (#131)

* Update README.md

* Update other files.

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoFixing it for `diffusers`. (#130)
Nicolas Patry [Tue, 13 Dec 2022 16:17:42 +0000 (17:17 +0100)]
Fixing it for `diffusers`. (#130)

3 years agoNecessary modifications to publish on Rust. (#129)
Nicolas Patry [Tue, 13 Dec 2022 15:14:56 +0000 (16:14 +0100)]
Necessary modifications to publish on Rust. (#129)

* Adding Info to publish.

* Bench.

* Update README.

3 years agoRelease rust. (#126)
Nicolas Patry [Mon, 12 Dec 2022 13:59:19 +0000 (14:59 +0100)]
Release rust. (#126)

3 years agoKeras new format is not safe. (#127)
Nicolas Patry [Mon, 12 Dec 2022 10:40:56 +0000 (11:40 +0100)]
Keras new format is not safe. (#127)

3 years agoAdding support for Python 3.11 on Linux + fix the source build wheel. (#125)
Nicolas Patry [Mon, 12 Dec 2022 09:24:49 +0000 (10:24 +0100)]
Adding support for Python 3.11 on Linux + fix the source build wheel. (#125)

3 years agoPython fuzzing. (#123)
Nicolas Patry [Wed, 7 Dec 2022 16:04:03 +0000 (17:04 +0100)]
Python fuzzing. (#123)

3 years agoMinor typo (#121)
lsb [Tue, 6 Dec 2022 09:25:11 +0000 (01:25 -0800)]
Minor typo (#121)

* Minor typo

* READMEs.

* Fix the reamde? ??

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
3 years agoAdding `cargo fuzz` and found sanitation opportunities. (#119)
Nicolas Patry [Mon, 5 Dec 2022 17:33:12 +0000 (18:33 +0100)]
Adding `cargo fuzz` and found sanitation opportunities. (#119)

* Adding `cargo fuzz` and found sanitation opportunities.

* Better code.

3 years agoSupporting stable-diffusion by default. (#118)
Nicolas Patry [Wed, 30 Nov 2022 16:01:55 +0000 (17:01 +0100)]
Supporting stable-diffusion by default. (#118)

* New updates.

* Force load checkpoint on cpu.

3 years agoSupporting stable-diffusion by default. (#117)
Nicolas Patry [Wed, 30 Nov 2022 13:46:38 +0000 (14:46 +0100)]
Supporting stable-diffusion by default. (#117)

3 years agoAdd pip installation guide (#116)
Patrick von Platen [Mon, 28 Nov 2022 13:26:04 +0000 (14:26 +0100)]
Add pip installation guide (#116)

* Add pip installation guide

* Update the 3 locations.

* Those are not doctests.

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
4 years agoNew version. (#114)
Nicolas Patry [Sat, 26 Nov 2022 21:17:34 +0000 (22:17 +0100)]
New version. (#114)

4 years agoI hate yaml. (#110)
Nicolas Patry [Wed, 23 Nov 2022 19:57:32 +0000 (20:57 +0100)]
I hate yaml. (#110)

4 years agoUpdate workflow. (#109)
Nicolas Patry [Wed, 23 Nov 2022 19:27:02 +0000 (20:27 +0100)]
Update workflow. (#109)

4 years agoM1 fix (pyenv cannot use `3.11`. (#108)
Nicolas Patry [Wed, 23 Nov 2022 18:28:38 +0000 (19:28 +0100)]
M1 fix (pyenv cannot use `3.11`. (#108)

4 years agoFixes https://github.com/huggingface/safetensors/actions/runs/3534003128/jobs/5930362...
Nicolas Patry [Wed, 23 Nov 2022 17:11:10 +0000 (18:11 +0100)]
Fixes https://github.com/huggingface/safetensors/actions/runs/3534003128/jobs/5930362952 (#107)

4 years agoImprove error message when saving bogus object. (#106)
Nicolas Patry [Wed, 23 Nov 2022 14:41:36 +0000 (15:41 +0100)]
Improve error message when saving bogus object. (#106)

4 years agoFix `convert.py` to handle diffusers, and its transformers part (#105)
Nicolas Patry [Wed, 23 Nov 2022 14:41:15 +0000 (15:41 +0100)]
Fix `convert.py` to handle diffusers, and its transformers part (#105)

Turns out `diffusers` does rely on `transformers`:

`pytorch_model.safetensors` was not a recognized filename by
`transformers` which expects it to be named `model.safetensors`.

The convert_generic works by simply creating the new files and changing
the extension, which broke this.

Current proposed fix is to handle specially files named
`pytorch_model.bin` since they are more likely to be `transformers`
files.

This is however not necessarily true, we might want to protect with
checking against `model_info.library_name` though I feel like this is
better to just check against the name, since it's still likely to be a
transformers/diffusers/sentence-transformers thing.

4 years agoPreparing for release. (#104)
Nicolas Patry [Wed, 23 Nov 2022 10:47:35 +0000 (11:47 +0100)]
Preparing for release. (#104)

4 years agoconvert hotfix. (#102)
Nicolas Patry [Tue, 22 Nov 2022 16:00:05 +0000 (17:00 +0100)]
convert hotfix. (#102)

4 years agoSmall qol. (#101)
Nicolas Patry [Tue, 22 Nov 2022 15:07:47 +0000 (16:07 +0100)]
Small qol. (#101)

4 years agoAdding suppot for 3.11 where possible (conda does not support 3.11 yet). (#97)
Nicolas Patry [Tue, 22 Nov 2022 14:36:11 +0000 (15:36 +0100)]
Adding suppot for 3.11 where possible (conda does not support 3.11 yet). (#97)

* Adding suppot for 3.11 where possible (conda does not support 3.11 yet).

* Update .github/workflows/python-release.yml

* Update .github/workflows/python-release-conda.yml

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
4 years agoMaking convertion working with diffusers/stable-diffusion. (#96)
Nicolas Patry [Tue, 22 Nov 2022 14:25:30 +0000 (15:25 +0100)]
Making convertion working with diffusers/stable-diffusion. (#96)

* Making convertion working with diffusers/stable-diffusion.

* Update bindings/python/convert.py

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
4 years agoFixing Windows overflow issue with `c_long`. (#99)
Nicolas Patry [Tue, 22 Nov 2022 14:07:31 +0000 (15:07 +0100)]
Fixing Windows overflow issue with `c_long`. (#99)

* Fixing Windows overflow issue with `c_long`.

* Adding comment to remove the code once fixed.

* Fixing just like PyO3.

4 years agoIgnore unsound criterion. (#100)
Nicolas Patry [Tue, 22 Nov 2022 12:12:42 +0000 (13:12 +0100)]
Ignore unsound criterion. (#100)

4 years ago[docs] we want markdnwo headings to show (#94)
Mishig [Fri, 18 Nov 2022 14:47:04 +0000 (15:47 +0100)]
[docs] we want markdnwo headings to show (#94)

4 years agoAccepting `pathlib.Path` in `save_file/load_file/safe_open`. (#86)
Nicolas Patry [Fri, 18 Nov 2022 14:24:35 +0000 (15:24 +0100)]
Accepting `pathlib.Path` in `save_file/load_file/safe_open`. (#86)

* Accepting `pathlib.Path` in `save_file/load_file/safe_open`.

* as_path.

* Update docstrings.

- Removed unused `:obj:`
- Put `os.PathLike` everywhere it's needed
- python stub.py

4 years agoTorch fixes (#90)
Nicolas Patry [Fri, 18 Nov 2022 13:40:12 +0000 (14:40 +0100)]
Torch fixes (#90)

* Fix `KeyError: torch.float64` when serializing tensors of doubles and `KeyError: BF16` when parsing.

* Fix non-working `_view2torch` because of the forgotten returns.
Added some tests.

* Test in the same style.

* Like previous style.

Co-authored-by: KOLANICH <kolan_n@mail.ru>
4 years ago[docs] fix notebook automatic creation (#92)
Mishig [Fri, 18 Nov 2022 13:39:31 +0000 (14:39 +0100)]
[docs] fix notebook automatic creation (#92)

4 years ago[docs] Fixes the colab btn on speed page (#91)
Mishig [Fri, 18 Nov 2022 13:15:53 +0000 (14:15 +0100)]
[docs] Fixes the colab btn on speed page (#91)

4 years agoAdd missing doc build token (#89)
Mishig [Fri, 18 Nov 2022 12:47:01 +0000 (13:47 +0100)]
Add missing doc build token (#89)

4 years ago[docs] Loading speed benchmark (#80)
Mishig [Fri, 18 Nov 2022 12:18:05 +0000 (13:18 +0100)]
[docs] Loading speed benchmark (#80)

* [docs] Loading speed benchmark

* Add speed reference in index

* chore

* make print statement clearer

* remove repetition

* add notebooks folder

* fuse `device` lines

* add specs

* rm unneded lines

* Update docs/source/speed.mdx

Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
4 years agodelete_doc_comment.yml should only run on pull request closed (#88)
Mishig [Fri, 18 Nov 2022 11:04:01 +0000 (12:04 +0100)]
delete_doc_comment.yml should only run on pull request closed (#88)

4 years agoTrigger doc build on specific changes (#87)
Mishig [Fri, 18 Nov 2022 10:40:30 +0000 (11:40 +0100)]
Trigger doc build on specific changes (#87)

* Trigger doc build on specific changes

* chore

4 years agoMade the rust version consistent between `safetensors` and this crate. (#83)
KOLANICH [Fri, 18 Nov 2022 09:19:54 +0000 (09:19 +0000)]
Made the rust version consistent between `safetensors` and this crate. (#83)

4 years agoPreventing big endian files to be saved. (#82)
Nicolas Patry [Fri, 18 Nov 2022 09:19:27 +0000 (10:19 +0100)]
Preventing big endian files to be saved. (#82)

4 years agoFixing unimplemented into real exception. (#78)
Nicolas Patry [Thu, 17 Nov 2022 19:08:25 +0000 (20:08 +0100)]
Fixing unimplemented into real exception. (#78)

4 years agoAdd installation section (#71)
Mishig [Thu, 17 Nov 2022 10:16:11 +0000 (11:16 +0100)]
Add installation section (#71)

4 years agoFix doc build actions (#70)
Mishig [Thu, 17 Nov 2022 09:37:40 +0000 (10:37 +0100)]
Fix doc build actions (#70)

* Fix doc build actions

* Add remaining doc gh ymls

4 years agopip install .[dev] (#68)
Mishig [Wed, 16 Nov 2022 15:35:03 +0000 (16:35 +0100)]
pip install .[dev] (#68)

* Update setup.py

* add click==8.0.4 to setup.py

* gh actions use pip install .[dev]

* Update binding local dev readme

* fix gh action

* fix gh action

* fix gh action ?

* don't install jax flax on windows

* try removing unused deps

4 years agoNew version. (#63)
Nicolas Patry [Tue, 8 Nov 2022 14:47:29 +0000 (15:47 +0100)]
New version. (#63)

* New version.

* mmap2.

4 years agoAdding cargo audit check. (#64)
Nicolas Patry [Tue, 8 Nov 2022 14:47:22 +0000 (15:47 +0100)]
Adding cargo audit check. (#64)

* Adding cargo audit check.

* Update command line.

* Update affected crates.

4 years agoAdding the convert scripts which will now prevent converting models (#59)
Nicolas Patry [Fri, 4 Nov 2022 16:38:58 +0000 (17:38 +0100)]
Adding the convert scripts which will now prevent converting models (#59)

* Adding the convert scripts which will now prevent converting models

in case they will trigger warnigns in the `transformers` side.
Even if the model is perfectly fine, core maintainers fear an influx
of opened issues.

This is perfectly legit.
On the `transformers` side fixes are on the way: https://github.com/huggingface/transformers/pull/20042

We can wait for this PR to hit `main` before communicating super widely.

In the meantime this script of convertion will now prevent converting
models that would trigger such warnings (so the output of the script
**will** depend on the `transformers` freshness.

* Adding a nicer diff for the error when reloading.

4 years agoPreparing for release. (#60)
Nicolas Patry [Fri, 4 Nov 2022 14:42:43 +0000 (15:42 +0100)]
Preparing for release. (#60)