]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
whisper : add grammar-based sampling (#1229)
authorEvan Jones <redacted>
Mon, 13 Nov 2023 08:51:34 +0000 (03:51 -0500)
committerGitHub <redacted>
Mon, 13 Nov 2023 08:51:34 +0000 (10:51 +0200)
commit3e5c7feeffb86555d63ef592f79ce8365a069174
tree463971d7bbc5ca0fbcb2d9ededc3a751951292ff
parentc23598e4ca497a921975d11bddadb73ff462611d
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>
Makefile
examples/CMakeLists.txt
examples/command/command.cpp
examples/grammar-parser.cpp [new file with mode: 0644]
examples/grammar-parser.h [new file with mode: 0644]
grammars/assistant.gbnf [new file with mode: 0644]
grammars/chess.gbnf [new file with mode: 0644]
grammars/colors.gbnf [new file with mode: 0644]
whisper.cpp
whisper.h