[Frontend] Add LLM.reward specific to reward models (#21720)

Signed-off-by: wang.yuqi <noooop@126.com>
This commit is contained in:
wang.yuqi
2025-07-29 20:56:03 -07:00
committed by GitHub
parent 1b0a155534
commit 65f311ce59
7 changed files with 174 additions and 35 deletions
+4
View File
@@ -1053,6 +1053,10 @@ class VllmRunner:
req_outputs = self.llm.encode(prompts)
return [req_output.outputs.data for req_output in req_outputs]
def reward(self, prompts: list[str]) -> list[list[float]]:
req_outputs = self.llm.reward(prompts)
return [req_output.outputs.data for req_output in req_outputs]
def score(
self,
text_1: Union[str, list[str]],