]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/log
pkg/ggml/sources/whisper.cpp
19 months agocuda : assert ggml_add sources to be contiguous
Georgi Gerganov [Sun, 19 Nov 2023 08:32:08 +0000 (10:32 +0200)]
cuda : assert ggml_add sources to be contiguous

19 months agoios : sync submodule
Georgi Gerganov [Fri, 17 Nov 2023 08:42:04 +0000 (10:42 +0200)]
ios : sync submodule

19 months agosync : ggml (ggml-alloc + linker + gguf fixes) (#1501)
Georgi Gerganov [Fri, 17 Nov 2023 08:00:07 +0000 (10:00 +0200)]
sync : ggml (ggml-alloc + linker + gguf fixes) (#1501)

19 months agoquantize : add support for K-quant types
Georgi Gerganov [Thu, 16 Nov 2023 14:18:24 +0000 (16:18 +0200)]
quantize : add support for K-quant types

19 months agobench : fix memcpy bench size
Georgi Gerganov [Thu, 16 Nov 2023 08:59:32 +0000 (10:59 +0200)]
bench : fix memcpy bench size

19 months agotalk-llama : improve quote and backtick handling (#1364)
Sam Pullara [Thu, 16 Nov 2023 08:34:05 +0000 (00:34 -0800)]
talk-llama : improve quote and backtick handling (#1364)

* ISSUE-1329: replace " with ' so it doesn't try to execute code in backticks.

* Typo

* Update to keep possessives in the output

Closes the ' then puts a ' in quotes then reopens the ' to escape the ' characters.

19 months agotalk-llama : enable GPU by default
Georgi Gerganov [Wed, 15 Nov 2023 19:32:25 +0000 (21:32 +0200)]
talk-llama : enable GPU by default

19 months agomodels : add info about distilled models
Georgi Gerganov [Wed, 15 Nov 2023 19:10:13 +0000 (21:10 +0200)]
models : add info about distilled models

19 months agorelease : v1.5.0
Georgi Gerganov [Wed, 15 Nov 2023 19:02:52 +0000 (21:02 +0200)]
release : v1.5.0

19 months agobench-all : add distil models
Georgi Gerganov [Wed, 15 Nov 2023 18:49:12 +0000 (20:49 +0200)]
bench-all : add distil models

19 months agojs : latest whisper.js
Georgi Gerganov [Wed, 15 Nov 2023 18:10:16 +0000 (20:10 +0200)]
js : latest whisper.js

19 months agobench-all : indentations
Georgi Gerganov [Wed, 15 Nov 2023 18:01:15 +0000 (20:01 +0200)]
bench-all : indentations

19 months agowhisper : make large version explicit + fix data size units (#1493)
Georgi Gerganov [Wed, 15 Nov 2023 17:42:25 +0000 (19:42 +0200)]
whisper : make large version explicit + fix data size units (#1493)

19 months agojava : fix test (#1492)
Georgi Gerganov [Wed, 15 Nov 2023 15:42:53 +0000 (17:42 +0200)]
java : fix test (#1492)

19 months agowhisper : add batched decoding (#1486)
Georgi Gerganov [Wed, 15 Nov 2023 14:12:52 +0000 (16:12 +0200)]
whisper : add batched decoding (#1486)

* whisper : add whisper_batch

* whisper : move kv_self to whisper_state

* whisper : full batched decoding support

* whisper : fix memory leak in whisper_batch

* whisper : fix mem leak again + remove oboslete function

* whisper : clear kv cache when using whisper_decode API

* whisper : speed-up sampling

* whisper : fix decoders initializer

* bench : add batch size 5 bench

* whisper : add comment about the KV cache size

* whisper : add check for max number of decoders

* whisper : avoid starting sampling threads with bs=1

* whisper : enable beam-search by default

* cuda : sync llama.cpp fixes

19 months agojava : use tiny.en for tests (#1484)
Georgi Gerganov [Mon, 13 Nov 2023 14:53:55 +0000 (16:53 +0200)]
java : use tiny.en for tests (#1484)

* java : use tiny.en for tests

* java : try to fix full params struct

19 months agowhisper : add grammar-based sampling (#1229)
Evan Jones [Mon, 13 Nov 2023 08:51:34 +0000 (03:51 -0500)]
whisper : add grammar-based sampling (#1229)

* whisper : add grammar-based sampling

* build : fix after master merge

* command : fix exception when recognizing the command

* whisper : fine-tuning grammar functionality

* command : grammar-related improvements

- option to read grammar from file
- add sample grammars for colors and chess moves
- fine-tune the performance further

* grammars : add assistant + update comments

* command : enable beam-search, add "no_timestamps", add "context", add p

* whisper : remove comment

---------

Co-authored-by: Georgi Gerganov <redacted>
19 months agotalk-llama : add n_gpu_layers parameter (#1475)
rlapray [Mon, 13 Nov 2023 08:04:16 +0000 (09:04 +0100)]
talk-llama : add n_gpu_layers parameter (#1475)

19 months agoexamples : add whisper.android.java for compatibility with older Android versions...
Tong Li [Sun, 12 Nov 2023 16:31:58 +0000 (06:31 -1000)]
examples : add whisper.android.java for compatibility with older Android versions using Java (#1382)

* save the recorded audio to a file

* Alignment -help

* Save the correct audio

* chage to a consistent coding style

* Correct typo

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

* Correct variable misuse

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

* add *.bin .cxx/ .gradle/ cmake-build-debug/ to gitignore

* add whisper.android.java

* Added support for older versions of Android of Java

* add examples for android java

* add README.md for android java

* add fullTranscribeWithTime

* 增加 toString()方法和测试

* change return type to void

* update to v1.4.1

* add WhisperService

* chage to whisper_full_get_segment_t1

* add method transcribeDataWithTime

* modified toString
```
return "[" + start + " --> " + end + "]:" + sentence;
```

* Optimize code logic

* update text view on handle

* set max lines

* change Chinese to English

* Update bindings/java/build.gradle

* Update .gitignore

* add android.java to github action

* chage android.java to   android_java in build.yml

* remove gradle

* chage jdk to temurin in android_java of CI

* chage jdk to temurin 11 in android_java of CI

* add x to gradlew

* set api-level for android_java of CI

* Update examples/whisper.android.java/app/src/main/jni/whisper/CMakeLists.txt

* add ndk version in build.gradle

* remove local.properties

* add testFullTranscribeWithTime

---------

Co-authored-by: litongmacos <redacted>
Co-authored-by: bobqianic <redacted>
19 months agoreadme : update comment about source code
Georgi Gerganov [Sun, 12 Nov 2023 15:47:37 +0000 (17:47 +0200)]
readme : update comment about source code

19 months agoggml : fix some compile warnings
Georgi Gerganov [Sun, 12 Nov 2023 14:36:20 +0000 (16:36 +0200)]
ggml : fix some compile warnings

19 months agoreadme : update GPU / CUDA
Georgi Gerganov [Sun, 12 Nov 2023 13:40:37 +0000 (15:40 +0200)]
readme : update GPU / CUDA

19 months agowhisper : add full CUDA and Metal offloading (#1472)
Georgi Gerganov [Sun, 12 Nov 2023 13:31:08 +0000 (15:31 +0200)]
whisper : add full CUDA and Metal offloading (#1472)

* whisper : migrate to ggml-backend

* whisper : fix logit reading

* whisper : fix tensor allocation during load

* whisper : fix beam-search with CUDA

* whisper : free backends + fix compile warning

* whisper : print when CUDA is enabled

* whisper : fix CoreML

* make : clean-up

* talk : fix compile warning

* whisper : support ggml_conv with CUDA and Metal (#1473)

* ggml : add CUDA support for ggml_conv

* whisper : remove ggml_repeat for conv bias + single backend

* cuda : fix im2col kernel

* metal : add im2col support + mul mat-vec f16 x f16

* bench-all : add q4 models

* whisper : clean-up

* quantize-all : fix

* ggml : im2col opts

* whisper : avoid whisper_model_data wrapper

* whisper : add note that ggml_mul_mat_pad does not work with CUDA

* whisper : factor out graph compute in common function

* whisper : fixes

* whisper : fix UB with measure buffers

* whisper : try to fix the parallel whisper_state functionality (#1479)

* whisper : try to fix the parallel whisper_state functionality

* whisper : fix multi-state Metal

* whisper : free backend instances in whisper_state

19 months agowhisper : return with error from whisper_encode_internal and whisper_decode_internal...
Ben Nortier [Fri, 10 Nov 2023 11:51:16 +0000 (13:51 +0200)]
whisper : return with error from whisper_encode_internal and whisper_decode_internal when abort callback is true (#1456)

Co-authored-by: Ben Nortier <redacted>
19 months agotalk-llama : add language auto detect (#1467)
Jakub Ráček [Thu, 9 Nov 2023 17:21:44 +0000 (18:21 +0100)]
talk-llama : add language auto detect (#1467)

* Add '-l auto' to talk-llama example

* Update examples/talk-llama/talk-llama.cpp

---------

Co-authored-by: Georgi Gerganov <redacted>
19 months agoopenvino : update convert-whisper-to-openvino.py to support v3 (#1459)
bobqianic [Thu, 9 Nov 2023 10:42:39 +0000 (10:42 +0000)]
openvino : update convert-whisper-to-openvino.py to support v3 (#1459)

19 months agocoreml : use the correct `n_mel` value (#1458)
Xiao-Yong Jin [Wed, 8 Nov 2023 20:01:41 +0000 (14:01 -0600)]
coreml : use the correct `n_mel` value (#1458)

19 months agowhisper : reset mel time when resetting timings (#1452)
Ben Nortier [Wed, 8 Nov 2023 13:52:23 +0000 (15:52 +0200)]
whisper : reset mel time when resetting timings (#1452)

Co-authored-by: Ben Nortier <redacted>
19 months agoios : add support for Swift Package Manager (#1370)
Sindre Sorhus [Tue, 7 Nov 2023 21:53:31 +0000 (04:53 +0700)]
ios : add support for Swift Package Manager (#1370)

* Add support for Swift

* Make it build in Xcode

* Use the SPM package in the SwiftUI example app

19 months agorelease : v1.4.3
Georgi Gerganov [Tue, 7 Nov 2023 14:15:48 +0000 (16:15 +0200)]
release : v1.4.3

19 months agoggml : fix MIN / MAX macro re-definition
Georgi Gerganov [Tue, 7 Nov 2023 14:08:46 +0000 (16:08 +0200)]
ggml : fix MIN / MAX macro re-definition

19 months agowhisper : add support for large v3 (#1444)
Georgi Gerganov [Tue, 7 Nov 2023 13:30:18 +0000 (15:30 +0200)]
whisper : add support for large v3 (#1444)

* whisper : add support for large v3

* bench : fix build + fix go bindings

* bench : fix n_mels

* models : update readme

19 months agoandroid : decouple example into a library and app module (#1445)
Tobrun [Tue, 7 Nov 2023 12:27:33 +0000 (13:27 +0100)]
android : decouple example into a library and app module (#1445)

19 months agowhisper : reset ctx->t_start_us when calling whisper_reset_timings() (#1434)
Ben Nortier [Tue, 7 Nov 2023 09:04:32 +0000 (11:04 +0200)]
whisper : reset ctx->t_start_us when calling whisper_reset_timings() (#1434)

Co-authored-by: Ben Nortier <redacted>
19 months agocmake : fix talk-llama build
Georgi Gerganov [Tue, 7 Nov 2023 09:03:21 +0000 (11:03 +0200)]
cmake : fix talk-llama build

19 months agometal : fix asserts for setThreadgroupMemoryLength (close #1435)
Georgi Gerganov [Tue, 7 Nov 2023 09:02:16 +0000 (11:02 +0200)]
metal : fix asserts for setThreadgroupMemoryLength (close #1435)

19 months agoci : fix variable names in GitHub actions config (#1440)
iamthad [Tue, 7 Nov 2023 08:53:24 +0000 (02:53 -0600)]
ci : fix variable names in GitHub actions config (#1440)

* Remove _SUPPORT from variables

* Change blasdir to OPENBLAS_PATH

* Update OpenBLAS URLs

19 months agotalk-llama : fix n_gpu_layers usage again (#1442)
Jhen-Jie Hong [Tue, 7 Nov 2023 08:51:27 +0000 (16:51 +0800)]
talk-llama : fix n_gpu_layers usage again (#1442)

19 months agowhisper : add missing about callback initializers
Georgi Gerganov [Tue, 7 Nov 2023 08:49:51 +0000 (10:49 +0200)]
whisper : add missing about callback initializers

19 months agoexamples : fix n_gpu_layers usage in talk-llama (#1441)
Jhen-Jie Hong [Tue, 7 Nov 2023 01:36:23 +0000 (09:36 +0800)]
examples : fix n_gpu_layers usage in talk-llama (#1441)

19 months agowhisper : add context param to disable gpu (#1293)
Jhen-Jie Hong [Mon, 6 Nov 2023 09:04:24 +0000 (17:04 +0800)]
whisper : add context param to disable gpu (#1293)

* whisper : check state->ctx_metal not null

* whisper : add whisper_context_params { use_gpu }

* whisper : new API with params & deprecate old API

* examples : use no-gpu param && whisper_init_from_file_with_params

* whisper.objc : enable metal & disable on simulator

* whisper.swiftui, metal : enable metal & support load default.metallib

* whisper.android : use new API

* bindings : use new API

* addon.node : fix build & test

* bindings : updata java binding

* bindings : add missing whisper_context_default_params_by_ref WHISPER_API for java

* metal : use SWIFTPM_MODULE_BUNDLE for GGML_SWIFT and reuse library load

* metal : move bundle var into block

* metal : use SWIFT_PACKAGE instead of GGML_SWIFT

* style : minor updates

---------

Co-authored-by: Georgi Gerganov <redacted>
19 months agowhisper : add support for new distilled Whisper models (#1424)
Georgi Gerganov [Sun, 5 Nov 2023 17:43:45 +0000 (19:43 +0200)]
whisper : add support for new distilled Whisper models (#1424)

* whisper : add support for new distilled Whisper models

* whisper : print log when using distilled models

19 months agocuda : fix HIPBLAS build
Georgi Gerganov [Sun, 5 Nov 2023 17:41:15 +0000 (19:41 +0200)]
cuda : fix HIPBLAS build

19 months agosync : ggml (backend v2, k-quants, CUDA opts, Metal opts, etc.) (#1422)
Georgi Gerganov [Fri, 3 Nov 2023 19:35:05 +0000 (21:35 +0200)]
sync : ggml (backend v2, k-quants, CUDA opts, Metal opts, etc.) (#1422)

* sync : ggml (backend v2, k-quants, CUDA opts, Metal opts, etc.)

* metal : allow env metal variable to override resource path (#1415)

* Allow env variable to override resource path

* Update ggml-metal.m

---------

Co-authored-by: Georgi Gerganov <redacted>
* sync : restore common / main from `master`

* sync : restore whisper from `master`

* talk-llama : update to latest llama.cpp

* ruby : fix build

* ggml : fix 32-bit ARM build

* ggml : fix MIN / MAX macro collisions + update ios bindings

* ggml : fix ifdefs and MIN / MAX again

* exampels : fix Obj-C and Swift examples

* ggml : fix 32-bit ARM compatibility

* ggml : one more attempt to fix 32-bit ARM compat

* whisper : fix support for larger graphs

---------

Co-authored-by: Chris Raethke <redacted>
19 months agomodels : use absolute paths for the converted model (#1356)
bobqianic [Fri, 3 Nov 2023 08:44:27 +0000 (08:44 +0000)]
models : use absolute paths for the converted model (#1356)

19 months agotalk-llama : move up-to-date demo to top (#1417)
Asad Memon [Thu, 2 Nov 2023 16:50:13 +0000 (09:50 -0700)]
talk-llama : move up-to-date demo to top (#1417)

19 months agotalk-llama : add an up-to-date demo video
Georgi Gerganov [Thu, 2 Nov 2023 13:28:48 +0000 (15:28 +0200)]
talk-llama : add an up-to-date demo video

19 months agoexamples : Implement JSON output for Token-Level data in main (#1358)
Aarni Koskela [Tue, 31 Oct 2023 19:54:52 +0000 (21:54 +0200)]
examples : Implement JSON output for Token-Level data in main (#1358)

20 months agomodels : Faster download for models on windows using BitTransfer (#1404)
WhiteOlivierus [Mon, 30 Oct 2023 19:18:12 +0000 (20:18 +0100)]
models : Faster download for models on windows using BitTransfer (#1404)

20 months agoREADME : Update README in stream to clarify where to compile from (Issue #1400)
ai-at-home [Sun, 29 Oct 2023 17:11:13 +0000 (12:11 -0500)]
README : Update README in stream to clarify where to compile from (Issue #1400)

* Clarify doc about where to compile from

* Update examples/stream/README.md

* Update examples/stream/README.md

* Update README.md

---------

Co-authored-by: AI @ Home <>
Co-authored-by: bobqianic <redacted>
20 months agobinding : Expose the audio_ctx param through the Go binding (#1368)
Johan [Sun, 15 Oct 2023 12:35:06 +0000 (05:35 -0700)]
binding : Expose the audio_ctx param through the Go binding (#1368)

* expose the audio_ctx param through the go binding

* expose the audio_ctx param to the go binding context

20 months agoREADME : fix typo (#1362)
jorismertz [Fri, 13 Oct 2023 15:53:23 +0000 (17:53 +0200)]
README : fix typo (#1362)

20 months agodocker : Add dockerfile for cublas (#1286)
joecryptotoo [Wed, 11 Oct 2023 10:00:17 +0000 (03:00 -0700)]
docker : Add dockerfile for cublas (#1286)

* Create Dockerfile

* Rename Dockerfile to cublas.Dockerfile

* Rename cublas.Dockerfile to .devops/cublas.Dockerfile

---------

Co-authored-by: bobqianic <redacted>
20 months agowhisper : abort callback improvements (#1345)
mkiol [Sun, 8 Oct 2023 14:22:24 +0000 (16:22 +0200)]
whisper : abort callback improvements (#1345)

* whisper : initialize abort_callback to null

* whisper : add example how to use abort_callback

20 months agocmake : Abort the build if a requested feature could not be configured (#1350)
Marcin Mielniczuk [Sat, 7 Oct 2023 19:01:18 +0000 (21:01 +0200)]
cmake : Abort the build if a requested feature could not be configured (#1350)

20 months agocmake : Prefer pkg-config while looking for BLAS (#1349)
Marcin Mielniczuk [Sat, 7 Oct 2023 14:02:07 +0000 (16:02 +0200)]
cmake : Prefer pkg-config while looking for BLAS (#1349)

20 months agomodels : add conversion scripts from HuggingFace models to CoreML (#1304)
Xiang (Kevin) Li [Wed, 4 Oct 2023 09:00:25 +0000 (05:00 -0400)]
models : add conversion scripts from HuggingFace models to CoreML (#1304)

20 months agowhisper : add abort callback (#1335)
mkiol [Wed, 4 Oct 2023 08:57:55 +0000 (10:57 +0200)]
whisper : add abort callback (#1335)

20 months agoexamples : move wav_writer from stream.cpp to common.h (#1317)
bobqianic [Tue, 3 Oct 2023 19:56:11 +0000 (20:56 +0100)]
examples : move wav_writer from stream.cpp to common.h (#1317)

* Allocate class on the stack instead of on the heap

* Add class wav_writer

* fix some minor issues

* fix some minor issues

* remove potential misleading API

20 months agowhisper : add missing speaker turn API function for whisper_state (#1330)
Didzis Gosko [Tue, 3 Oct 2023 19:55:48 +0000 (22:55 +0300)]
whisper : add missing speaker turn API function for whisper_state (#1330)

20 months agoexamples: Update the README for Talk - fixing the gpt2 URL (#1334)
brunofaustino [Sat, 30 Sep 2023 20:21:32 +0000 (17:21 -0300)]
examples: Update the README for Talk - fixing the gpt2 URL (#1334)

21 months agoextra: Add benchmark script implemented in Python (#1298)
Neil Chudleigh [Mon, 25 Sep 2023 15:45:15 +0000 (08:45 -0700)]
extra: Add benchmark script implemented in Python (#1298)

* Create bench.py

* Various benchmark results

* Update benchmark script with hardware name, and file checks

* Remove old benchmark results

* Add git shorthash

* Round to 2 digits on calculated floats

* Fix the header reference when sorting results

* FIx order of models

* Parse file name

* Simplify filecheck

* Improve print run print statement

* Use simplified model name

* Update benchmark_results.csv

* Process single or lists of processors and threads

* Ignore benchmark results, dont check in

* Move bench.py to extra folder

* Readme section on how to use

* Move command to correct location

* Use separate list for models that exist

* Handle subprocess error in git short hash check

* Fix filtered models list initialization

21 months agoExamples: Add save audio to file option in stream.cpp (#1310)
litong [Fri, 22 Sep 2023 15:43:21 +0000 (05:43 -1000)]
Examples: Add save audio to file option in stream.cpp (#1310)

* save the recorded audio to a file

* Alignment -help

* Save the correct audio

* chage to a consistent coding style

* Correct typo

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

* Correct variable misuse

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

* Update examples/stream/stream.cpp

---------

Co-authored-by: bobqianic <redacted>
21 months agoreadme: Fix spelling error (#1290)
JJ [Thu, 21 Sep 2023 07:55:33 +0000 (00:55 -0700)]
readme: Fix spelling error (#1290)

Fixed branding error:  Javascript to JavaScript

21 months agoexamples: Update README.md of main.cpp (#1306)
Artyom Mezin [Mon, 18 Sep 2023 14:14:36 +0000 (17:14 +0300)]
examples: Update README.md of main.cpp (#1306)

21 months agobinding : fix ruby build by adding missing ggml-alloc (#1305)
Jhen-Jie Hong [Mon, 18 Sep 2023 13:15:45 +0000 (21:15 +0800)]
binding : fix ruby build by adding missing ggml-alloc (#1305)

21 months agobench: fix missing include <cstring> (#1303)
Evgeny Kuznetsov [Mon, 18 Sep 2023 07:51:10 +0000 (10:51 +0300)]
bench: fix missing include <cstring> (#1303)

21 months agowhisper : increase tokenizer buffer (close #1259)
Georgi Gerganov [Fri, 15 Sep 2023 18:11:43 +0000 (21:11 +0300)]
whisper : increase tokenizer buffer (close #1259)

21 months agotalk-llama : update to latest llama.cpp
Georgi Gerganov [Fri, 15 Sep 2023 17:06:31 +0000 (20:06 +0300)]
talk-llama : update to latest llama.cpp

21 months agosync : ggml (const correctness)
Georgi Gerganov [Fri, 15 Sep 2023 11:49:56 +0000 (14:49 +0300)]
sync : ggml (const correctness)

21 months agometal : restore matrix x vector f16_f32 kerenls for now
Georgi Gerganov [Fri, 15 Sep 2023 11:40:41 +0000 (14:40 +0300)]
metal : restore matrix x vector f16_f32 kerenls for now

21 months agometal : add F32 support + update bench output
Georgi Gerganov [Fri, 15 Sep 2023 10:56:08 +0000 (13:56 +0300)]
metal : add F32 support + update bench output

21 months agowhisper : Metal and ggml-alloc support (#1270)
Georgi Gerganov [Fri, 15 Sep 2023 09:18:18 +0000 (12:18 +0300)]
whisper : Metal and ggml-alloc support (#1270)

* metal : init

* whisper : factor out graph builds

* whisper : allocate encoder and decoder using ggml-alloc

* whisper : ggml-alloc is now supported

* whisper : CoreML support ggml-alloc

* build : fix ggml-alloc

* ios : update submodule

* extra : update sync-ggml.sh script to also sync ggml-alloc

* ci : see if this is causing the crash

* whisper : refactor ggml-alloc init

* whisper.android : try to fix build

* whisper : initial Metal version

* ci : try to debug vmem issue

* metal : decoder works on GPU!

* metal : add multi-decoder support

* ggml : fix ggml_nbytes (probably temp solution)

* metal : run "cross" step on the GPU

* whisper : remove ggml_repeat in the encoder

* whisper : offload the Encoder to Metal

* ggml : use simpler ggml_bytes() implementation

* ggml-alloc : try to make CI happy by reducing vram to 128GB

* whisper : add whisper_allocr to wrap ggml_allocr

* whisper : factor out alloc init in a function

* cmake : update to support Metal build

* whisper : add <functional> header

* objc : fix build (no Metal yet)

* ios : add Metal support

* swiftui : fix build

* metal : speed-up KQ multiplication

* metal : sync latest llama.cpp kernels

* readme : add Metal info

* ios : update submodule

* coreml : add code to toggle Core ML config (CPU, ANE, GPU)

* bench : fix timings by running a pre-heat

* bench : start benching the decoder

* whisper : add ggml_mul_mat_pad

* bench : fix uninitialized vars

* whisper : add comment for disabling mul-mat padding

* whisper : add description of ggml_mul_mat_pad

* whisper : clean-up ggml_mul_mat_pad

* metal : remove the "concurrent" flag

* bench : variable n_past

* ios : update SPM package

21 months agowhisper : fix bench regression + fix performance when using CPU BLAS (#1275)
Georgi Gerganov [Tue, 12 Sep 2023 10:54:04 +0000 (13:54 +0300)]
whisper : fix bench regression + fix performance when using CPU BLAS (#1275)

* whisper : fix bench regression

* ggml : use sched_yield when using BLAS + add comment

21 months agowhisper : faster beam_search sampling via reduced KV cache copies (#1243)
bobqianic [Sun, 10 Sep 2023 13:04:27 +0000 (21:04 +0800)]
whisper : faster beam_search sampling via reduced KV cache copies (#1243)

* Faster `beam_search` sampling

Refine the KV cache update logic for more intelligent and efficient updating.

* Faster `whisper_sample_token_topk`

* Update whisper.cpp

* Update whisper.cpp

* Update whisper.cpp

* Reduce `memory allocation`

* Add `pointer swapping`

* Fixed some bugs

* Update whisper.cpp

* Apply suggestions from code review

* Updated the logic for determining `two-copy`

* Updated the logic for determining `two-copy` v2

* whisper : add debug logs + coding style

---------

Co-authored-by: Georgi Gerganov <redacted>
21 months agojava : fixed signing of java artifact using gradle (#1267)
Nicholas Albion [Sat, 9 Sep 2023 15:55:51 +0000 (01:55 +1000)]
java : fixed signing of java artifact using gradle (#1267)

* --stacktrace signMavenJavaPublication

* added temporary step "Debug gradle signing"

* cd bindings/java

* use GPG_PRIVATE_KEY and GPG_PASSPHRASE

* use secrets.GPG_PRIVATE_KEY and GPG_PASSPHRASE

21 months agoci : try to fix gradle action (#1265)
Georgi Gerganov [Fri, 8 Sep 2023 17:50:15 +0000 (20:50 +0300)]
ci : try to fix gradle action (#1265)

21 months agogitignore : update
Georgi Gerganov [Fri, 8 Sep 2023 16:45:28 +0000 (19:45 +0300)]
gitignore : update

21 months agosync : ggml (HBM + Metal + style) (#1264)
Georgi Gerganov [Fri, 8 Sep 2023 14:58:31 +0000 (17:58 +0300)]
sync : ggml (HBM + Metal + style) (#1264)

21 months agoci : upgrade gradle to 2.4.2 (#1263)
Georgi Gerganov [Fri, 8 Sep 2023 14:58:14 +0000 (17:58 +0300)]
ci : upgrade gradle to 2.4.2 (#1263)

* ci : upgrade gradle to 2.4.2

* cmake : add comment (#1129)

21 months agosync : ggml (CUDA faster rope)
Georgi Gerganov [Fri, 8 Sep 2023 12:01:26 +0000 (15:01 +0300)]
sync : ggml (CUDA faster rope)

21 months agocmake : noramlize case (#1129)
Georgi Gerganov [Fri, 8 Sep 2023 11:50:03 +0000 (14:50 +0300)]
cmake : noramlize case (#1129)

21 months agobuild : do not use _GNU_SOURCE gratuitously (#1129)
Przemysław Pawełczyk [Thu, 7 Sep 2023 09:36:14 +0000 (11:36 +0200)]
build : do not use _GNU_SOURCE gratuitously (#1129)

* Do not use _GNU_SOURCE gratuitously.

What is needed to build whisper.cpp and examples is availability of
stuff defined in The Open Group Base Specifications Issue 6
(https://pubs.opengroup.org/onlinepubs/009695399/) known also as
Single Unix Specification v3 (SUSv3) or POSIX.1-2001 + XSI extensions,
plus some stuff from BSD that is not specified in POSIX.1.

Well, that was true until NUMA support was added recently in ggml,
so enable GNU libc extensions for Linux builds to cover that.

There is no need to penalize musl libc which simply follows standards.

Not having feature test macros in source code gives greater flexibility
to those wanting to reuse it in 3rd party app, as they can build it with
minimal FTM (_XOPEN_SOURCE=600) or other FTM depending on their needs.

It builds without issues in Alpine (musl libc), Ubuntu (glibc), MSYS2.

* examples : include SDL headers before other headers

Avoid macOS build error when _DARWIN_C_SOURCE is not defined, brought by
SDL2 relying on Darwin extension memset_pattern4/8/16 (from string.h).

* make : enable BSD extensions for DragonFlyBSD to expose RLIMIT_MEMLOCK

* make : use BSD-specific FTMs to enable alloca on BSDs

* make : fix OpenBSD build by exposing newer POSIX definitions

* cmake : follow recent FTM improvements from Makefile

21 months agoexamples : fix build + compile warnings (close #1256)
Georgi Gerganov [Thu, 7 Sep 2023 09:33:12 +0000 (12:33 +0300)]
examples : fix build + compile warnings (close #1256)

21 months agomodels : add quantum models to download-ggml-model.sh (#1235)
Neil Chudleigh [Thu, 7 Sep 2023 09:16:58 +0000 (05:16 -0400)]
models : add quantum models to download-ggml-model.sh (#1235)

* Add quantized models to download-ggml-model.sh

* Update names in download-ggml-model script to normalized

21 months agowhisper.android : bump gradle plugin and dependencies + a lint pass (#1255)
Digipom [Thu, 7 Sep 2023 09:15:59 +0000 (05:15 -0400)]
whisper.android : bump gradle plugin and dependencies + a lint pass (#1255)

21 months agosign jar for Maven Central repo
Nicholas Albion [Thu, 7 Sep 2023 01:45:01 +0000 (11:45 +1000)]
sign jar for Maven Central repo

21 months agowhisper.android : address ARM's big.LITTLE arch by checking cpu info (#1254)
Digipom [Wed, 6 Sep 2023 15:32:30 +0000 (11:32 -0400)]
whisper.android : address ARM's big.LITTLE arch by checking cpu info (#1254)

Addresses https://github.com/ggerganov/whisper.cpp/issues/1248

21 months agomake : fix detection of AVX2 on macOS (#1250)
Didzis Gosko [Wed, 6 Sep 2023 15:22:21 +0000 (18:22 +0300)]
make : fix detection of AVX2 on macOS (#1250)

21 months agoggml : posixify pagesize (#1251)
Przemysław Pawełczyk [Wed, 6 Sep 2023 15:19:36 +0000 (17:19 +0200)]
ggml : posixify pagesize (#1251)

* ggml : use sysconf(_SC_PAGESIZE) instead of getpagesize() derived from BSD

sed -i 's,getpagesize(),sysconf(_SC_PAGESIZE),g' ggml.c

* metal : use sysconf(_SC_PAGESIZE) instead of getpagesize() derived from BSD

sed -i 's,getpagesize(),sysconf(_SC_PAGESIZE),g' ggml-metal.m

21 months agoconfigured publishing.repositories
Nicholas Albion [Wed, 6 Sep 2023 03:13:36 +0000 (13:13 +1000)]
configured publishing.repositories

21 months agoggml : sync latest llama.cpp (view_src + alloc improvements) (#1247)
Georgi Gerganov [Tue, 5 Sep 2023 17:57:27 +0000 (20:57 +0300)]
ggml : sync latest llama.cpp (view_src + alloc improvements) (#1247)

* ggml : sync latest llama.cpp (view_src + alloc improvements)

* ggml : fix build

21 months agomake : improve cpuinfo handling on x86 hosts (#1238)
Przemysław Pawełczyk [Tue, 5 Sep 2023 11:58:47 +0000 (13:58 +0200)]
make : improve cpuinfo handling on x86 hosts (#1238)

* make : simplify and correct x86 ISA extensions detection on the host

It got broken in commit c5f9acf4b797 for Haiku and Mac OS (Intel),
which report CPU features in upper case.

Now we're finding the names in case-insensitive manner and as words.
SSE3 detection has been corrected for Linux, which uses PNI for that
(Prescott New Instructions).

* make : use dmesg.boot in FreeBSD/DragonFlyBSD to detect x86 ISA extensions on the host

* make : enable x86 ISA extensions on the host both in CFLAGS and CXXFLAGS

* make : correct AVX x86 ISA extension detection on macOS (Intel) host

It got broken in commit c5f9acf4b797.  macOS calls it AVX1.0.

21 months agoggml : sync (ggml-alloc, GPU, eps, etc.) (#1220)
Georgi Gerganov [Tue, 5 Sep 2023 10:54:40 +0000 (13:54 +0300)]
ggml : sync (ggml-alloc, GPU, eps, etc.) (#1220)

* ggml : sync (ggml-alloc, GPU, eps, etc.)

* ggml : fix build

* wasm : fix build

21 months agoreadme : update CMake build commands (#1231)
布客飞龙 [Tue, 5 Sep 2023 10:53:34 +0000 (18:53 +0800)]
readme : update CMake build commands (#1231)

* Update README.md

* Update README.md: `vcpkg install opencl clblast`

* readme : update build commands

---------

Co-authored-by: Georgi Gerganov <redacted>
22 months agoOSSRH_USERNAME -> JIRA_USER
Nicholas Albion [Thu, 31 Aug 2023 04:54:02 +0000 (14:54 +1000)]
OSSRH_USERNAME -> JIRA_USER

22 months agobuild-root-directory: bindings/java
Nicholas Albion [Thu, 31 Aug 2023 02:04:16 +0000 (12:04 +1000)]
build-root-directory: bindings/java

22 months agoci : enable java package publishing (#1228)
Georgi Gerganov [Wed, 30 Aug 2023 23:57:43 +0000 (02:57 +0300)]
ci : enable java package publishing (#1228)

22 months agoggml : fix compilation errors incurred by -Werror (#1227)
ChangSeok Oh [Wed, 30 Aug 2023 19:09:15 +0000 (12:09 -0700)]
ggml : fix compilation errors incurred by -Werror (#1227)

The -Werror warning option turns all warnings into errors. This PR makes
the compiler happy to build ggml.c and whisper.cpp with the stricter option.

22 months agowhisper.android : fix cmake multiple libraries build (#1224)
Jhen-Jie Hong [Wed, 30 Aug 2023 11:45:13 +0000 (19:45 +0800)]
whisper.android : fix cmake multiple libraries build (#1224)

* whisper.android : fix multiple libraries build

* fix flags for default target