Commit Graph

108 Commits

Author SHA1 Message Date
austinvhuang 4aa8d0584e Merge branch 'dev' into refactor-tidy 2024-03-12 15:01:46 -04:00
Austin Huang a9aa63fd2e Fix bazel build attempt #2 (remove //base through automation change).
https://github.com/google/gemma.cpp/actions/runs/8252325981/job/22571549312

PiperOrigin-RevId: 615097246
2024-03-12 10:43:26 -07:00
Austin Huang 9345b0aed5 Fix bazel build failure:
https://github.com/google/gemma.cpp/actions/runs/8252325981/job/22571549312

PiperOrigin-RevId: 615073081
2024-03-12 09:41:03 -07:00
Copybara-Service ccd055e06b Merge pull request #82 from google:examples
PiperOrigin-RevId: 615066980
2024-03-12 09:24:24 -07:00
Jan Wassenberg 0d406061c0 Detect and print build type. Refs #88
PiperOrigin-RevId: 614906000
2024-03-11 21:58:10 -07:00
Copybara-Service a9be065c28 Merge pull request #77 from enum-class:rmsnorm
PiperOrigin-RevId: 614642173
2024-03-11 06:25:57 -07:00
enum-class 6712f07ee7 Merge branch 'dev' into rmsnorm 2024-03-11 20:13:18 +08:00
Saman 683c1b5c32
Merge branch 'google:main' into rmsnorm 2024-03-11 20:01:16 +08:00
austinvhuang 60d054e041 move arg definitions out of gemma.h to app.h 2024-03-10 23:49:25 -04:00
Copybara-Service e577198fc0 Merge pull request #78 from enum-class:rmsnorm2
PiperOrigin-RevId: 614480854
2024-03-10 16:14:44 -07:00
austinvhuang 415464b047 fix CMakeLists typo 2024-03-10 15:41:17 -04:00
austinvhuang 5d323c00fe fix tokenizer scope 2024-03-10 13:23:16 -04:00
austinvhuang 0fc80fad05 libgemma refactor - review changes 2024-03-10 12:55:08 -04:00
austinvhuang cc5c24c4f8 remove app.h dependency + fix bazel build 2024-03-08 18:06:43 -05:00
austinvhuang 8c7b2cf61b add README, license to hello_world 2024-03-08 17:59:54 -05:00
austinvhuang 571a5449c4 update commit hash for gemma lib 2024-03-08 17:33:33 -05:00
austinvhuang 03147effbd update loader arg names: cache -> compressed_weights, model -> weights 2024-03-08 17:32:36 -05:00
austinvhuang dfd2fdc1dd Decouple gemma constructor from loader args, update hello_world example, add convenience version of constructor (no uncompressed weights) 2024-03-08 17:26:03 -05:00
austinvhuang 42e53e2da8 [WIP] simplify hello world example, add convenience function. TODO: update git hash in CMakeLists.txt of hello world after push 2024-03-08 14:56:22 -05:00
Jan Wassenberg fce5c8c967 Avoid fadvise on older Android. Fixes #84
PiperOrigin-RevId: 613815953
2024-03-07 22:19:22 -08:00
austinvhuang b67e28d1a0 [WIP] remove args from GetWeights, GetCompressedWeights 2024-03-08 00:00:11 -05:00
Austin Huang 3df06f64c2
Merge pull request #81 from ufownl/feature/separated_kvcache
Separate KV cache from GemmaImpl
2024-03-07 10:10:11 -05:00
RangerUFO 170a9b4690 Make `CreateKVCache` a free function rather than a method 2024-03-07 15:52:55 +08:00
RangerUFO b841612e8c Separate KV cache from GemmaImpl 2024-03-07 15:47:31 +08:00
austinvhuang 6c0388e049 [WIP] refine Runtime struct definition 2024-03-07 01:14:07 -05:00
austinvhuang 49e654258d [WIP] clean up hello_world #includes and CMakeLists.txt 2024-03-07 01:04:25 -05:00
austinvhuang e781007836 [WIP] Remove InferenceArgs from hello_world example, fix ordering of LoaderArgs validation, revert ReplGemma EOT token behavior 2024-03-06 23:21:13 -05:00
austinvhuang 7042316013 [WIP] update GemmaInterface, Gemma, and Generate input parameter specs to remove InferenceArgs. TODO: update hello_world example after git commit hash is available for fetching 2024-03-06 22:22:59 -05:00
austinvhuang 0f6a4b49d5 [WIP] quality tweaks - for constants, defer float cast and use double for intermediate computations, add `model` to EOT token 2024-03-06 15:34:11 -05:00
austinvhuang 5b9d8a9936 [WIP] dev/examples branch merge 2024-03-06 15:10:48 -05:00
austinvhuang 10f7a086aa [WIP] decouple GemmaImpl from CLI args 2024-03-06 15:06:41 -05:00
Jan Wassenberg 3cdd5e524a Fix loop iteration in GeluMulToBF16
Also attempt to speed up builders (parallel)

PiperOrigin-RevId: 613092863
2024-03-05 23:00:47 -08:00
enum-class 843d9b0e1f fix for-loop bounderies 2024-03-06 08:25:50 +08:00
Copybara-Service c8b9675898 Merge pull request #74 from osanseviero:patch-1
PiperOrigin-RevId: 612937722
2024-03-05 12:49:09 -08:00
enum-class bc845515b7 fix style, add kCamelCase style for constexpr in clang-tidy 2024-03-05 20:45:30 +08:00
enum-class 5f016fb433 use hwy/simd for RMSNorm(f, bf, f) calculation 2024-03-05 17:53:52 +08:00
enum-class 507d64e3e6 use hwy/simd for SquaredL2 calculation 2024-03-05 17:37:09 +08:00
Jan Wassenberg bb9b023502 Support Bazel builds. Fixes #16
Also fix nuq/sfp-inl: warning, cast, and disable SCALAR

PiperOrigin-RevId: 612704056
2024-03-04 22:07:25 -08:00
Omar Sanseviero 8c857b957e
Update README.md 2024-03-04 12:58:49 +01:00
Copybara-Service cd7468199c Merge pull request #65 from enum-class:narrowing-issues
PiperOrigin-RevId: 612279564
2024-03-03 18:51:59 -08:00
austinvhuang c378ac2c56 [WIP] hello world example working. TODO: refactor interfaces to decouple arguments 2024-03-03 11:36:48 -05:00
austinvhuang 39cd59caec [WIP] create skeleton for example frontend application 2024-03-03 10:33:29 -05:00
enum-class 90c99c330d use hwy::SignedFromSize traits 2024-03-03 10:56:46 +08:00
Omar Sanseviero 86761dc113
Update README.md 2024-03-01 23:44:38 +01:00
Copybara-Service 808dbdc42b Merge pull request #71 from google:docs
PiperOrigin-RevId: 611785397
2024-03-01 06:04:51 -08:00
austinvhuang b841620d6b add using gemma as a library notes to DEVELOPERS 2024-02-29 23:52:59 -05:00
Paul Chang ae7901c3f4 Minor style fix
Remove some obsolete TODOs.

PiperOrigin-RevId: 611571224
2024-02-29 13:08:26 -08:00
enum-class 626be6deab add StaticCast 2024-02-29 21:00:54 +08:00
Jan Wassenberg b6aaf6bbb8 Fix for Android's 32-bit off_t. Fixes #62
PiperOrigin-RevId: 611249534
2024-02-28 15:30:19 -08:00
Copybara-Service c805fbe780 Merge pull request #66 from google:dev-cleanup
PiperOrigin-RevId: 611207602
2024-02-28 13:22:46 -08:00