We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b1c7fd commit d1bfa4dCopy full SHA for d1bfa4d
extension/llm/runner/text_llm_runner.cpp
@@ -128,9 +128,13 @@ Error TextLLMRunner::generate_from_pos(
128
129
// Reduce max_context_len by start_pos
130
int64_t max_context_len = metadata_.at(kMaxContextLen) - start_pos;
131
- ET_CHECK_MSG(num_prompt_tokens >= 1, "Expected at least 1 prompt token");
132
- ET_CHECK_MSG(
+ ET_CHECK_OR_RETURN_ERROR(
+ num_prompt_tokens >= 1,
133
+ InvalidArgument,
134
+ "Expected at least 1 prompt token");
135
136
num_prompt_tokens < max_context_len,
137
138
"num_prompt_tokens %d >= max_context_len %" PRId64
139
", Max seq length exceeded - please increase max seq len value in your export script",
140
num_prompt_tokens,
0 commit comments