mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-21 05:33:06 +00:00
coreml : support quantized model files
This commit is contained in:
parent
e693074aa6
commit
fd01209d09
@ -2598,6 +2598,15 @@ static std::string whisper_get_coreml_path_encoder(std::string path_bin) {
|
||||
path_bin = path_bin.substr(0, pos);
|
||||
}
|
||||
|
||||
// match "-qx_x"
|
||||
pos = path_bin.rfind('-');
|
||||
if (pos != std::string::npos) {
|
||||
auto sub = path_bin.substr(pos);
|
||||
if (sub.size() == 5 && sub[1] == 'q' && sub[3] == '_') {
|
||||
path_bin = path_bin.substr(0, pos);
|
||||
}
|
||||
}
|
||||
|
||||
path_bin += "-encoder.mlmodelc";
|
||||
|
||||
return path_bin;
|
||||
|
Loading…
Reference in New Issue
Block a user