Skip to content

Commit a4bb2df

Browse files
authored
quantize : fix load vocab crash when len is 128 (ggml-org#1160)
* quantize : fix load vocab crash when len is 128 * ci : add quantize job
1 parent b948361 commit a4bb2df

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,19 @@ jobs:
426426
name: whispercpp.jar
427427
path: bindings/java/build/libs/whispercpp-*.jar
428428

429+
quantize:
430+
runs-on: ubuntu-latest
431+
432+
steps:
433+
- name: Clone
434+
uses: actions/checkout@v3
435+
436+
- name: Test quantize
437+
run: |
438+
./models/download-ggml-model.sh tiny.en
439+
make quantize
440+
./quantize models/ggml-tiny.en.bin models/ggml-tiny.en-q4_0.bin q4_0
441+
429442
# - name: Publish package
430443
# if: ${{ github.ref == 'refs/heads/master' }}
431444
# uses: gradle/gradle-build-action@v2

examples/quantize/quantize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ bool whisper_model_quantize(const std::string & fname_inp, const std::string & f
138138
// return false;
139139
//}
140140

141-
char word[128];
141+
char word[129];
142142

143143
for (int i = 0; i < n_vocab; i++) {
144144
uint32_t len;

0 commit comments

Comments
 (0)