Translation
Transformers
PyTorch
English
Hindi
viuai
viutranslate
sarus-500m
nmt
english-to-hindi
hindi-to-english
indic
devanagari
bfloat16
zero-synthetic
Instructions to use ViuAI/ViuTranslate with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ViuAI/ViuTranslate with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="ViuAI/ViuTranslate")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ViuAI/ViuTranslate", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Jupyter optimization: unbuffered live streaming output
Browse files- runners/run_5090.py +8 -1
runners/run_5090.py
CHANGED
|
@@ -12,9 +12,16 @@ import sys
|
|
| 12 |
import shutil
|
| 13 |
import subprocess
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
# Prevent Jupyter ipykernel crash from progress bar spam
|
| 16 |
os.environ["HF_HUB_DISABLE_PROGRESS_BARS"] = "1"
|
| 17 |
os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
|
|
|
| 18 |
|
| 19 |
print("=" * 85)
|
| 20 |
print("🚀 Launching ViuTranslate-500M Training on NVIDIA RTX 5090 (32GB VRAM)")
|
|
@@ -87,7 +94,7 @@ print(" ✅ Base weights ready.")
|
|
| 87 |
# bf16 enabled, Fused AdamW, TF32 matmuls
|
| 88 |
print("\n⚡ [5/5] Launching RTX 5090 Ultra-Tuned Training...")
|
| 89 |
cmd = [
|
| 90 |
-
sys.executable, "train.py",
|
| 91 |
"--data_dir", "data/tokenized",
|
| 92 |
"--base_ckpt", base_ckpt,
|
| 93 |
"--output_dir", "checkpoints",
|
|
|
|
| 12 |
import shutil
|
| 13 |
import subprocess
|
| 14 |
|
| 15 |
+
# Ensure unbuffered live stream in Jupyter Notebook
|
| 16 |
+
if hasattr(sys.stdout, "reconfigure"):
|
| 17 |
+
sys.stdout.reconfigure(line_buffering=True)
|
| 18 |
+
if hasattr(sys.stderr, "reconfigure"):
|
| 19 |
+
sys.stderr.reconfigure(line_buffering=True)
|
| 20 |
+
|
| 21 |
# Prevent Jupyter ipykernel crash from progress bar spam
|
| 22 |
os.environ["HF_HUB_DISABLE_PROGRESS_BARS"] = "1"
|
| 23 |
os.environ["TOKENIZERS_PARALLELISM"] = "false"
|
| 24 |
+
os.environ["PYTHONUNBUFFERED"] = "1"
|
| 25 |
|
| 26 |
print("=" * 85)
|
| 27 |
print("🚀 Launching ViuTranslate-500M Training on NVIDIA RTX 5090 (32GB VRAM)")
|
|
|
|
| 94 |
# bf16 enabled, Fused AdamW, TF32 matmuls
|
| 95 |
print("\n⚡ [5/5] Launching RTX 5090 Ultra-Tuned Training...")
|
| 96 |
cmd = [
|
| 97 |
+
sys.executable, "-u", "train.py",
|
| 98 |
"--data_dir", "data/tokenized",
|
| 99 |
"--base_ckpt", base_ckpt,
|
| 100 |
"--output_dir", "checkpoints",
|