Commit 880733a
committed
[KVCache] Support mode "None" for Rotary Embebdding
This PR supports a "None" Rotary Embedding mode in
PagedKVCache. When the mode is None, the rotary embedding
will not be applied to when computing attention.1 parent daa37e7 commit 880733a
File tree
3 files changed
+69
-25
lines changed- src/runtime/relax_vm
- tests/python/relax
3 files changed
+69
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
160 | | - | |
161 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
Lines changed: 32 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
325 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
326 | 339 | | |
327 | 340 | | |
328 | 341 | | |
| |||
361 | 374 | | |
362 | 375 | | |
363 | 376 | | |
364 | | - | |
| 377 | + | |
365 | 378 | | |
366 | 379 | | |
367 | 380 | | |
| |||
406 | 419 | | |
407 | 420 | | |
408 | 421 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
413 | 428 | | |
414 | 429 | | |
415 | 430 | | |
| |||
445 | 460 | | |
446 | 461 | | |
447 | 462 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
453 | 472 | | |
454 | 473 | | |
455 | 474 | | |
456 | | - | |
| 475 | + | |
457 | 476 | | |
458 | 477 | | |
459 | 478 | | |
| |||
586 | 605 | | |
587 | 606 | | |
588 | 607 | | |
589 | | - | |
| 608 | + | |
590 | 609 | | |
591 | 610 | | |
592 | 611 | | |
| |||
Lines changed: 33 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
143 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
144 | 163 | | |
145 | 164 | | |
146 | 165 | | |
| |||
181 | 200 | | |
182 | 201 | | |
183 | 202 | | |
184 | | - | |
| 203 | + | |
185 | 204 | | |
186 | 205 | | |
187 | 206 | | |
| |||
228 | 247 | | |
229 | 248 | | |
230 | 249 | | |
231 | | - | |
| 250 | + | |
232 | 251 | | |
233 | 252 | | |
234 | 253 | | |
| |||
267 | 286 | | |
268 | 287 | | |
269 | 288 | | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
275 | 298 | | |
276 | 299 | | |
277 | 300 | | |
278 | | - | |
| 301 | + | |
279 | 302 | | |
280 | 303 | | |
281 | 304 | | |
| |||
1639 | 1662 | | |
1640 | 1663 | | |
1641 | 1664 | | |
1642 | | - | |
| 1665 | + | |
1643 | 1666 | | |
1644 | 1667 | | |
1645 | 1668 | | |
| |||
0 commit comments