Difference between revisions of "Sugoi"
(Created page with "== Whatis == == Installing == === Online === === Offline === ==== Using CUDA to Improve Performance of Offline Version==== '''''NVIDIA GPUs ONLY''''' Before doing anythi...") |
(→Offline) |
||
| Line 6: | Line 6: | ||
=== Offline === | === Offline === | ||
| + | :1. Download these two files: [https://drive.google.com/file/d/1X-n96M_Lf64EqqsQDt0uCDlZtXoschzk/view Sugoi Version 3.0] and [https://drive.google.com/file/d/1KgAsQzI-A0D8vmNIekwIRKlflGw9xz3i/view the pre-trained AI] | ||
| − | ==== Using CUDA to Improve Performance of Offline Version==== | + | :2. Extract Sugoi-Japanese-Translator-V3.0.rar wherever |
| − | '''''NVIDIA GPUs ONLY''''' | + | |
| + | :3. Extract the folders contained in Offline Model V3.0.zip to <code><your Sugoi Directory>\backendServer\Program-Backend\Sugoi-Translator-Offline\offlineTranslation\fairseq\</code> | ||
| + | |||
| + | Launch via the included <code>Sugoi-Translator-Offline (click here).bat</code> file. Should open two command windows and the translation window. It takes a minute or so to start working. | ||
| + | |||
| + | ==== Using CUDA to Improve Performance of Offline Version ==== | ||
| + | <div class="center" style="width: auto; margin-left: auto; margin-right: auto;"> | ||
| + | '''''IMPORTANT: WORKS FOR NVIDIA GPUs ONLY''''' | ||
| + | </div> | ||
Before doing anything, check in NVIDIA control panel > system information > component tab and see what CUDA version you have. v3.xx only works with CUDA v11.xx+, 2.0 works with CUDA 10.xx | Before doing anything, check in NVIDIA control panel > system information > component tab and see what CUDA version you have. v3.xx only works with CUDA v11.xx+, 2.0 works with CUDA 10.xx | ||
| − | ===== Method 1 ===== | + | ===== Method 1: Using a premade powershell script ===== |
| − | + | [https://cdn.discordapp.com/attachments/795551389211164703/902472195954065428/InstallCudaForSugoiV3.zip Download & read the included "install cuda.txt" file] | |
| − | |||
| − | https://cdn.discordapp.com/attachments/795551389211164703/902472195954065428/InstallCudaForSugoiV3.zip | ||
Mega link for those allergic to discord: https://mega.nz/file/k00m2JSa#NmOd2nt6JpIbv1_LOIStQCQwbpS70pMMfUiE6kAn2pg | Mega link for those allergic to discord: https://mega.nz/file/k00m2JSa#NmOd2nt6JpIbv1_LOIStQCQwbpS70pMMfUiE6kAn2pg | ||
| − | ===== Method 2 | + | ===== Method 2: Manually upgrade by pip using python included in Sugoi ===== |
| − | Manually upgrade by pip using python included in Sugoi | + | 1. Open command prompt as administrator (not powershell) go to <code><your Sugoi Directory>\Power-Source\Python38</code> |
| − | |||
| − | 1. Open command prompt as administrator (not powershell) go to | ||
2. Type: | 2. Type: | ||
| Line 32: | Line 37: | ||
python.exe -m pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html --user | python.exe -m pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html --user | ||
| − | 3. In | + | 3. In <code>backendServer\Program-Backend\Sugoi-Translator-Offline\offlineTranslation\fairseq\flaskServer.py</code> change line 19 <code># ja2en.cuda()</code> to <code>ja2en.cuda()</code> |
| − | |||
| − | |||
| − | |||
| + | ===== Method 3: Manually upgrade by pip using global python installation on Windows===== | ||
1. Open command prompt (or powershell) as administrator and type: | 1. Open command prompt (or powershell) as administrator and type: | ||
CUDA 10: | CUDA 10: | ||
| − | pip install --target= | + | pip install --target=<your Sugoi Directory>\Power-Source\Python38\Lib\site-packages --upgrade torch==1.9.1+cu102 torchvision==0.10.1+cu102 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html |
CUDA 11: | CUDA 11: | ||
| − | pip install --target= | + | pip install --target=<your Sugoi Directory>\Power-Source\Python38\Lib\site-packages --upgrade torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html |
| − | 2. Change line 19 in | + | 2. Change line 19 in <code>backendServer\Program-Backend\Sugoi-Translator-Offline\offlineTranslation\fairseq\flaskServer.py</code> from <code># ja2en.cuda()</code> to <code>ja2en.cuda()</code> |
Revision as of 22:53, 22 February 2022
Contents
Whatis
Installing
Online
Offline
- 1. Download these two files: Sugoi Version 3.0 and the pre-trained AI
- 2. Extract Sugoi-Japanese-Translator-V3.0.rar wherever
- 3. Extract the folders contained in Offline Model V3.0.zip to
<your Sugoi Directory>\backendServer\Program-Backend\Sugoi-Translator-Offline\offlineTranslation\fairseq\
Launch via the included Sugoi-Translator-Offline (click here).bat file. Should open two command windows and the translation window. It takes a minute or so to start working.
Using CUDA to Improve Performance of Offline Version
IMPORTANT: WORKS FOR NVIDIA GPUs ONLY
Before doing anything, check in NVIDIA control panel > system information > component tab and see what CUDA version you have. v3.xx only works with CUDA v11.xx+, 2.0 works with CUDA 10.xx
Method 1: Using a premade powershell script
Download & read the included "install cuda.txt" file
Mega link for those allergic to discord: https://mega.nz/file/k00m2JSa#NmOd2nt6JpIbv1_LOIStQCQwbpS70pMMfUiE6kAn2pg
Method 2: Manually upgrade by pip using python included in Sugoi
1. Open command prompt as administrator (not powershell) go to <your Sugoi Directory>\Power-Source\Python38
2. Type:
CUDA 10:
python.exe -m pip install torch==1.9.1+cu102 torchvision==0.10.1+cu102 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html --user
CUDA 11:
python.exe -m pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html --user
3. In backendServer\Program-Backend\Sugoi-Translator-Offline\offlineTranslation\fairseq\flaskServer.py change line 19 # ja2en.cuda() to ja2en.cuda()
Method 3: Manually upgrade by pip using global python installation on Windows
1. Open command prompt (or powershell) as administrator and type:
CUDA 10:
pip install --target=<your Sugoi Directory>\Power-Source\Python38\Lib\site-packages --upgrade torch==1.9.1+cu102 torchvision==0.10.1+cu102 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
CUDA 11:
pip install --target=<your Sugoi Directory>\Power-Source\Python38\Lib\site-packages --upgrade torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio===0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
2. Change line 19 in backendServer\Program-Backend\Sugoi-Translator-Offline\offlineTranslation\fairseq\flaskServer.py from # ja2en.cuda() to ja2en.cuda()