This improves the mechanism by which LLaMAv2 prompts are built to use an itertools group rather than a string buffer to merge consecutive system-user messages (which both need to be wrapped in a single [INST] [/INST] tag).
The PR also adds tests to assert that the prompt is built correctly (which you can view to see the expected grouping behaviour).
This improves the mechanism by which LLaMAv2 prompts are built to use an itertools group rather than a string buffer to merge consecutive system-user messages (which both need to be wrapped in a single
[INST] [/INST]
tag).The PR also adds tests to assert that the prompt is built correctly (which you can view to see the expected grouping behaviour).