Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
import ctranslate2
|
2 |
import gradio as gr
|
3 |
from huggingface_hub import snapshot_download
|
@@ -10,6 +12,10 @@ Translator using <a href='https://arxiv.org/abs/2309.04662' target='_blank'>MADL
|
|
10 |
</p>
|
11 |
"""
|
12 |
|
|
|
|
|
|
|
|
|
13 |
|
14 |
model_name = "santhosh/madlad400-3b-ct2"
|
15 |
model_path = snapshot_download(model_name)
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
import ctranslate2
|
4 |
import gradio as gr
|
5 |
from huggingface_hub import snapshot_download
|
|
|
12 |
</p>
|
13 |
"""
|
14 |
|
15 |
+
# As per https://opennmt.net/CTranslate2/performance.html
|
16 |
+
# By default CTranslate2 is compiled with intel MKL.
|
17 |
+
# It is observed that this setting has a significant positive performance impact.
|
18 |
+
os.environ["CT2_USE_EXPERIMENTAL_PACKED_GEMM"] = "1"
|
19 |
|
20 |
model_name = "santhosh/madlad400-3b-ct2"
|
21 |
model_path = snapshot_download(model_name)
|