Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/llmcompressor/pipelines/sequential/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,14 @@ def topological_partition(graph: GraphModule, targets: Set[Module]) -> List[List
while len(queue) > 0:
node = queue.popleft()

# assign to partition
partitions[partition_index].append(node)

# guarantee targets are assigned to disjoint partitions
if node in target_nodes:
if node in target_nodes and len(partitions[partition_index]) > 0:
partition_index += 1
partitions.append([])

# assign to partition
partitions[partition_index].append(node)

# recurse on last indegree only in order to guarantee that
# the node is assigned to maximal partition
for user in node.users:
Expand Down
7 changes: 7 additions & 0 deletions tests/llmcompressor/transformers/tracing/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pytest
from transformers import (
AutoModelForCausalLM,
Cohere2VisionForConditionalGeneration,
Gemma3ForConditionalGeneration,
Idefics3ForConditionalGeneration,
Llama4ForConditionalGeneration,
Expand Down Expand Up @@ -88,6 +89,12 @@
["torchvision"],
),
(
"CohereLabs/command-a-vision-07-2025",
Cohere2VisionForConditionalGeneration,
["Cohere2DecoderLayer"],
"vision",
[],
)(
"Qwen/Qwen2-VL-2B-Instruct",
Qwen2VLForConditionalGeneration,
["Qwen2VLDecoderLayer"],
Expand Down
Loading