google / google/gemma.cpp

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

Ouverte
#911 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C++
Étoiles
7k
Forks
660
Merge moyen
20 h 43 min
PR mergées (30 j)
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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par API_SERVER_README.md, en particulier la section Usage, et recherchez lequel des fichiers de modèle de Gemma.cpp aux noms similaires correspond à la commande du serveur API gemma3. Reproduisez la commande indiquée et vérifiez qu’un fichier de poids compatible évite l’erreur liée au tenseur manquant post_att_ns_0. Mettez à jour la section Usage avec un exemple connu pour fonctionner et les choix de fichiers requis.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
cpp
Domaine
documentation
Type d'issue
Documentation
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
52/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.