Jan Wassenberg
5e0cafbdc2
Fix msan error, uninitialized model_training
...
This arose during the unpacking of LoaderArgs into individual ctor args. Probably better to pass LoaderArgs in, and have only a single ctor to reduce confusion.
Also fix includes.
PiperOrigin-RevId: 617386447
2024-03-19 21:12:35 -07:00
Eric Ye
fdb1091b9c
Connect "--weights" parameter to Gemma
...
PiperOrigin-RevId: 617323257
2024-03-19 16:08:26 -07:00
enum-class
4400842337
Minor refactor in Softmax
2024-03-20 00:20:14 +08:00
enum-class
858d5b08c2
Use highway in AddFrom, MulBy, MulByConst, MulByConstAndAdd, create_distribution
2024-03-19 08:38:09 +08:00
Copybara-Service
720f609d84
Merge pull request #102 from google:experimental
...
PiperOrigin-RevId: 616882521
2024-03-18 10:56:52 -07:00
austinvhuang
810b5a0cc2
Update README with more details on contributing code, add experimental/ directory, add READMEs for subdirectories, clean up DEVELOPER notes
2024-03-15 14:10:24 -04:00
Copybara-Service
8fb44ed6dd
Merge pull request #97 from ufownl:feature/topk_flag
...
PiperOrigin-RevId: 615772458
2024-03-14 07:34:55 -07:00
Copybara-Service
a2ef389897
Merge pull request #98 from zeerd:patch-2
...
PiperOrigin-RevId: 615769065
2024-03-14 07:21:23 -07:00
Charles Chan
46c1aca304
Add missing log that point to a failed Generation
2024-03-14 10:03:25 +08:00
Eric Ye
1408784d7b
Remove unused ascii banner string
...
PiperOrigin-RevId: 615504786
2024-03-13 12:21:46 -07:00
Copybara-Service
a0f316d853
Merge pull request #95 from google:conversion
...
PiperOrigin-RevId: 615448039
2024-03-13 09:37:36 -07:00
pculliton
f520e5c25c
Remove WIP messages.
2024-03-13 11:36:19 -04:00
RangerUFO
83ec42954f
Allow changing k parameter of `SampleTopK` as a compiler flag
2024-03-13 13:55:37 +08:00
Jan Wassenberg
5fa2eb1a86
Use bf16-rounded sqrt for scaling embeddings to match Gemma
...
Thanks Daniel & Michael Han for pointing this out.
https://unsloth.ai/blog/gemma-bugs
PiperOrigin-RevId: 615250003
2024-03-12 19:15:13 -07:00
Copybara-Service
0221956b2e
Merge pull request #87 from google:refactor-tidy
...
PiperOrigin-RevId: 615204427
2024-03-12 16:10:47 -07:00
Phil Culliton
b6831a2256
Fixed 7B conversion.
2024-03-12 21:12:28 +00:00
austinvhuang
72247614bb
fix prefill feedback off-by-1, update fetch commit hash
2024-03-12 15:10:44 -04:00
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
Phil Culliton
2161908f50
Added 7B support and args parsing. Still todo: more testing of 7B conversion.
2024-03-07 22:34:14 +00: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