quantize : fix load vocab crash when len is 128 (#1160)

* quantize : fix load vocab crash when len is 128

* ci : add quantize job
This commit is contained in:
Jhen-Jie Hong 2023-08-06 16:04:42 +08:00 committed by GitHub
parent b948361956
commit a4bb2df36a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -426,6 +426,19 @@ jobs:
name: whispercpp.jar
path: bindings/java/build/libs/whispercpp-*.jar
quantize:
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
- name: Test quantize
run: |
./models/download-ggml-model.sh tiny.en
make quantize
./quantize models/ggml-tiny.en.bin models/ggml-tiny.en-q4_0.bin q4_0
# - name: Publish package
# if: ${{ github.ref == 'refs/heads/master' }}
# uses: gradle/gradle-build-action@v2

View File

@ -138,7 +138,7 @@ bool whisper_model_quantize(const std::string & fname_inp, const std::string & f
// return false;
//}
char word[128];
char word[129];
for (int i = 0; i < n_vocab; i++) {
uint32_t len;