Commit graph

3 commits

Author SHA1 Message Date
kingbri
d6ad17097c Templates: Remove whitespace from metadata
Apparently setting variables also adds extraneous whitespace before
the template itself.

Doing {%- set stop_strings = ["string1"] -%} fixes this issue.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-09-08 12:36:36 -04:00
kingbri
271f5ba7a4 Templates: Modify alpaca and chatml
Add the stop_strings metadata parameter.

Signed-off-by: kingbri <bdashore3@proton.me>
2024-03-27 22:28:41 -04:00
kingbri
f631dd6ff7 Templates: Switch to Jinja2
Jinja2 is a lightweight template parser that's used in Transformers
for parsing chat completions. It's much more efficient than Fastchat
and can be imported as part of requirements.

Also allows for unblocking Pydantic's version.

Users now have to provide their own template if needed. A separate
repo may be usable for common prompt template storage.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-12-18 23:53:47 -05:00