Downloads · 30 days
8
40% of all-time downloads
RichardErkhov/proxectonos_-_Llama-3.1-Carballo-8bits
proxectonos_-_Llama-3.1-Carballo-8bits is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
8
40% of all-time downloads
All-time downloads
20
Public
Parameters
8B
9.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors9.1 GB · 100%
How the weights are stored.
I87B · 87%
From the Hugging Face model README
Quantization made by Richard Erkhov.
Llama-3.1-Carballo - bnb 8bits
language:
Llama-3.1-Carballo is a 8B-parameter transformer-based causal language model for Galician, Portuguese, Spanish, Catalan and English. It is the result of a continual pretraining of meta-llama/Llama-3.1-8B with a multilingual corpus of almost 20B tokens, with an emphasis on Galician texts.
This model is part of the Carballo familily, a family of LLMs specialized in Galician. Smaller models can be found here
The Llama-3.1-Carballo 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/Llama-3.1-Carballo"
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. We also use DeepSpeed to deal with the huge size of the model.
The training corpus consists of texts in 5 languages, with an emphasis on Galician. The main aim of this is to ensure that the model learns to work with this language perfectly, while maintaining knowledge of languages already known (Spanish, English), learning others (Catalan) or adapting existing language varieties (Portuguese-PT instead of Portuguese-BR).
The corpus is structured as follows:
| Nº Tokens | Main Source | |
|---|---|---|
| Galician | 5B | CorpusNós |
| Portuguese | 3B | Various |
| Spanish | 3.5B | Various |
| English | 3.4B | Various |
| Catalan | 3.6B | CATalog |
The training was conducted in the Galicia Supercomputing Center (CESGA), using 5 nodes with 2 GPUs NVIDIA A100 each one.
In process...
For further information, please send an email to [email protected]
MIT License
Copyright (c) 2024 Proxecto Nós
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This research was funded by “The Nós project: Galician in the society and economy of Artificial Intelligence”, resulting from the agreement 2021-CP080 between the Xunta de Galicia and the University of Santiago de Compostela, and thanks to the Investigo program, within the National Recovery, Transformation and Resilience Plan, within the framework of the European Recovery Fund (NextGenerationEU).