Skip to content

Commit e71d4bb

Browse files
committed
decouple vision tower
Signed-off-by: Kyle Sayers <[email protected]>
1 parent 8ffa1f9 commit e71d4bb

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

examples/quantization_w8a8_fp8/fp8_block_example.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
# In this case, we:
1616
# * quantize the weights to fp8 with per channel via ptq
1717
# * quantize the activations to fp8 with dynamic per token
18-
recipe = QuantizationModifier(
19-
targets="Linear", scheme="FP8_BLOCK", ignore=["lm_head"]
20-
)
18+
recipe = QuantizationModifier(targets="Linear", scheme="FP8_BLOCK", ignore=["lm_head"])
2119

2220
# Apply quantization.
2321
oneshot(model=model, recipe=recipe)

src/llmcompressor/pipelines/sequential/helpers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,14 @@ def topological_partition(graph: GraphModule, targets: Set[Module]) -> List[List
277277
while len(queue) > 0:
278278
node = queue.popleft()
279279

280-
# assign to partition
281-
partitions[partition_index].append(node)
282-
283280
# guarantee targets are assigned to disjoint partitions
284-
if node in target_nodes:
281+
if node in target_nodes and len(partitions[partition_index]) > 0:
285282
partition_index += 1
286283
partitions.append([])
287284

285+
# assign to partition
286+
partitions[partition_index].append(node)
287+
288288
# recurse on last indegree only in order to guarantee that
289289
# the node is assigned to maximal partition
290290
for user in node.users:

0 commit comments

Comments
 (0)