Skip to content

Commit

Permalink
Merge pull request #174 from L-jasmine/chore/limit_ctx_size
Browse files Browse the repository at this point in the history
[Backend] Limit ctx-size to a maximum of 8K.
  • Loading branch information
jmbejar authored Jul 25, 2024
2 parents c7a2c74 + c86e422 commit 1cc2945
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moxin-backend/src/backend_impls/api_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn create_wasi(
load_model: &LoadModelOptions,
) -> wasmedge_sdk::WasmEdgeResult<WasiModule> {
// use model metadata context size
let ctx_size = Some(format!("{}", file.context_size));
let ctx_size = Some(format!("{}", file.context_size.min(8 * 1024)));

let n_gpu_layers = match load_model.gpu_layers {
moxin_protocol::protocol::GPULayers::Specific(n) => Some(n.to_string()),
Expand Down

0 comments on commit 1cc2945

Please sign in to comment.