Skip to content

Commit

Permalink
feat: change n_batch default to 2048 (#63)
Browse files Browse the repository at this point in the history
Co-authored-by: vansangpfiev <[email protected]>
  • Loading branch information
vansangpfiev and sangjanai authored May 28, 2024
1 parent d22ee56 commit dc3fe71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/llama_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ bool LlamaEngine::LoadModelImpl(std::shared_ptr<Json::Value> jsonBody) {
params.n_ctx = jsonBody->get("ctx_len", 2048).asInt();
params.embedding = jsonBody->get("embedding", true).asBool();
model_type = jsonBody->get("model_type", "llm").asString();
// Check if n_parallel exists in jsonBody, if not, set to drogon_thread
params.n_batch = jsonBody->get("n_batch", 512).asInt();
params.n_batch = jsonBody->get("n_batch", 2048).asInt();
params.n_ubatch = jsonBody->get("n_ubatch", params.n_batch).asInt();
// Check if n_parallel exists in jsonBody, if not, set to drogon_thread
params.n_parallel = jsonBody->get("n_parallel", 1).asInt();
params.n_threads =
jsonBody->get("cpu_threads", std::thread::hardware_concurrency())
Expand Down

0 comments on commit dc3fe71

Please sign in to comment.