mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-28 09:39:07 +01:00
3e5c7feeff
* 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 <ggerganov@gmail.com>
17 lines
339 B
Plaintext
17 lines
339 B
Plaintext
# - red
|
|
# - green
|
|
# - blue
|
|
#
|
|
# example:
|
|
#
|
|
# ./command -m ./models/ggml-tiny.en.bin -t 8 --grammar ./grammars/colors.gbnf --prompt "red, green, blue," --context "green, red, blue,"
|
|
#
|
|
|
|
root ::= init color "."
|
|
prompt ::= init "."
|
|
|
|
# leading space is very important!
|
|
init ::= " red, green, blue"
|
|
|
|
color ::= ", " ("red" | "green" | "blue")
|