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 |
||
|---|---|---|
| .. | ||
| hello_world | ||
| README.md | ||
README.md
Examples
In this directory are some simple examples illustrating usage of gemma.cpp as
a library beyond the interactive gemma app implemented in run.cc.
hello_world/- minimal/template project for usinggemma.cppas a library. It sets up the model state and generates text for a single hard coded prompt.