Downloads · 30 days
83
0% of all-time downloads
proxectonos/Carballo-bloom-1.3B
Carballo-bloom-1.3B is a text generation model from proxectonos. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
<details <summaryClick to expand</summary
Downloads · 30 days
83
0% of all-time downloads
All-time downloads
28.8K
Public
Parameters
1.3B
15.7 GB on disk
Likes
7
Public
Click a slice to open those files.
.safetensors2.6 GB · 100%
From the Hugging Face model README
Carballo-bloom-1.3B is a 1.3B-parameter transformer-based causal language model for Galician. It is the result of a continual pretraining of FLOR-1.3B (developed by AINA Project and based in BLOOM-1.7B) with the galician corpus CorpusNos.
The Carballo-bloom-1.3B model is ready-to-use only for causal language modeling. It can perform text-generation tasks and be fine-tuned for specific scenarios.
import torch
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
input_text = "Hoxe fai un bo día. O sol "
model_id = "proxectonos/Carballo-bloom-1.3B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
generator = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
torch_dtype=torch.bfloat16,
trust_remote_code=True,
device_map="auto",
)
generation = generator(
input_text,
do_sample=True,
top_k=10,
eos_token_id=tokenizer.eos_token_id
)
print(f"Result: {generation[0]['generated_text']}")
It was trained using HuggingFace Transformers and Pytorch, using the Causal Modeling Language script
The language adaptation technique used to train Carballo-bloom-1.3B is based in the used to train FLOR-1.3B, which is explained by their authors in this Medium Post. In summary, we proceeded as follows:
CorpusNÓS is a massive Galician corpus made up of 2.1B words primarily devised for training large language models. The corpus sources are varied and represent a relatively wide range of genres.
The corpus is structured as follows:
| Subcorpus | Genre | Nº tokens | Nº documents |
|---|---|---|---|
| Data obtained via transfer agreement | Books | 7,255,784 | 104 |
| Research articles | 2,665,351 | 664 | |
| Press | 124,253,084 | 224,419 | |
| Governmental | 245,897,880 | 654,505 | |
| Web contents | 15,946,686 | 44,165 | |
| Encyclopedic | 4,799,214 | 47,396 | |
| Subtotal | 400,817,999 | 971,253 |
| Subcorpus | Genre | Nº tokens | Nº documents |
|---|---|---|---|
| Public data | Press and blogs | 153,497,883 | 665,265 |
| Encyclopedic | 57,164,848 | 184,628 | |
| Web crawls | 1,384,015,664 | 3,366,449 | |
| Translation corpora | 133,726,004 | 4,745,799 | |
| Subtotal | 1,728,404,399 | 8,777,514 | |
| Total | 2,129,222,398 | 9,748,767 | |
| Download (Zenodo) | https://zenodo.org/records/10687642 |
The traininf was conducted in the Galicia Supercomputing Center (CESGA), using 1 node with 5 GPUs NVIDIA A100.
| Model | Belebele | CoLA | OpenBookQA | Parafrases-gl | PAWS-X |
|---|---|---|---|---|---|
| Carballo-Bloom | 0.231±0.014 | 0.499±0.012 | 0.364±0.022 | 0.523±0.031 | 0.541±0.011 |
| Carballo-Cerebras | 0.271±0.015 | 0.502±0.012 | 0.368±0.022 | 0.496±0.031 | 0.531±0.011 |
| Bloom-1b1 | 0.234±0.014 | 0.507±0.012 | 0.338±0.021 | 0.485±0.031 | 0.508±0.011 |
| Bloom-1b7 | 0.218±0.014 | 0.500±0.012 | 0.338±0.021 | 0.539±0.031 | 0.539±0.011 |
| mGPT | 0.229±0.014 | 0.494±0.012 | 0.332±0.021 | 0.423±0.031 | 0.517±0.011 |
| Flor-1.3B | 0.220±0.014 | 0.504±0.012 | 0.342±0.021 | 0.516±0.031 | 0.536±0.011 |
| Cerebras-1.3B | 0.221±0.014 | 0.497±0.012 | 0.300±0.021 | 0.492±0.031 | 0.531±0.011 |
For further information, please send an email to [email protected]
This model was development within the Nós Project, funded by the Ministerio para la Transformación Digital y de la Función Pública - Funded by EU – NextGenerationEU within the framework of the project ILENIA with reference 2022/TL22/00215336.
if you use this model, please cite this article:
Gamallo, Pablo, Pablo Rodríguez Fernández, Iria de Dios Flores, Susana Sotelo, Silvia Paniagua, José Ramom Pichel, Daniel Bardanca, Marcos Garcia (2024) "Open Generative Large Language Models for Galician", Procesamiento del Lenguaje Natural, 73, pp. 259-270. ISSN: 1135-5948.