Instructions to use proxectonos/Llama-Carvalho-PT-GL_3.6M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use proxectonos/Llama-Carvalho-PT-GL_3.6M with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Nos-PT/Llama-Carvalho-PT-GL") model = PeftModel.from_pretrained(base_model, "proxectonos/Llama-Carvalho-PT-GL_3.6M") - Transformers
How to use proxectonos/Llama-Carvalho-PT-GL_3.6M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="proxectonos/Llama-Carvalho-PT-GL_3.6M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("proxectonos/Llama-Carvalho-PT-GL_3.6M", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use proxectonos/Llama-Carvalho-PT-GL_3.6M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "proxectonos/Llama-Carvalho-PT-GL_3.6M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "proxectonos/Llama-Carvalho-PT-GL_3.6M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/proxectonos/Llama-Carvalho-PT-GL_3.6M
- SGLang
How to use proxectonos/Llama-Carvalho-PT-GL_3.6M with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "proxectonos/Llama-Carvalho-PT-GL_3.6M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "proxectonos/Llama-Carvalho-PT-GL_3.6M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "proxectonos/Llama-Carvalho-PT-GL_3.6M" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "proxectonos/Llama-Carvalho-PT-GL_3.6M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use proxectonos/Llama-Carvalho-PT-GL_3.6M with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for proxectonos/Llama-Carvalho-PT-GL_3.6M to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for proxectonos/Llama-Carvalho-PT-GL_3.6M to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for proxectonos/Llama-Carvalho-PT-GL_3.6M to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="proxectonos/Llama-Carvalho-PT-GL_3.6M", max_seq_length=2048, ) - Docker Model Runner
How to use proxectonos/Llama-Carvalho-PT-GL_3.6M with Docker Model Runner:
docker model run hf.co/proxectonos/Llama-Carvalho-PT-GL_3.6M
proxectonos/Llama-Carvalho-PT-GL_3.6M
This repository contains proxectonos/Llama-Carvalho-PT-GL_3.6M, a LoRA adapter for machine translation from English to Galician, built on top of Nos-PT/Llama-Carvalho-PT-GL.
Why this model exists
This checkpoint is the 3.6M training-size model from our data-scaling experiments on low-resource machine translation with LLM fine-tuning. It is being published because it was the best-performing model for the en-gl direction among the four training sizes we evaluated: 30k, 300k, 600k, and 3.6M parallel sentence pairs.
The motivation for releasing this model is not just to provide another translation adapter, but to document a concrete experimental result: for English-to-Galician, a more distant language pair, larger fine-tuning corpora led to better translation quality. In our experiments, the 3.6M model achieved the strongest overall results for en-gl in automatic evaluation and human assessment.
This makes the model a useful complement to the smaller Spanish-Galician checkpoints in the same study, where the optimal size was not the largest one. Together, these releases illustrate the main conclusion of the work: the best fine-tuning size depends on linguistic distance, and more data helps especially when the source language is farther from Galician.
Model details
- Base model:
Nos-PT/Llama-Carvalho-PT-GL - Model type: LoRA adapter for causal language modeling used as machine translation
- Task: Machine translation
- Direction: English -> Galician
- Languages: English, Galician
- Training method: Supervised Fine-Tuning with LoRA
- Training size: 3.6 million parallel sentence pairs
Training data
The adapter was trained on 3.6M English-Galician parallel sentence pairs.
The training data comes from the CorpusNos MT dataset and includes only human-written text. The corpus covers several text types, including:
- formal institutional language
- scientific text
- spoken-domain material
- multi-word expressions
Training setup
All experiments in the paper used the same base model and the same fine-tuning setup so that differences in quality could be attributed to data scale rather than to architecture changes.
- Base model:
Llama-Carvalho-PT-GL - Fine-tuning strategy: LoRA
- Learning rate:
5e-6 - Scheduler: cosine
- Warmup steps:
150 - Weight decay:
0.01 - Per-device train batch size:
16 - Gradient accumulation steps:
4 - Precision:
bf16
Evaluation summary
This model was evaluated in the paper against other checkpoints trained on smaller English-Galician corpora (30k, 300k, 600k).
Among the en-gl models, this 3.6M checkpoint obtained the best overall results:
- Average BLEU across 6 benchmark test sets:
39.08 - Average COMET across 6 benchmark test sets:
0.8747 - Human evaluation on 74 test-suite sentences:
47.33%correct
The 6 benchmark test sets used to compute the average BLEU and COMET values were:
gold1gold2test-suiteflorestatoebataCoN
The first 3 datasets are our own, you can find the links here. Human evaluation was carried out by 3 native Galician annotators using binary correct/incorrect judgments.
These results support the main finding for en-gl: unlike closely related pairs such as Spanish-Galician, English-Galician benefits from larger fine-tuning corpora.
Intended use
This model is intended for:
- research on English-Galician machine translation
- evaluation of data scaling in LLM fine-tuning
- practical translation workflows into Galician when using the Carvalho model family
Limitations
- This is a LoRA adapter, not a standalone merged model.
- It is specialized for English-to-Galician and Spanish-Galician translation and should not be treated as a general-purpose chat assistant.
- The model inherits the capabilities and limitations of the base model.
- As reported in the paper, translation quality depends strongly on language pair and corpus design; the best training size for
en-glshould not be assumed to be optimal for other directions.
- Downloads last month
- 31