Conversation
Qualify color constants and APIClient with the gcpp namespace in gemma/api_client.cc to resolve potential symbol lookup issues.
Update CMake configuration and utility functions to enable compilation with Emscripten. This includes setting Wasm-specific flags like memory64 and SIMD, implementing platform-specific memory detection, and adding guards for features like OpenSSL that may be unavailable in a web environment.
|
For a little more context, we'd like to start using gemma.cpp in some experimental Wasm AI benchmarks. If you're interested, I can also add CI testing for this configuration and help keep it green if needed. |
jan-wassenberg
left a comment
There was a problem hiding this comment.
Nice. Benchmark sounds interesting, is there any info you can share?
Sure, we'd welcome a PR to add the CI and your help keeping it green.
|
There's some more info on the benchmarks in this repo. Currently, it's mainly transformers.js (ONNX) and LiteRT workloads, but we'd like to add some more. We're still trying to figure out if we want to put Gemma.cpp in the default suite (what contributes to the overall score) since downloading such a big model would be slow. Gemma.cpp can at least go in the experimental benchmarks that devs can look at though. We're planning to use the benchmarks to guide generating optimized Wasm SIMD from LLVM, improve v8 performance, and help see the impact of the FP16 proposal for Wasm. In regards to the model size, is there a smaller model (<2B) that could be used for the benchmark that would simulate a similar workload? |
Update CMake configuration and utility functions to enable compilation
with Emscripten. This includes setting Wasm-specific flags like
memory64 and SIMD, implementing platform-specific memory detection, and
adding guards for features like OpenSSL that may be unavailable in a
web environment.