def freeze_params(module: nn.Module) -> None:
    """
    Freeze the parameters of this module,
    i.e. do not update them during training

    :param module: freeze parameters of this module
    """
    for _, p in module.named_parameters():
        p.requires_grad = False

    Freeze the parameters of this module,
    i.e. do not update them during training

    :param module: freeze parameters of this module
    
mGPT/models/utils/tools.py