@@ -453,25 +453,30 @@ def __init__(
453453 context_dim : int ,
454454 quant_config : Optional [QuantizationConfig ] = None ,
455455 bias : bool = False ,
456+ prefix : str = "" ,
456457 ) -> None :
457458 super ().__init__ ()
458459 self .hidden_size = d_model
459460 self .proj = ColumnParallelLinear (self .hidden_size ,
460461 self .hidden_size ,
461462 bias = bias ,
462- gather_output = True )
463+ gather_output = True ,
464+ quant_config = quant_config ,
465+ prefix = f"{ prefix } .proj" )
463466 self .post_projection_norm = nn .LayerNorm (self .hidden_size )
464467 self .gate_up_proj = MergedColumnParallelLinear (
465468 input_size = self .hidden_size ,
466469 output_sizes = [context_dim ] * 2 ,
467470 bias = bias ,
468471 quant_config = quant_config ,
472+ prefix = f"{ prefix } .gate_up_proj" ,
469473 )
470474 self .down_proj = RowParallelLinear (
471475 context_dim ,
472476 self .hidden_size ,
473477 bias = bias ,
474478 quant_config = quant_config ,
479+ prefix = f"{ prefix } .down_proj" ,
475480 )
476481 self .act_fn = SiluAndMul ()
477482 self .extra_activation_func = nn .GELU ()
@@ -661,6 +666,7 @@ def __init__(
661666 context_dim = vision_config .intermediate_size ,
662667 quant_config = quant_config ,
663668 bias = False ,
669+ prefix = f"{ prefix } .merger" ,
664670 )
665671 self .embeddings = Glm4vVisionEmbeddings (vision_config )
666672
0 commit comments