transformers
Overhaul Conversation class and prompt templating
#25323
Merged

Overhaul Conversation class and prompt templating #25323

Rocketknight1 merged 111 commits into main from customizable_prompt_template
Rocketknight1
Rocketknight1 Rocketknight1 requested a review from ArthurZucker ArthurZucker 3 years ago
HuggingFaceDocBuilderDev
ArthurZucker
ArthurZucker commented on 2023-08-16
Rocketknight1 Rocketknight1 changed the title Customizable prompt templates for Llama Overhaul Conversation class and prompt templating 3 years ago
Rocketknight1 Rocketknight1 force pushed to cd98acbb 3 years ago
Narsil
Rocketknight1
Narsil
Rocketknight1
Narsil
gante
gante commented on 2023-08-21
Rocketknight1
Rocketknight1
gante
gante approved these changes on 2023-08-23
gante
Rocketknight1
lewtun
lewtun commented on 2023-08-24
Rocketknight1 Rocketknight1 force pushed to 5f3e863b 3 years ago
Rocketknight1
patrickvonplaten
patrickvonplaten commented on 2023-08-28
patrickvonplaten
patrickvonplaten commented on 2023-08-28
patrickvonplaten
patrickvonplaten commented on 2023-08-28
patrickvonplaten
patrickvonplaten commented on 2023-08-28
patrickvonplaten
patrickvonplaten commented on 2023-08-28
patrickvonplaten
patrickvonplaten commented on 2023-08-28
Rocketknight1
Rocketknight1 Rocketknight1 requested a review from amyeroberts amyeroberts 3 years ago
Rocketknight1 Rocketknight1 requested a review from ArthurZucker ArthurZucker 3 years ago
ArthurZucker
ArthurZucker commented on 2023-08-29
LysandreJik
LysandreJik commented on 2023-08-29
Rocketknight1
Rocketknight1
Rocketknight1
LysandreJik
LysandreJik approved these changes on 2023-09-07
Rocketknight1
ArthurZucker
ArthurZucker approved these changes on 2023-09-08
Rocketknight1
Rocketknight1
Rocketknight1 commented on 2023-09-11
Rocketknight1
ArthurZucker
Rocketknight1
Rocketknight1 Rocketknight1 force pushed to 3a6668aa 3 years ago
Rocketknight1
annahung31
annahung31 commented on 2023-09-14
Rocketknight1 First commit while I figure this out
951877a9
Rocketknight1 make fixup
11b70a10
Rocketknight1 Remove unused method
cee4b8f0
Rocketknight1 Store prompt attrib
7eb4acf3
Rocketknight1 Fix prompt argument for tests
3a10c21f
Rocketknight1 Make same changes in fast tokenizer
e371ad05
Rocketknight1 Remove global prompts from fast tokenizer too
9a3fabe6
Rocketknight1 stash commit
bc02ec30
Rocketknight1 stash commit
1073f41e
Rocketknight1 Migrate PromptConfig to its True Final Location
a998e67b
Rocketknight1 Replace Conversation entirely with the new class
3f8b5e5e
Rocketknight1 Import/dependency fixes
03073a94
Rocketknight1 Import/dependency fixes
9a989b51
Rocketknight1 Change format for lots of default prompts
f4b5f60f
Rocketknight1 More default prompt fixups
9a9a7df6
Rocketknight1 Revert llama old methods so we can compare
3ec05dd3
Rocketknight1 Fix some default configs
32b4b70a
Rocketknight1 Fix some default configs
d3cbe7b8
Rocketknight1 Fix misspelled kwarg
cd10921a
Rocketknight1 Fixes for Blenderbot
358ebe28
Rocketknight1 make fixup
035a197c
Rocketknight1 little rebase cleanup
120c2a97
Rocketknight1 Add basic documentation
9cad5cf8
Rocketknight1 Quick doc fix
7533c049
Rocketknight1 Truncate docstring for now
1d38fc71
Rocketknight1 Add handling for the case when messages is a single string
d8d4bac3
Rocketknight1 Quick llama merges
3a9c5542
Rocketknight1 Update conversational pipeline and tests
dd94a3dd
Rocketknight1 Add a couple of legacy properties for backward compatibility
804fba38
Rocketknight1 More legacy handling
8cf91639
Rocketknight1 Add docstring for build_conversation_input_ids
a53ab35f
Rocketknight1 Restructure PromptConfig
95851156
Rocketknight1 Let's start T E M P L A T I N G
3d6e43dd
Rocketknight1 Refactor all default configs to use templates instead
dfabb720
Rocketknight1 Revert changes to the special token properties since we don't need th…
746c0598
Rocketknight1 More class templates
ffad592d
Rocketknight1 Make the sandbox even sandier
0b2a3c9e
Rocketknight1 Everything replaced with pure templating
48824324
Rocketknight1 Remove docs for PromptConfig
67f8c7c1
Rocketknight1 Add testing and optional requirement boilerplate
bf97caa8
Rocketknight1 Fix imports and make fixup
f9f32a5f
Rocketknight1 Fix LLaMA tests and add Conversation docstring
1eafda93
Rocketknight1 Finally get LLaMA working with the template system
2da9359e
Rocketknight1 Finally get LLaMA working with the template system
1d2ec0ac
Rocketknight1 make fixup
9b13770a
Rocketknight1 make fixup
7cbc7a5c
Rocketknight1 fmt-off for the long lists of test tokens
686bfb98
Rocketknight1 Rename method to apply_chat_template for now
ccfa809e
Rocketknight1 Start on documentation
19dfaec7
Rocketknight1 Make chat_template a property that reads through to the default if it…
0ba6e7bb
Rocketknight1 Expand docs
520c39f4
Rocketknight1 Expand chat templating doc some more
8919f785
Rocketknight1 trim/lstrip blocks by default and update doc
bc9a723d
Rocketknight1 Few doc tweaks
d9ef5347
Rocketknight1 rebase cleanup
d569f3b9
Rocketknight1 Clarify docstring
9d896e73
Rocketknight1 trim/lstrip blocks by default and update doc
bc9a723d
Rocketknight1 Few doc tweaks
d9ef5347
Rocketknight1 rebase cleanup
d569f3b9
Rocketknight1 rebase cleanup
da7e6c8f
Rocketknight1 rebase cleanup
e745e204
Rocketknight1 Re-add PEFT check
f26222e0
Rocketknight1 Explain system messages in the doc
8eae7555
Rocketknight1 Add chat template test
4eb475e3
Rocketknight1 Proper save-loading for chat template attribute
8bf8d271
Rocketknight1 Add test skips for layout models
a06871be
Rocketknight1 Remove _build_conversation_input_ids, add default_chat_template to co…
6d255915
Rocketknight1 Make sure all LLaMA models are using the latest template
dae3818d
Rocketknight1 Remove default_system_prompt block in code_llama because it has no de…
7dd151e4
Rocketknight1 Update ConversationPipeline preprocess
9b3ae733
Rocketknight1 Add correct #Copied from links to the default_chat_templates
78be378d
Rocketknight1 Remove unneeded type checking line
a8433847
Rocketknight1 Add a dummy mark_processsed method
f771054e
Rocketknight1 Reorganize Conversation to have **deprecated_kwargs
5a747bb1
Rocketknight1 Update chat_templating.md
1a09fd26
Rocketknight1 Quick fix to LLAMA tests
4878481f
Rocketknight1 Small doc tweaks
67315a21
Rocketknight1 Add proper docstrings and "copied from" statements to all default cha…
eb4e4ab6
Rocketknight1 Merge use_default_system_prompt support for code_llama too
541bc84e
Rocketknight1 Improve clarity around self.chat_template
1d3678c7
Rocketknight1 Docstring fix
16f44035
Rocketknight1 Fix blenderbot default template
01168c66
Rocketknight1 More doctest fix
2dcc3b74
Rocketknight1 Break out some tokenizer kwargs
266bef69
Rocketknight1 Update doc to explain default templates
61b8e6cc
Rocketknight1 Quick tweaks to tokenizer args
80aa6161
Rocketknight1 Cleanups for tokenizer args
b46edbec
Rocketknight1 Add note about cacheing
7ec4c65d
Rocketknight1 Quick tweak to the chat-templating doc
a84d793c
Rocketknight1 Update the LLaMA template with error checking and correct system mess…
72cc3344
Rocketknight1 make fixup
9578353d
Rocketknight1 make fixup
94e8a604
Rocketknight1 add requires_jinja
34ddb16c
Rocketknight1 Cleanup to expected output formatting
9725478f
Rocketknight1 Add cacheing
1f903fa3
Rocketknight1 Fix typo in llama default template
4f71b404
Rocketknight1 Update LLaMA tests
3dc4c79a
Rocketknight1 Update documentation
619ccf4b
Rocketknight1 Improved legacy handling in the Conversation class
3bf1d2c5
Rocketknight1 Update Jinja template with proper error handling
afa6b32e
Rocketknight1 Quick bugfix
b34050b2
Rocketknight1 Proper exception raising
40d9fa24
Rocketknight1 Change cacheing behaviour so it doesn't try to pickle an entire Jinja…
8f847299
Rocketknight1 Rocketknight1 force pushed from 3a6668aa to 8f847299 3 years ago
Rocketknight1 make fixup
f3c4922b
Rocketknight1 rebase cleanup
a10d52b6
Rocketknight1 Rocketknight1 merged 866df66f into main 3 years ago
Rocketknight1 Rocketknight1 deleted the customizable_prompt_template branch 3 years ago

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone