Commit Graph

169 Commits

Author SHA1 Message Date
Jan Wassenberg 0d406061c0 Detect and print build type. Refs #88
PiperOrigin-RevId: 614906000
2024-03-11 21:58:10 -07:00
austinvhuang 60d054e041 move arg definitions out of gemma.h to app.h 2024-03-10 23:49:25 -04:00
Phil Culliton 2161908f50 Added 7B support and args parsing. Still todo: more testing of 7B conversion. 2024-03-07 22:34:14 +00:00
austinvhuang 10f7a086aa [WIP] decouple GemmaImpl from CLI args 2024-03-06 15:06:41 -05:00
Phil Culliton c93e1a1e4d Resolved layer ordering, reshaping, MQA->MHA, and quantization. Works only for 2B. 2024-03-05 17:54:55 +00:00
austinvhuang 3c69695c1e transformations and validations (wip) 2024-03-02 14:46:51 -05:00
austinvhuang 7d7d43e661 converter transformations (wip) 2024-03-02 08:11:55 -05:00
austinvhuang 5be9a2243f initial (wip) convert_weights script from pytorch 2024-03-01 15:52:51 -05:00
austinvhuang 0ea7b993de remove --log fixing https://github.com/google/gemma.cpp/issues/59, improve command line args help, add copybara #include sort guards in more source files, add README sections on running faster and related projects 2024-02-28 15:18:40 -05:00
Jan Wassenberg 272f17ddb3 Warning fixes: unused member, cast, unused function
PiperOrigin-RevId: 611074887
2024-02-28 05:54:22 -08:00
Copybara-Service 1a1dd90287 Merge pull request #33 from shirayu:add_eot_option
PiperOrigin-RevId: 610838070
2024-02-27 12:32:01 -08:00
Jan Wassenberg 179ecf9e78 Warn instead of assert for setaffinity. Fixes #49
PiperOrigin-RevId: 610638517
2024-02-26 22:46:11 -08:00
Dan Zheng 4c155bd3df Restore reverted changes.
Sync to 84444c93a4.

PiperOrigin-RevId: 610263918
2024-02-25 19:32:07 -08:00
Silvio Traversaro 696597383c Copybara import of the project:
--
19694e1f2e by Silvio Traversaro <silvio@traversaro.it>:

Do not pass explicitly -O2 flag to compiler in Release build

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/gemma.cpp/pull/3 from traversaro:patch-1 19694e1f2e
PiperOrigin-RevId: 610096914
2024-02-24 20:41:33 -08:00
Dan Zheng 84444c93a4 Revert "Copybara configuration update."
This reverts commit c03b5da542.

Restore lost changes due to improper Copybara syncing.
2024-02-24 15:15:14 -08:00
Dan Zheng c03b5da542 Copybara configuration update.
PiperOrigin-RevId: 609931218
2024-02-24 12:02:47 -08:00
Yuta Hayashibe 1a95cf3274 Add --eot_line option 2024-02-24 23:27:33 +09:00
David Coles 39e385782c Allow building on Windows using `clang-cl` toolchain
It's not possible to build `gemma.cpp` with the standard MSVC front-end
as it doesn't support arrays more than `0x7ffffffff` bytes (see Compiler Error C2148),
however this isn't a problem with the optional Visual Studio Clang/LLVM frontend.

This can be specified using the `-T` flag when running CMake:

```
$ cmake -B build -T ClangCL
$ cmake --build build --config Release
```

Windows doesn't provide `pread`/`pwrite` so this must be emulated using
the `ReadFile`/`WriteFile` Win32 APIs.

`_CRT_SECURE_NO_WARNINGS` is defined to prevent a large number of warnings
about using "depricated" function names (e.g. `close` instead of `_close`).

`NOMINMAX` is defined to prevent the `min`/`max` macros from `windows.h`
from conflicting with expressions like `std::min`. Generally libraries should
avoid including `windows.h` in their public headers or define `WIN32_LEAN_AND_MEAN`
before including the `windows.h` header, but this unfortunately isn't always the case.
2024-02-23 00:38:54 -08:00
Austin Huang e29cd566cf initial commit 2024-02-21 03:31:22 +00:00