Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable caching by default #77

Merged
merged 1 commit into from
Jun 7, 2024
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: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,5 @@ Table of parameters
|`model_type` | String | Model type we want to use: llm or embedding, default value is llm|
|`model_alias`| String | Used as model_id if specified in request, mandatory in loadmodel|
|`model` | String | Used as model_id if specified in request, mandatory in chat/embedding request|
|`flash_attn` | Boolean| To enable Flash Attention, default is false|
|`flash_attn` | Boolean| To enable Flash Attention, default is false|
|`cache_type` | String| KV cache type: f16, q8_0, q4_0, default is f16|
2 changes: 1 addition & 1 deletion src/llama_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ bool LlamaEngine::LoadModelImpl(std::shared_ptr<Json::Value> jsonBody) {
}

server_map_[model_id].caching_enabled =
jsonBody->get("caching_enabled", false).asBool();
jsonBody->get("caching_enabled", true).asBool();
server_map_[model_id].user_prompt =
jsonBody->get("user_prompt", "USER: ").asString();
server_map_[model_id].ai_prompt =
Expand Down
Loading