Skip to content

Draft: Refactor Chat Formatter for Enhanced Flexibility and Extensibility #809

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
44aa3be
Add common grammars and json-schema-to-grammar utility function from …
abetlen Oct 2, 2023
855d34c
Pass functions to format function
abetlen Oct 2, 2023
34c1f46
Add basic functionary formatting
abetlen Oct 2, 2023
f93a2bb
#717: Add support for Huggingface Autotokenizer
bioshazard Oct 3, 2023
fd0ad07
Merge branch 'main' into add-functionary-support
abetlen Oct 5, 2023
b976391
refactor: Streamline message formatting
teleprint-me Oct 10, 2023
5c3b892
test: Add Llama2Formatter tests
teleprint-me Oct 10, 2023
6351812
test: Add pytest fixture for message sequence
teleprint-me Oct 10, 2023
c8ffb0f
Add common grammars and json-schema-to-grammar utility function from …
abetlen Oct 2, 2023
b822444
Pass functions to format function
abetlen Oct 2, 2023
7cfa5a7
Add basic functionary formatting
abetlen Oct 2, 2023
edce452
Update llama.cpp
abetlen Oct 3, 2023
0d4a0bf
Update llama.cpp
abetlen Oct 5, 2023
8e71ac8
Update llama.cpp
abetlen Oct 5, 2023
361e254
refactor: Streamline message formatting
teleprint-me Oct 10, 2023
1058385
test: Add Llama2Formatter tests
teleprint-me Oct 10, 2023
8cd236e
test: Add pytest fixture for message sequence
teleprint-me Oct 10, 2023
9ce9fdd
merge: bioshazard.autotokenizer into refactored.templates
teleprint-me Oct 10, 2023
171a8d6
refactor: Chat formatting for enhanced flexibility
teleprint-me Oct 10, 2023
9a34341
feat: Enhance Chat Formatting and Template Customization
teleprint-me Oct 13, 2023
9d8db9c
refactor: Improve HuggingFace Login and Formatter Name
teleprint-me Oct 13, 2023
0ebfc1f
Refactor: Update important notes, chat templates, and code in llama_c…
teleprint-me Oct 14, 2023
97a117f
Refactor: Update chat templates, code, and types in llama_chat_format.py
teleprint-me Oct 14, 2023
a9901c4
Refactor: Replace Open Assistant Hybrid chat template with classical …
teleprint-me Oct 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions llama_cpp/llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -1625,6 +1625,8 @@ def create_chat_completion(
format = llama_chat_format.get_chat_format(self.chat_format)
result = format(
messages=messages,
functions=functions,
function_call=function_call,
)
prompt = result.prompt
if result.stop is not None:
Expand Down
Loading