Add flash attention
This commit is contained in:
parent
8d319aa99a
commit
f909185eac
@ -126,6 +126,10 @@ actor WhisperContext {
|
||||
var params = whisper_context_default_params()
|
||||
#if targetEnvironment(simulator)
|
||||
params.use_gpu = false
|
||||
logger.info("Running on the simulator, using CPU")
|
||||
#else
|
||||
params.flash_attn = true // Enable flash attention for Metal
|
||||
logger.info("Flash attention enabled for Metal")
|
||||
#endif
|
||||
|
||||
let context = whisper_init_from_file_with_params(path, params)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user