Commit 930a046
[Transforms] Update examples for R4 and
SUMMARY:
Prerequisites:
- [x] vllm-project/compressed-tensors#472
This PR updates the SpinQuant and Quip examples to include
`transform_block_size` and the latest R4 feature in SpinQuant. It also
reverts the `TransformScheme.block_size` changes previously introduced
into CT, and updated in Pr linked above. While `block_size` is a more
appropriate name, `head_dim` has already landed in vllm, and it would be
too much of a pain to change. Users will rarely create their own
`TransformScheme` anyway.
TEST PLAN:
- [x] Both examples run and the saved model can be run in vllm, output
is meaningful.
- [x] with prints, confirmed hadacore is used for
`QuIPModifier(rotations=["v", "u"], transform_block_size=64,
transform_type="hadamard")`
- [x] and dense gemm is used for `QuIPModifier(rotations=["v", "u"],
transform_block_size=64, transform_type="random-hadamard")`
---------
Signed-off-by: Brian Dellabetta <bdellabe@redhat.com>
Signed-off-by: Cassie Jeon <cajeon@redhat.com>transform_block_size option (vllm-project#1870)1 parent 046ce57 commit 930a046
File tree
4 files changed
+14
-11
lines changed- examples/transform
- src/llmcompressor/modifiers/transform
- quip
- spinquant
4 files changed
+14
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
| 15 | + | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| |||
0 commit comments