File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
tensorrt_llm/_torch/auto_deploy Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ def _insert_quantized_linear(
140140 The state_dict is also updated to contain the sharded weights.
141141 """
142142 weight_nodes = extract_weight_nodes (node )
143+ assert len (weight_nodes .weights ) == 1 , "Expected exactly one weight node"
143144 lin_weight = weight_nodes .weights [0 ]
144145 new_param = nn .Parameter (self .quantize_weight (lin_weight .tensor ), requires_grad = False )
145146 modname , _ , attrname = lin_weight .node_key .rpartition ("." )
Original file line number Diff line number Diff line change @@ -231,7 +231,8 @@ def find_get_attr_node(weight_node: Node) -> Node:
231231 WeightNode (
232232 node = node .args [1 ],
233233 node_key = node .args [1 ].target ,
234- tensor = gm .get_parameter (node .args [1 ].target ),
234+ tensor = get_const_tensor (node .args [1 ].target , gm ),
235+ submod = gm .get_submodule (node .args [1 ].target .rpartition ("." )[0 ]),
235236 )
236237 ],
237238 [],
You can’t perform that action at this time.
0 commit comments