mirror of https://github.com/google/gemma.cpp.git
Changed CompressedLayer and CompressedWeights to be constructed with an instance of a LayerConfig and WeightsConfig respectively. Added CompressedModel to remove ByteStorageT and get rid of most of the type casting, as well as allowing the default destructor to be used and work properly. Adjusted WeightsWrapper and ForwardLayer etc to match. The only remaining template arg is the weight type. This enables all the instantiations to be deleted, apart from one per type. It also enables (but not yet done) the config to be stored in the blob file instead of having to be specified separately. Reduces the size of the gemma_lib and weights shared libraries by a factor of 4.3 and 3.2 respectively. PiperOrigin-RevId: 686870060 |
||
|---|---|---|
| .. | ||
| python | ||
| BUILD.bazel | ||
| analyze.h | ||
| blob_store.cc | ||
| blob_store.h | ||
| compress-inl.h | ||
| compress.cc | ||
| compress.h | ||
| compress_test.cc | ||
| compress_weights.cc | ||
| convert_weights.py | ||
| distortion.h | ||
| distortion_test.cc | ||
| io.cc | ||
| io.h | ||
| io_win.cc | ||
| nuq-inl.h | ||
| nuq_test.cc | ||
| sfp-inl.h | ||
| sfp_test.cc | ||
| shared.h | ||
| test_util-inl.h | ||