google / google/gemma.cpp

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

Đang mở
#911 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
7k
Fork
660
Merge trung bình
20 giờ 43 phút
Pull request đã merge (30 ngày)
33

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với API_SERVER_README.md, đặc biệt là phần Usage, và điều tra xem tệp model Gemma.cpp nào có tên tương tự tương ứng với lệnh máy chủ API gemma3. Chạy lại lệnh được hiển thị và xác minh rằng một tệp weights tương thích sẽ tránh được lỗi tensor post_att_ns_0 bị thiếu. Cập nhật phần Usage bằng một ví dụ đã được xác nhận là hoạt động và các lựa chọn tệp bắt buộc.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp
Lĩnh vực
documentation
Loại issue
Tài liệu
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
52/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.