llama.cpp/gguf-py/gguf
Sigbjørn Skjæret b72c20b85c
Fix conversion of unnormalized BF16->BF16 weights (#7843)
* add truncate_bf16

* truncate intermediate fp32 if converting bf16 to bf16

* fix masking in __compute_fp32_to_bf16

* np.int16 no longer used

* missing cast and additional numpy 2.x fix

* ggml-impl : do not flush bf16 subnormals to zero

* ggml : add reference fp32 to bf16 conversion

The fast version is no longer equivalent for all platforms
because of the handling of subnormal values.

* gguf-py : remove flush to zero for bf16 subnormals

* gguf-py : remove float32 truncation to bf16

Rounding achieves the same thing in the cases where this was used.

* missed prototype update in merge

* merge cleanup

---------

Co-authored-by: Francis Couture-Harpin <git@compilade.net>
2024-08-02 15:11:39 -04:00
..
__init__.py convert-*.py: GGUF Naming Convention Refactor and Metadata Override Refactor (#7499) 2024-07-18 20:40:15 +10:00
constants.py convert-*.py: GGUF Naming Convention Refactor and Metadata Override Refactor (#7499) 2024-07-18 20:40:15 +10:00
gguf_reader.py py : type-check all Python scripts with Pyright (#8341) 2024-07-07 15:04:39 -04:00
gguf_writer.py py: add_array() will not add to kv store if value is an empty array (#8774) 2024-07-31 00:57:03 +10:00
gguf.py gguf-py: Refactor and allow reading/modifying existing GGUF files (#3981) 2023-11-11 08:04:50 +03:00
lazy.py convert_hf : faster lazy safetensors (#8482) 2024-07-15 23:13:10 -04:00
metadata.py gguf-py : fix some metadata name extraction edge cases (#8591) 2024-07-20 21:58:49 -04:00
py.typed convert : various script cleanups/fixes + merges and special token handling (#2842) 2023-08-30 11:25:50 +03:00
quants.py Fix conversion of unnormalized BF16->BF16 weights (#7843) 2024-08-02 15:11:39 -04:00
tensor_mapping.py convert_hf : faster lazy safetensors (#8482) 2024-07-15 23:13:10 -04:00
utility.py gguf-py : fix some metadata name extraction edge cases (#8591) 2024-07-20 21:58:49 -04:00
vocab.py Move convert.py to examples/convert-legacy-llama.py (#7430) 2024-05-30 21:40:00 +10:00