File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -420,16 +420,8 @@ AddonContext::AddonContext(const Napi::CallbackInfo& info) : Napi::ObjectWrap<Ad
420420 }
421421
422422 if (options.Has (" flashAttention" )) {
423- if (options.Get (" flashAttention" ).IsBoolean ()) {
424- bool value = options.Get (" flashAttention" ).As <Napi::Boolean>().Value ();
425- if (value) {
426- context_params.flash_attn_type = LLAMA_FLASH_ATTN_TYPE_ENABLED;
427- } else {
428- context_params.flash_attn_type = LLAMA_FLASH_ATTN_TYPE_DISABLED;
429- }
430- } else {
431- context_params.flash_attn_type = LLAMA_FLASH_ATTN_TYPE_AUTO;
432- }
423+ bool flashAttention = options.Get (" flashAttention" ).As <Napi::Boolean>().Value ();
424+ context_params.flash_attn_type = flashAttention ? LLAMA_FLASH_ATTN_TYPE_ENABLED : LLAMA_FLASH_ATTN_TYPE_DISABLED;
433425 }
434426
435427 if (options.Has (" threads" )) {
You can’t perform that action at this time.
0 commit comments