Skip to content

Commit

Permalink
quantize : fix load vocab crash when len is 128 (ggerganov#1160)
Browse files Browse the repository at this point in the history
* quantize : fix load vocab crash when len is 128

* ci : add quantize job
  • Loading branch information
jhen0409 committed Aug 6, 2023
1 parent 1ae4921 commit d404adc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/quantize/quantize.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit d404adc

Please sign in to comment.