mcore_gpt_minitron
模块实现了用于NVIDIA Megatron-Core / NeMo模型的mcore_gpt_minitron剪枝算法。
Minitron剪枝算法使用激活幅度来估计模型中神经元/注意力头的重要性。 有关Minitron剪枝算法的更多详细信息可以在这里找到:https://arxiv.org/pdf/2407.14679
类
Minitron剪枝算法的搜索器。 |
- class MCoreGPTMinitronSearcher
基础类:
BaseSearcherMinitron剪枝算法的搜索器。
- before_search()
搜索前的可选预处理步骤。
- Return type:
无
- property default_search_config: Dict[str, Any]
获取搜索器的默认配置。
- property default_state_dict: Dict[str, Any]
返回默认状态字典。
- run_search()
运行实际搜索。
- Return type:
无
- sanitize_search_config(config)
清理搜索配置字典。
- Parameters:
config (Dict[str, Any] | None) –
- Return type:
Dict[str, Any]