You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+38-19Lines changed: 38 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@
24
24
from . importllama_cpp
25
25
from .llama_typesimport*
26
26
from .llama_grammarimportLlamaGrammar
27
+
from . importllama_chat_format
27
28
28
29
importnumpyasnp
29
30
importnumpy.typingasnpt
@@ -243,6 +244,8 @@ def __init__(
243
244
lora_path: Optional[str] =None,
244
245
# Backend Params
245
246
numa: bool=False,
247
+
# Chat Format Params
248
+
chat_format: str="llama-2",
246
249
# Misc
247
250
verbose: bool=True,
248
251
# Extra Params
@@ -273,6 +276,7 @@ def __init__(
273
276
lora_base: Optional path to base model, useful if using a quantized base model and you want to apply LoRA to an f16 model.
274
277
lora_path: Path to a LoRA file to apply to the model.
275
278
numa: Enable NUMA support. (NOTE: The initial value of this parameter is used for the remainder of the program as this value is set in llama_backend_init)
279
+
chat_format: String specifying the chat format to use when calling create_chat_completion.
0 commit comments