Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion extension/llm/runner/text_llm_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Error TextLLMRunner::generate(
// Generate max_new_tokens - 1 because prefill already generated 1 token.
auto generate_result = text_token_generator_->generate(
prompt_tokens,
num_prompt_tokens,
pos_,
max_new_tokens - 1,
temperature_ == -1.0f ? config.temperature : temperature_,
wrapped_callback);
Expand All @@ -199,6 +199,8 @@ Error TextLLMRunner::generate(
}
int64_t num_generated_tokens = generate_result.get();

pos_ += num_generated_tokens;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need this anymore right? pos_ is being updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


stats_->inference_end_ms = time_in_ms();
if (!config.warming) {
printf("\n");
Expand Down
Loading