Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions tools/server/server-context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -995,9 +995,6 @@ struct server_context_impl {
// don't update the cache if the slot's context is empty
update_cache = update_cache && tokens.size() > 0;

// TODO: mtmd does not support prompt cache
update_cache = update_cache && (ret->mctx == nullptr);

if (update_cache) {
SRV_WRN("%s", "updating prompt cache\n");

Expand Down
3 changes: 1 addition & 2 deletions tools/server/server-task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1900,10 +1900,9 @@ server_prompt * server_prompt_cache::alloc(const server_prompt & prompt, size_t
return nullptr;
}

// TODO: for some reason we can't copy server_tokens, so we have to do this workaround
auto & cur = states.emplace_back();
cur = {
/*.tokens =*/ server_tokens(prompt.tokens.get_text_tokens(), false),
/*.tokens =*/ prompt.tokens.clone(),
/*.data =*/ std::move(state_data),
/*.checkpoints =*/ prompt.checkpoints,
};
Expand Down
Loading