Installation¶
This guide walks you through setting up VietQuill in your Python environment.
Prerequisites¶
- Python:
>= 3.10 - PyTorch:
>= 2.0.0(with CUDA support recommended for GPU acceleration)
Basic Installation¶
You can install VietQuill directly from PyPI using pip:
Or install in editable mode from source:
Installing Optional Documentation Dependencies¶
If you wish to build or preview this documentation locally:
Or manually:
Then preview with mkdocs serve.
Note
pymdown-extensions 12 is not yet compatible with mkdocstrings (Highlight.__init__() missing 1 required positional argument: 'md'), so it is pinned below 12.
GPU Acceleration Setup (PyTorch with CUDA)¶
VietQuill models use Seq2Seq transformers (such as ViT5) and neural estimators (vELECTRA). A CUDA-enabled GPU significantly speeds up inference.
If you have an NVIDIA GPU, install the appropriate PyTorch build according to your CUDA driver:
Verify your GPU is available:
import torch
print(f"CUDA Available: {torch.cuda.is_available()}")
if torch.cuda.is_available():
print(f"Device Name: {torch.cuda.get_device_name(0)}")
VietQuill automatically selects cuda if available, and falls back to cpu otherwise.