def METHOD_NAME(state_dict):
    logger.info(" * Convert Fast QKV format to Huggingface BERT format * ")
    new_state_dict = {}
    for key in state_dict:
        value = state_dict[key]
        if key.endswith("attention.self.q_bias"):
            new_state_dict[key.replace("attention.self.q_bias", "attention.self.query.bias")] = value.view(-1)
        elif key.endswith("attention.self.v_bias"):
            new_state_dict[key.replace("attention.self.v_bias", "attention.self.value.bias")] = value.view(-1)
            new_state_dict[key.replace("attention.self.v_bias", "attention.self.key.bias")] = torch.zeros_like(value.view(-1))
        elif key.endswith("attention.self.qkv_linear.weight"):
            l, _ = value.size()
            assert l % 3 == 0
            l = l // 3
            q, k, v = torch.split(value, split_size_or_sections=(l, l, l), dim=0)
            new_state_dict[key.replace("attention.self.qkv_linear.weight", "attention.self.query.weight")] = q
            new_state_dict[key.replace("attention.self.qkv_linear.weight", "attention.self.key.weight")] = k
            new_state_dict[key.replace("attention.self.qkv_linear.weight", "attention.self.value.weight")] = v
        elif key == "bert.encoder.rel_pos_bias.weight":
            new_state_dict["bert.rel_pos_bias.weight"] = value
        else:
            new_state_dict[key] = value
    del state_dict
    return new_state_dict