This commit is contained in:
cotran 2024-11-22 12:17:04 -08:00
parent 5c54b40809
commit b5b56a9468
3 changed files with 5 additions and 3 deletions

View file

@ -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 = {

View file

@ -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",
"{'",

View file

@ -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"]