Commit 3c29e139 authored by guanyu1's avatar guanyu1
Browse files

prompts+tokenid

parent e28b0086
...@@ -69,7 +69,9 @@ PROMPTS="你是一个搜索排序专家,请你仔细阅读以下Doc和Query, ...@@ -69,7 +69,9 @@ PROMPTS="你是一个搜索排序专家,请你仔细阅读以下Doc和Query,
if __name__ == "__main__": if __name__ == "__main__":
llm = LLM(model="/tools/gy_model/hunyuan_model", task="classify",trust_remote_code=True) llm = LLM(model="/tools/gy_model/hunyuan_model", task="classify",trust_remote_code=True)
# 以列表形式传入,避免某些路径把字符串当作序列逐字符处理 # token_id
#(output,) = llm.classify(token_inputs(DEFAULT_PROMPT_TOKEN_IDS))
#prompts
(output,) = llm.classify(PROMPTS) (output,) = llm.classify(PROMPTS)
probs = output.outputs.probs probs = output.outputs.probs
print(f"Class Probabilities: {probs!r} (size={len(probs)})") print(f"Class Probabilities: {probs!r} (size={len(probs)})")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment