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_cpp.py
+7-5
Original file line number
Diff line number
Diff line change
@@ -2942,19 +2942,17 @@ def llama_detokenize(
2942
2942
# // Chat templates
2943
2943
# //
2944
2944
2945
-
2946
2945
# /// Apply chat template. Inspired by hf apply_chat_template() on python.
2947
2946
# /// Both "model" and "custom_template" are optional, but at least one is required. "custom_template" has higher precedence than "model"
2948
2947
# /// NOTE: This function does not use a jinja parser. It only support a pre-defined list of template. See more: https://github.com/ggerganov/llama.cpp/wiki/Templates-supported-by-llama_chat_apply_template
2949
-
# /// @param tmpl A Jinja template to use for this chat. If this is nullptr, the model’s default chat template will be used instead.
2948
+
# /// @param tmpl A Jinja template to use for this chat. If this is nullptr, the model's default chat template will be used instead.
2950
2949
# /// @param chat Pointer to a list of multiple llama_chat_message
2951
2950
# /// @param n_msg Number of llama_chat_message in this chat
2952
2951
# /// @param add_ass Whether to end the prompt with the token(s) that indicate the start of an assistant message.
2953
2952
# /// @param buf A buffer to hold the output formatted prompt. The recommended alloc size is 2 * (total number of characters of all messages)
2954
2953
# /// @param length The size of the allocated buffer
2955
2954
# /// @return The total number of bytes of the formatted prompt. If is it larger than the size of buffer, you may need to re-alloc it and then re-apply the template.
0 commit comments