Commit 372c30f
fix(distributed): use apply_chat_template(tokenize=True, return_dict=False) for cross-version token ids
transformers 5.x returns a dict {input_ids, attention_mask} from
apply_chat_template by default -> verifier.prefill got dict keys and raised
'str object cannot be interpreted as an integer' on the Mac (5.x). Adopt the
proven kv_cache_proposer.proposer.encode_chat convention (return_dict=False) in
the distributed integration test fixture AND the demo, replacing the demo's
ad-hoc coercion. Both distributed integration tests pass locally (2 passed).
Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>1 parent 1fc68f4 commit 372c30f
2 files changed
Lines changed: 13 additions & 15 deletions
File tree
- scripts
- tests/integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
181 | 182 | | |
182 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
183 | 186 | | |
184 | 187 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | 188 | | |
196 | 189 | | |
197 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
| 80 | + | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| |||
0 commit comments