Commit 279ffff
committed
Enable SmolLM 3 template.
- Add `replace` method for string type and update unit tests.
- Support slice expression with omitted start or end index and update unit tests.
- Fix the bug that `in` operator does not work for string type.
- Update testing script to support fetching `chat-template.jinja` when the template is not in `tokenizer_config.json`.
Test passed with SmolLM 3B model:
https://huggingface.co/HuggingFaceTB/SmolLM3-3B1 parent f06140f commit 279ffff
File tree
4 files changed
+41
-6
lines changed- include/minja
- scripts
- tests
4 files changed
+41
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1355 | 1355 | | |
1356 | 1356 | | |
1357 | 1357 | | |
1358 | | - | |
1359 | | - | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
1360 | 1365 | | |
1361 | 1366 | | |
1362 | 1367 | | |
| |||
1552 | 1557 | | |
1553 | 1558 | | |
1554 | 1559 | | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
1555 | 1573 | | |
1556 | 1574 | | |
1557 | 1575 | | |
| |||
2128 | 2146 | | |
2129 | 2147 | | |
2130 | 2148 | | |
2131 | | - | |
| 2149 | + | |
2132 | 2150 | | |
2133 | 2151 | | |
2134 | 2152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
431 | 439 | | |
432 | 440 | | |
433 | 441 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
| |||
199 | 203 | | |
200 | 204 | | |
201 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
202 | 210 | | |
203 | 211 | | |
204 | 212 | | |
| |||
481 | 489 | | |
482 | 490 | | |
483 | 491 | | |
484 | | - | |
485 | | - | |
| 492 | + | |
| 493 | + | |
486 | 494 | | |
487 | 495 | | |
488 | 496 | | |
| |||
0 commit comments