Downloads · 30 days
31
6% of all-time downloads
pauhidalgoo/cucafera
cucafera is a text generation model from pauhidalgoo. 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.
This document describes cucafera (Base Model), a tiny Catalan Large Language Model (LLM) developed for experimental and educational purposes. The model has been pre-trained exclusively on Catalan text using the pauhid…
Downloads · 30 days
31
6% of all-time downloads
All-time downloads
536
Public
Parameters
245M
4.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors980 MB · 100%
From the Hugging Face model README
This document describes cucafera (Base Model), a tiny Catalan Large Language Model (LLM) developed for experimental and educational purposes. The model has been pre-trained exclusively on Catalan text using the pauhidalgoo/patufet-pretrain dataset, making it a specialized tool for a variety of Catalan NLP applications.
cucafera (Base Model) is a 244-million parameter transformer-based language model inspired by the LLAMA architecture (notably LLAMA3). Despite its relatively small size compared to many contemporary models, it is optimized for generating coherent and contextually relevant text in Catalan.
The base model was pre-trained using the patufet-pretrain dataset. This dataset consists of high-quality Catalan text curated specifically for pre-training language models, ensuring rich linguistic and cultural representation and high-quality text sources.
The model was trained using the LLAMA3-like architecture with the following setup:
Total training steps: 11,007
Batch size: 524288
Sequence Length: 2048
Learning rate: 3e-4 with 200 warmup steps and cosine decay up to 3e-5
Optimizer: AdamW
Hardware used: Single A100 80GB GPU from vast.ai
Training duration: 1.5 days
Total tokens processed: 5.5 billion
Hardware and Efficiency:
Training was executed on a single A100 80GB GPU, showcasing that effective LLM training can be achieved with accessible resources while maintaining cost efficiency.
The base model is suitable for general text generation tasks in Catalan, including but not limited to:
Note that this is the base model, so it is trained on a text completion task.
However, due to its limited size, it is not able to provide correct factual information and you must be aware of this fact when using this model.
Users may fine-tune cucafera (Base Model) for domain-specific tasks such as:
Below is an example code snippet to load and utilize cucafera (Base Model) using Hugging Face's Transformers library:
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "pauhidalgoo/cucafera"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
input_text = "Història sobre un drac i un cavaller. Hi havia una vegada"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model was developed as an experimental project, inspired by Karpathy's NanoGPT Series. My colleague Roger Baiges also trained his own CatGPT.
For more details, updates, or to contribute to the project, please visit the GitHub repository