File size: 504 Bytes
3665e66
2a670fb
3665e66
 
 
 
 
 
 
 
2a670fb
3665e66
 
2a670fb
3665e66
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# GBNF grammar for [INST] format
root ::= "[INST]\n### System:\n"system"\n### Instruction:\n"instruction"\n[/INST]\n"

# `system` represents the system information
system ::= string

# `instruction` represents the instruction information
instruction ::= string

string ::=
  "" (
    [^"\\] |
    "\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes
  )* "" ws


# Optional space: by convention, applied in this grammar after literal chars when allowed
ws ::= ([ \t\n] ws)?