def METHOD_NAME(model, dataloader=None):
    """Remove some sparse part in the model permanently and obtain acceleration directly.
    Args:
        model: a sprase model.
    """
    from .pattern_analyzer import SelfMHASearcher
    from .weight_slim import MHACompression
    logger.warning("You are using model slim methods, some attention heads will be removed permanently.")
    pa_obj = SelfMHASearcher(model, dataloader)
    layers, _ = pa_obj.search(split_qkv_ffn=False)
    layers = pa_obj.obtain_mha_module(layers)
    layers = pa_obj.from_layer_name_to_object(layers)
    for layer in layers:
        mha_compression = MHACompression(layer)
        mha_compression()
    return model