From ddf96f4d259fb0a01d4b4fc8a15f3a0b225bc685 Mon Sep 17 00:00:00 2001 From: Roman Solomatin <36135455+Samoed@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:21:38 +0300 Subject: [PATCH] apply instruction template --- mteb/models/instruct_wrapper.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mteb/models/instruct_wrapper.py b/mteb/models/instruct_wrapper.py index 22f1a8593..ce5152896 100644 --- a/mteb/models/instruct_wrapper.py +++ b/mteb/models/instruct_wrapper.py @@ -121,6 +121,8 @@ def encode( ) -> np.ndarray: task = mteb.get_task(task_name=task_name) instruction = self.get_instruction(task_name, prompt_type) + if self.instruction_template: + instruction = self.format_instruction(instruction, prompt_type) # to passage prompts won't be applied to passages if (