Skip to content

--grammar usage #2364

Closed
Closed
@ghost

Description

Hello,

I want to use the --grammar, --grammar-file parameters in llama.

I see examples, but they don't work as expected for a prompt with an Assistant, for example:

./main -m ~/llama2_7b_chat_uncensored.ggmlv3.q4_0.bin --color -c 2048 --keep -1 -n -1 -t 3 -b 7 -i -r "### HUMAN:" --in-prefix " " --in-suffix "### RESPONSE:" --grammar-file grammars/list.gbnf -p "### HUMAN: Hello, how are you?"

Will someone please help me figure out how to correctly use the grammar parameters? Essentially, I want the Assistant to communicate as usual, except uses astericks to display actions, for example, "### RESPONSE: shakes your hand

Is it possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions