gemma.cpp/gemma
Jan Wassenberg 8d0882b966 Huge refactor of weight handling and model loading.
Weight handling:
- new ModelStore2 supports both pre-2025 multi-file and single-file formats
- simpler ForEachTensor with TensorArgs
- tensors are constructed with their full suffixed name

I/O:
- support mmap and stride
- Simplified SbsWriter, single insert(); add SbsReader

Misc:
- kMockTokenizer: allow creating with unavailable tokenizer
- configs.h: Simpler enum validity checks via kSentinel
- matmul.h: remove unused enable_bind (now in allocator.h)
- tensor_info: single TensorInfoRegistry class, rename from tensor_index.h

Frontends:
- Replace Allocate/CreateGemma with ctor(LoaderArgs, MatMulEnv&)
- Deduce model/weight type, remove --model and parsing
- Replace most common.h includes with configs.h
- Remove --compressed_weights, use --weights instead
- Remove ModelInfo, replaced by ModelConfig.

Backprop:
- Reduce max loss, remove backward_scalar_test (timeout)
- Update thresholds because new RandInit changes rng eval order and thus numerics
PiperOrigin-RevId: 755317484
2025-05-06 04:44:21 -07:00
..
bindings Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
evals Add MMLU eval to github 2024-05-20 10:20:53 -07:00
instantiations Eliminated TConfig. 2024-10-17 05:04:22 -07:00
activations.h Major refactor of allocator/args: 2025-04-10 01:29:54 -07:00
common.cc Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
common.h Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
configs.cc Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
configs.h Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
configs_test.cc Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
gemma-inl.h Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
gemma.cc Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
gemma.h Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
gemma_args.h Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
kv_cache.cc Cleanup: include fixes/comments, fix leak, vector reserve 2025-04-22 12:01:46 -07:00
kv_cache.h Cleanup: include fixes/comments, fix leak, vector reserve 2025-04-22 12:01:46 -07:00
model_store.cc Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
model_store.h Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
run.cc Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
tensor_info.cc Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
tensor_info.h Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
tensor_info_test.cc Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
tokenizer.cc Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
tokenizer.h Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
weights.cc Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00
weights.h Huge refactor of weight handling and model loading. 2025-05-06 04:44:21 -07:00