Commit a323bbe
committed
Update Float8Tensor for GRPO training in unsloth
**Summary:** Support a few extra ops called during GRPO loop in unsloth/vllm for Float8Tensor.
**Test Plan:**
```
python test/quantization/quantize_/workflows/float8/test_float8_tensor.py -k test_fp8_matmul_lora
python test/quantization/quantize_/workflows/float8/test_float8_tensor.py -k test_to_dtype_layout
python test/quantization/quantize_/workflows/float8/test_float8_tensor.py -k test_has_compatible_shallow_copy_type
python test/quantization/quantize_/workflows/float8/test_float8_tensor.py -k test_transpose
```1 parent e418066 commit a323bbe
File tree
3 files changed
+210
-18
lines changed- test/quantization/quantize_/workflows/float8
- torchao
- quantization/quantize_/workflows/float8
3 files changed
+210
-18
lines changedLines changed: 114 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
75 | 94 | | |
76 | 95 | | |
77 | 96 | | |
| |||
105 | 124 | | |
106 | 125 | | |
107 | 126 | | |
108 | | - | |
| 127 | + | |
109 | 128 | | |
110 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
111 | 189 | | |
112 | 190 | | |
113 | 191 | | |
114 | 192 | | |
115 | 193 | | |
116 | 194 | | |
117 | | - | |
| 195 | + | |
118 | 196 | | |
119 | 197 | | |
120 | 198 | | |
| |||
145 | 223 | | |
146 | 224 | | |
147 | 225 | | |
148 | | - | |
| 226 | + | |
149 | 227 | | |
150 | 228 | | |
151 | 229 | | |
| |||
758 | 836 | | |
759 | 837 | | |
760 | 838 | | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
761 | 871 | | |
762 | 872 | | |
763 | 873 | | |
| |||
Lines changed: 66 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
| 252 | + | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
260 | 295 | | |
261 | 296 | | |
262 | 297 | | |
263 | 298 | | |
264 | 299 | | |
265 | 300 | | |
266 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
267 | 305 | | |
268 | 306 | | |
269 | 307 | | |
| |||
290 | 328 | | |
291 | 329 | | |
292 | 330 | | |
| 331 | + | |
293 | 332 | | |
294 | 333 | | |
295 | 334 | | |
| |||
324 | 363 | | |
325 | 364 | | |
326 | 365 | | |
327 | | - | |
| 366 | + | |
328 | 367 | | |
329 | 368 | | |
330 | 369 | | |
331 | 370 | | |
332 | 371 | | |
333 | 372 | | |
334 | 373 | | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | 374 | | |
343 | | - | |
| 375 | + | |
344 | 376 | | |
345 | 377 | | |
346 | 378 | | |
| |||
357 | 389 | | |
358 | 390 | | |
359 | 391 | | |
360 | | - | |
361 | | - | |
362 | | - | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
363 | 397 | | |
364 | 398 | | |
365 | 399 | | |
| |||
677 | 711 | | |
678 | 712 | | |
679 | 713 | | |
| 714 | + | |
680 | 715 | | |
681 | 716 | | |
682 | 717 | | |
| |||
785 | 820 | | |
786 | 821 | | |
787 | 822 | | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
788 | 840 | | |
789 | 841 | | |
790 | 842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
511 | 541 | | |
512 | 542 | | |
513 | 543 | | |
| |||
0 commit comments