transformers.js
Add support for chat templates
#408
Merged

Add support for chat templates #408

xenova merged 60 commits into main from chat-templates
xenova
xenova Add basic support for chat templates
1697c3d9
xenova Cleanup
7878ded4
xenova JSDoc improvements
03389ac8
xenova Support conversion of user-defined functions
d91e022d
xenova Cleanup
466d1e43
xenova Fix function creation
449a027c
xenova Add unit tests for templates
d7700a05
xenova Cleanup
ee5af8d7
xenova Merge branch 'main' into chat-templates
5f37eebe
xenova Improve JSDoc
69271365
xenova Add missing return types
3b088277
xenova Add chat templates docs to table of contents
ffab125c
xenova Add support for logical negation
c5629b44
xenova Fix nested logical negation
aabe4bec
xenova Add unit tests for logical operators
5f4d7af8
xenova Add loop variables
c3a6f081
xenova Add support for `RuntimeValue` built-in functions
1bbf8828
xenova Add unit tests for string instance methods
a5fafe8e
xenova Fix conversion of normal function to `FunctionValue`
6559f814
xenova Update object method unit tests
468e7df8
xenova Save chat template to tokenizer_config.json during conversion
abaf579e
xenova Fix `raise_exception` error
be49ef64
xenova Add `!=` operator for booleans
40dfca45
xenova Remember to increment loop index
4445766f
xenova Cleanup for loop evaluator
6be2463b
xenova Use `is` helper function
d4a37ae6
xenova Add support for text nodes
6d826222
xenova Add auto-generated templating tests
eb88df1b
xenova Update unit tests
7fc877ab
xenova Remove unused function
c41550e7
xenova Add default chat templates
fe08e3f2
xenova Use repo with up-to-date tokenizer config
b1db4a25
xenova Temporarily disable zephyr test
0ae00fe8
xenova
gary149
kungfooman
xenova Delete templates.test.js
68ac91c8
xenova Move Jinja functionality to `@huggingface/jinja`
e6508356
xenova Fix template cache type
0e6b945e
xenova Update chat template unit tests
27762f1d
xenova Update `@huggingface/jinja` version
4ca26ffc
xenova Merge branch 'main' into chat-templates
cd8ab6f2
HuggingFaceDocBuilderDev
xenova Fix default llama2 system prompt usage
d9b63aec
xenova Add unit test for llama2 w/o chat template set
ec4d0c69
xenova Update jinja version
6560d68c
xenova Update jinja version
d9a91711
xenova Add unit test for user-defined chat templates
147dc789
xenova Add `AddedToken` for improved tokenization
3ee65c66
xenova Add example usage for chat templates
149194b5
xenova Add 'first' Metaspace pretokenizer prepend scheme
bf9ec96c
xenova Formatting
f5c6edb2
xenova Update wav2vec2 converter special tokens whitespace split
ec5e2872
xenova Fix Metaspace pretokenizer split criteria
7a3b3aa4
xenova Update inputs of `PreTokenizerSequence`
073ec93b
xenova Improve Metaspace pretokenizer
6b5e064f
xenova Update llama tokenizer tests
a2316207
xenova Improve handling of legacy llama tokenizer
30a45acf
xenova Re-enable SPM tests
c2c10d3d
xenova Add static tokenizer test cases
4ddd1c8a
xenova Add llama2 static tests
29589849
xenova Allow user to override legacy tokenizer behaviour in `.from_pretrained`
e4f5cb16
xenova Add legacy tokenizer unit tests
56af9773
xenova Bump jinja version to 0.1.0
56820b31
xenova xenova merged d4f7cd50 into main 2 years ago
xenova xenova deleted the chat-templates branch 161 days ago

Login to write a write a comment.

Login via GitHub

Reviewers
No reviews
Assignees
No one assigned
Labels
Milestone