searcher#
Searcher that calibrates sparse attention thresholds.
Classes
Calibrate sparse attention thresholds with the forward loop of the search config. |
- class SparseAttentionSearcher#
Bases:
BaseSearcherCalibrate sparse attention thresholds with the forward loop of the search config.
Calibration is configured by
sparse_cfg["calibration"]of the model’ssparse_attentionmode config and is skipped without it. Without aforward_loopordata_loader, a RULER calibration dataset is generated from the model’s tokenizer.- property default_state_dict: dict[str, Any]#
Return default state dict.
- run_search()#
Calibrate the sparse attention modules of the model.
- Return type:
None