Repository navigation
Commit edf2faf
2.26.2: transformers prompt cache crops with the negative form (transformers 5.20)
transformers 5.20 removed Cache.crop(n) with a positive n (keep n tokens,
deprecated since 5.x); the call failed, _transformers_crop_cache returned
False, and every warm full-context call rebuilt the cache from scratch
(test_full_context_warm_call_feeds_only_the_suffix: 249 then 258 tokens
fed). Crop with keep - current (drop that many tokens), which every
supported transformers version accepts; the test fake follows the real
semantics. Passes on transformers 5.17.0, 5.19.0 and 5.20.1.
The 2.26.1 release run failed on this test (nothing was published), so
the Windows fixes of 2.26.1 ship in 2.26.2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent e600f01 commit edf2faf
5 files changed
Lines changed: 30 additions & 4 deletions
File tree
- abstractcore
- providers
- utils
- tests/huggingface
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
8 | 20 | | |
9 | 21 | | |
10 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4531 | 4531 | | |
4532 | 4532 | | |
4533 | 4533 | | |
| 4534 | + | |
| 4535 | + | |
| 4536 | + | |
4534 | 4537 | | |
4535 | | - | |
| 4538 | + | |
| 4539 | + | |
| 4540 | + | |
| 4541 | + | |
| 4542 | + | |
| 4543 | + | |
| 4544 | + | |
| 4545 | + | |
| 4546 | + | |
4536 | 4547 | | |
4537 | 4548 | | |
4538 | 4549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
| |||
0 commit comments