Spaces:
Sleeping
Sleeping
Joshua Lochner commited on
Commit ·
4bfdb73
1
Parent(s): 5df3fb6
Use `no_attentions` revision for medium+undistilled models
Browse files- src/worker.js +3 -0
src/worker.js
CHANGED
|
@@ -23,6 +23,9 @@ class PipelineFactory {
|
|
| 23 |
this.instance = pipeline(this.task, this.model, {
|
| 24 |
quantized: this.quantized,
|
| 25 |
progress_callback,
|
|
|
|
|
|
|
|
|
|
| 26 |
});
|
| 27 |
}
|
| 28 |
|
|
|
|
| 23 |
this.instance = pipeline(this.task, this.model, {
|
| 24 |
quantized: this.quantized,
|
| 25 |
progress_callback,
|
| 26 |
+
|
| 27 |
+
// For medium models, we need to load the `no_attentions` revision to avoid running out of memory
|
| 28 |
+
revision: this.model.includes("/whisper-medium") ? "no_attentions" : "main"
|
| 29 |
});
|
| 30 |
}
|
| 31 |
|