gemma.cpp/gemma
The gemma.cpp Authors ba10c88a94 Add C API and C# interop files
This change adds a basic C API that allows access to Gemma functionality from other programming languages. The functionality is exposed via a shared library (DLL on Windows), with C++ interfaces and a basic C# interop wrapper included.

To build the DLL, use the `windows-dll` preset, which includes the C and C++ sources as follows:
```
cmake --preset windows-dll
cmake --build --config Release --preset windows-dll -j 4
```
This should generate a `gemma.dll` in `<build-dir>/Release`.

To build for non-Windows, the appropriate C++ DLL linking will need to be done to generate a shared library for the target OS.

PiperOrigin-RevId: 750246272
2025-04-22 10:35:47 -07:00
..
bindings Add C API and C# interop files 2025-04-22 10:35:47 -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 Merge pull request #529 from ufownl:refactor/wrap_and_tokenize 2025-04-08 09:22:26 -07:00
common.h Merge pull request #529 from ufownl:refactor/wrap_and_tokenize 2025-04-08 09:22:26 -07:00
configs.cc Set the secondary EOS for Gemma2 2025-03-22 01:32:22 +08:00
configs.h Minor cleanup, on-demand NUQ buffer allocation 2025-04-16 10:49:43 -07:00
configs_test.cc Moved the vit config fields to their own config struct 2025-01-15 01:09:49 -08:00
gemma-inl.h Internal change. 2025-04-12 20:27:49 -07:00
gemma.cc Major refactor of allocator/args: 2025-04-10 01:29:54 -07:00
gemma.h Add C API and C# interop files 2025-04-22 10:35:47 -07:00
gemma_args.h Add non-interactive mode support 2025-04-16 16:26:52 +05:30
kv_cache.cc Add KVCache.DeepCopy() . Will be useful for implementing sampling functionality like beam sampling, parallel sampling, CoT Decoding (à la https://arxiv.org/abs/2402.10200) 2025-02-10 04:10:29 -08:00
kv_cache.h Add KVCache.DeepCopy() . Will be useful for implementing sampling functionality like beam sampling, parallel sampling, CoT Decoding (à la https://arxiv.org/abs/2402.10200) 2025-02-10 04:10:29 -08:00
run.cc Add C API and C# interop files 2025-04-22 10:35:47 -07:00
tensor_index.cc Major refactor of allocator/args: 2025-04-10 01:29:54 -07:00
tensor_index.h Major refactor of allocator/args: 2025-04-10 01:29:54 -07:00
tensor_index_test.cc Moved the vit config fields to their own config struct 2025-01-15 01:09:49 -08:00
tokenizer.cc Merge pull request #529 from ufownl:refactor/wrap_and_tokenize 2025-04-08 09:22:26 -07:00
tokenizer.h Merge pull request #529 from ufownl:refactor/wrap_and_tokenize 2025-04-08 09:22:26 -07:00
weights.cc Major refactor of allocator/args: 2025-04-10 01:29:54 -07:00
weights.h Major refactor of allocator/args: 2025-04-10 01:29:54 -07:00