├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE.txt ├── README.md ├── SECURITY.md ├── assets ├── Activation_Steering_for_Instruction _Following_RAI_transparency_note.pdf └── fig1.png ├── composition ├── evaluate_format_plus_length.py └── load_results.py ├── config ├── composition │ └── evaluation.yaml ├── format │ ├── compute_perplexity.yaml │ ├── compute_representations.yaml │ ├── find_best_layer.yaml │ ├── format_evaluation.yaml │ └── precompute_steering_vectors.yaml ├── keywords │ ├── compute_representations.yaml │ └── keyword_evaluation.yaml └── length │ ├── compute_representations.yaml │ └── length_evaluation.yaml ├── data ├── format │ ├── all_base_x_all_instructions_filtered.jsonl │ ├── ifeval_augmented_filtered.jsonl │ └── ifeval_single_instr_format.jsonl ├── ifeval_wo_instructions.jsonl └── keywords │ ├── exclusion_validation.jsonl │ ├── ifeval_keywords_exclude.txt │ ├── ifeval_keywords_include.txt │ ├── ifeval_single_keyword_exclude.jsonl │ ├── ifeval_single_keyword_include.jsonl │ └── inclusion_validation.jsonl ├── format ├── compute_representations.py ├── compute_response_perplexity.py ├── evaluate.py ├── find_best_layer.py ├── layer_search_w_perplexity.py ├── load_results.py └── precompute_ivs.py ├── ifeval_scripts ├── README.md ├── evaluation_main.py ├── instructions.py ├── instructions_registry.py ├── instructions_test.py ├── instructions_util.py ├── instructions_util_test.py ├── requirements.txt └── run.sh ├── keywords ├── compute_representations.py ├── compute_response_perplexity.py ├── evaluate.py └── load_results.py ├── length ├── compute_representations.py ├── evaluate.py └── load_results.py ├── requirements.txt └── utils ├── generation_utils.py └── model_utils.py /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/.gitignore -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/LICENSE.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/README.md -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/SECURITY.md -------------------------------------------------------------------------------- /assets/Activation_Steering_for_Instruction _Following_RAI_transparency_note.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/assets/Activation_Steering_for_Instruction _Following_RAI_transparency_note.pdf -------------------------------------------------------------------------------- /assets/fig1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/assets/fig1.png -------------------------------------------------------------------------------- /composition/evaluate_format_plus_length.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/composition/evaluate_format_plus_length.py -------------------------------------------------------------------------------- /composition/load_results.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/composition/load_results.py -------------------------------------------------------------------------------- /config/composition/evaluation.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/config/composition/evaluation.yaml -------------------------------------------------------------------------------- /config/format/compute_perplexity.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/config/format/compute_perplexity.yaml -------------------------------------------------------------------------------- /config/format/compute_representations.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/config/format/compute_representations.yaml -------------------------------------------------------------------------------- /config/format/find_best_layer.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/config/format/find_best_layer.yaml -------------------------------------------------------------------------------- /config/format/format_evaluation.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/config/format/format_evaluation.yaml -------------------------------------------------------------------------------- /config/format/precompute_steering_vectors.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/config/format/precompute_steering_vectors.yaml -------------------------------------------------------------------------------- /config/keywords/compute_representations.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/config/keywords/compute_representations.yaml -------------------------------------------------------------------------------- /config/keywords/keyword_evaluation.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/config/keywords/keyword_evaluation.yaml -------------------------------------------------------------------------------- /config/length/compute_representations.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/config/length/compute_representations.yaml -------------------------------------------------------------------------------- /config/length/length_evaluation.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/config/length/length_evaluation.yaml -------------------------------------------------------------------------------- /data/format/all_base_x_all_instructions_filtered.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/data/format/all_base_x_all_instructions_filtered.jsonl -------------------------------------------------------------------------------- /data/format/ifeval_augmented_filtered.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/data/format/ifeval_augmented_filtered.jsonl -------------------------------------------------------------------------------- /data/format/ifeval_single_instr_format.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/data/format/ifeval_single_instr_format.jsonl -------------------------------------------------------------------------------- /data/ifeval_wo_instructions.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/data/ifeval_wo_instructions.jsonl -------------------------------------------------------------------------------- /data/keywords/exclusion_validation.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/data/keywords/exclusion_validation.jsonl -------------------------------------------------------------------------------- /data/keywords/ifeval_keywords_exclude.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/data/keywords/ifeval_keywords_exclude.txt -------------------------------------------------------------------------------- /data/keywords/ifeval_keywords_include.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/data/keywords/ifeval_keywords_include.txt -------------------------------------------------------------------------------- /data/keywords/ifeval_single_keyword_exclude.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/data/keywords/ifeval_single_keyword_exclude.jsonl -------------------------------------------------------------------------------- /data/keywords/ifeval_single_keyword_include.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/data/keywords/ifeval_single_keyword_include.jsonl -------------------------------------------------------------------------------- /data/keywords/inclusion_validation.jsonl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/data/keywords/inclusion_validation.jsonl -------------------------------------------------------------------------------- /format/compute_representations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/format/compute_representations.py -------------------------------------------------------------------------------- /format/compute_response_perplexity.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/format/compute_response_perplexity.py -------------------------------------------------------------------------------- /format/evaluate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/format/evaluate.py -------------------------------------------------------------------------------- /format/find_best_layer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/format/find_best_layer.py -------------------------------------------------------------------------------- /format/layer_search_w_perplexity.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/format/layer_search_w_perplexity.py -------------------------------------------------------------------------------- /format/load_results.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/format/load_results.py -------------------------------------------------------------------------------- /format/precompute_ivs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/format/precompute_ivs.py -------------------------------------------------------------------------------- /ifeval_scripts/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/ifeval_scripts/README.md -------------------------------------------------------------------------------- /ifeval_scripts/evaluation_main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/ifeval_scripts/evaluation_main.py -------------------------------------------------------------------------------- /ifeval_scripts/instructions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/ifeval_scripts/instructions.py -------------------------------------------------------------------------------- /ifeval_scripts/instructions_registry.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/ifeval_scripts/instructions_registry.py -------------------------------------------------------------------------------- /ifeval_scripts/instructions_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/ifeval_scripts/instructions_test.py -------------------------------------------------------------------------------- /ifeval_scripts/instructions_util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/ifeval_scripts/instructions_util.py -------------------------------------------------------------------------------- /ifeval_scripts/instructions_util_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/ifeval_scripts/instructions_util_test.py -------------------------------------------------------------------------------- /ifeval_scripts/requirements.txt: -------------------------------------------------------------------------------- 1 | absl 2 | langdetect 3 | nltk 4 | immutabledict 5 | -------------------------------------------------------------------------------- /ifeval_scripts/run.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/ifeval_scripts/run.sh -------------------------------------------------------------------------------- /keywords/compute_representations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/keywords/compute_representations.py -------------------------------------------------------------------------------- /keywords/compute_response_perplexity.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/keywords/compute_response_perplexity.py -------------------------------------------------------------------------------- /keywords/evaluate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/keywords/evaluate.py -------------------------------------------------------------------------------- /keywords/load_results.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/keywords/load_results.py -------------------------------------------------------------------------------- /length/compute_representations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/length/compute_representations.py -------------------------------------------------------------------------------- /length/evaluate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/length/evaluate.py -------------------------------------------------------------------------------- /length/load_results.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/length/load_results.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/requirements.txt -------------------------------------------------------------------------------- /utils/generation_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/utils/generation_utils.py -------------------------------------------------------------------------------- /utils/model_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoft/llm-steer-instruct/HEAD/utils/model_utils.py --------------------------------------------------------------------------------