# Lighter, But Unsafe? \\ Revealing the Efficiency-Safety-Performance Dilemma in Large Reasoning Models

Source code for the Lighter, But Unsafe? \\ Revealing the Efficiency-Safety-Performance Dilemma in Large Reasoning Models

## Recommended software environment
- python == 3.10
- torch == 2.1.2
- transformers == 4.46.2
- tqdm >= 4.49.0
- numpy >= 1.20.2


## Description

- The AIME and MATH dataset are in the `PyramidKV-sub/AIME-dataset` and `PyramidKV-sub/MATH`.
- The H-COT and Mousetrap are in the `Malicious_Educator_hcot_o1` and `Mousetrap`.
- For the evaluation of Mousetrap and H-COT with efficiency LLM methods other than KV Cache Compression, please refer to `test_attack.py`.
- For the evaluation of Mousetrap and H-COT with KV Cache Compression, please refer to the `run_*.py` files in `PyramidKV-sub`.
- For the evaluation of MATH and AIME, please refer to the `eval_*.py` files in `PyramidKV-sub/AIME/eval`.

