Practical overview
When it fits
Use it when building a chat model for a language beyond English and you need scripts for preparing translated training data as well as fine-tuning and inference.
Who it is for
- Developers preparing language-specific chat models from instruction or question-and-answer datasets.
- Practitioners who want a scripted workflow spanning dataset translation, model fine-tuning and inference.
Documented uses
- Translate an instruction dataset into a target language and combine translation checkpoints.
- Fine-tune a supported model using QLoRA and PEFT.
- Optionally apply DPO or ORPO preference tuning where the dataset supports it.
- Run inference with a tuned model.
Requirements & limits
The repository is public and identified as open source under the Apache-2.0 license.
- The documented training method uses QLoRA and PEFT.
- Translation options include OPUS, M2M, MADLAD, mBART, NLLB, Seamless and Tower Instruct.
- OASST1 and OASST2 are listed as tested base datasets.
- The README reports roughly 36 hours of translation per language and notes limits for inference on a free Colab T4.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare a translated training dataset
Translate an instruction dataset and combine its checkpoints into a dataset for fine-tuning.
Before you start
- A working Python environment with PyTorch installed; CUDA is preferred.
- The repository cloned and its requirements installed.
- A base dataset with question-and-answer or instruction pairs and a target language code supported by the selected translation model.
Steps
Install the repository requirements with the command below.
pip install -r requirements.txtRun
translate.pywith a supported translation model, target language code and checkpoint location.Run
combine_checkpoints.pywith the checkpoint input folder and dataset output location.
Expected outcome
A combined dataset prepared from translated checkpoint files.
Guide limitations
- Translation can take about 36 hours per language according to the project, and may need to be split into multiple runs on a free Colab T4.
- Tower Instruct is listed as supporting ten target languages; translation model language codes must be used.
- The project does not describe this preparation stage as completing fine-tuning.
Fine-tune a model and run inference
Use the repository’s documented commands to fine-tune a model on a prepared dataset and run inference.
Before you start
- A prepared dataset and a supported foundation model.
- A working PyTorch environment; CUDA is preferred.
- The repository requirements installed.
Steps
Run
finetune.pywith the tuned model, dataset name and instruction prompt.Optionally run
finetune_dpo.pywith those arguments if the base dataset contains preferred and rejected answers.Run
run_inference.pywith a model name, instruction prompt and input.
Expected outcome
A documented path from a fine-tuning command to inference with a model.
Guide limitations
- DPO requires preference data with preferred and rejected answers; ORPO is listed as an alternative.
- On a free Colab T4, the README notes that inference requires short context windows and a batch size of at most two.
Compare options for Model inference and serving
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| Llama2Lang | Translate an instruction dataset into a target language and combine translation checkpoints. | The repository is public and identified as open source under the Apache-2.0 license. | |
| Ergo | Create a project with separate data-preparation, model and training scripts. | CLI | |
| Go Tflite | Load a TensorFlow Lite model from a Go program. | Linux, macOS, Windows |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 20 November 2026
- Original website title
- SensAI-PT/LLaMa2lang · Official homepage title · retained in its source language

