google / google/gemma.cpp

Give a known-good example for https://github.com/google/gemma.cpp/blob/main/API_SERVER_README.md

オープン
#911 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
7k
フォーク
660
平均マージ
20時間 43分
マージ済み PR(30日)
33

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

API_SERVER_README.md、特に Usage セクションから始め、名前が似ている Gemma.cpp のモデルファイルのうち、gemma3 API サーバーコマンドに対応するものを調査してください。示されているコマンドを再現し、互換性のある重みファイルによって、欠落している post_att_ns_0 tensor のエラーを回避できることを確認してください。Usage セクションを、既知の動作例と必要なファイルの選択肢で更新してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp
領域
documentation
issue の種類
ドキュメント
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
52/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。