mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
fix bug
This commit is contained in:
parent
5c54b40809
commit
b5b56a9468
3 changed files with 5 additions and 3 deletions
|
|
@ -19,7 +19,7 @@ arch_function_generation_params = {
|
|||
"top_k": 50,
|
||||
"max_tokens": 512,
|
||||
"stop_token_ids": [151645],
|
||||
"top_logprobs": 10,
|
||||
# "top_logprobs": 10,
|
||||
}
|
||||
|
||||
arch_guard_model_type = {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
},
|
||||
{
|
||||
"case" : "parameter_value_hallucination",
|
||||
"expect" : 1,
|
||||
"expect" : 0,
|
||||
"tokens" : ["<tool_call>",
|
||||
"\n",
|
||||
"{'",
|
||||
|
|
@ -404,7 +404,7 @@
|
|||
},
|
||||
{
|
||||
"case": "fail_case",
|
||||
"expect" : 1,
|
||||
"expect" : 0,
|
||||
"tokens" : ["<tool_call>",
|
||||
"\n",
|
||||
"{'",
|
||||
|
|
|
|||
|
|
@ -55,4 +55,6 @@ def test_hallucination(case):
|
|||
state.tokens.append(token)
|
||||
state.logprobs.append(logprob)
|
||||
state.process_token()
|
||||
if state.hallucination:
|
||||
break
|
||||
assert state.hallucination == case["expect"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue