Skip to content
Merged
Changes from all 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
4 changes: 2 additions & 2 deletions src/mcore_bridge/model/gpts/deepseek_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, config, *args, **kwargs):
super().__init__(config, *args, **kwargs)
self.layer_type = self.config.hf_config.layer_types[self.layer_number - 1]
self.rope_layer_type = 'main' if self.layer_type == 'sliding_attention' else 'compress'
if getattr(config, 'fp8_param', False):
if config.fp8_param:
Comment thread
Jintao-Huang marked this conversation as resolved.
group_proj_in_size = self.query_projection_size // config.o_groups
del self.linear_o_group_proj
self.linear_o_group_proj = te.GroupedLinear(
Expand Down Expand Up @@ -442,7 +442,7 @@ def _set_o_group_proj_grouped(self, mg_attn, hf_state_dict, to_mcore):
scale_invs.append(param._rowwise_scale_inv)
else:
weights.append(param.data)
hf_state_dict['wo_a.weight'] = torch.cat(weights, dim=0)
hf_state_dict['wo_a.weight'] = torch.cat(weights, dim=0).view(torch.float8_e4m3fn)
Comment thread
Jintao-Huang marked this conversation as resolved.
if scale_invs:
hf_state_dict['wo_a.weight_scale_inv'] = torch.cat(scale_invs, dim=0)

Expand Down
Loading