Give a known-good example for https://github.com/google/gemma.cpp/blob/main/API_SERVER_README.md
- Dominant language
- C++
- Stars
- 7k
- Forks
- 660
- Avg merge
- 20h 43m
- Merged PRs (30d)
- 33
Description
Would it be possible to give at least one known-working example for using Gemma.cpp as an API server, as described in https://github.com/google/gemma.cpp/blob/main/API_SERVER_README.md?
To wit, building and running Gemma with one of the Gemma.cpp-specific models from kaggle yields this:
```
./bazel-bin/gemma_api_server --weights $HOME/Downloads/gemma-3/2b-pt.sbs --tokenizer $HOME/Downloads/gemma-3/tokenizer.spm --model gemma3
Loading model... 5012344832 blob bytes (100.00%) of bf16 normalizer.cc(52) LOG(INFO) precompiled_charsmap is empty. use identity normalization. Abort at weights.cc:753: Tensor post_att_ns_0 is required but not found in file.
/usr/bin/bash: line 3: 2931544 Aborted (core dumped) ( ./bazel-bin/gemma_api_server --weights $HOME/Downloads/gemma-3/2b-pt.sbs --tokenizer $HOME/Downloads/gemma-3/tokenizer.spm --model gemma3 )
/usr/bin/bash: line 4: /tmp/gemini-shell-WIkCYY/pgrep.tmp: No such file or directory
```
Specifically, at the [Usage section][is], it would be nice to hint which one of the several identical-seeming files might work.
[is]: https://github.com/google/gemma.cpp/blob/main/API_SERVER_README.md#usage
Contributor guide
Research direction
Start with API_SERVER_README.md, especially the Usage section, and investigate which of the similarly named Gemma.cpp model files matches the gemma3 API server command. Reproduce the shown command and verify a compatible weights file avoids the missing post_att_ns_0 tensor error. Update the Usage section with one known-working example and the required file choices.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100