Downloads · 30 days
71
26% of all-time downloads
sdobson/catalan-stories-6m
catalan-stories-6m is a text generation model from sdobson. Use it when you need the model to write or continue text. The card lists the license as mit.
This is a small Llama-style language model trained on a dataset of synthetically-generated short stories in Catalan language, with a custom 512-token vocabulary.
Downloads · 30 days
71
26% of all-time downloads
All-time downloads
276
Public
Repo size
48.3 MB
Likes
0
Public
Click a slice to open those files.
.bin24.2 MB · 100%
From the Hugging Face model README
This is a small Llama-style language model trained on a dataset of synthetically-generated short stories in Catalan language, with a custom 512-token vocabulary.
Try it out here: https://huggingface.co/spaces/sdobson/catalan-stories-6m
This model uses a custom SentencePiece tokenizer trained specifically on our dataset with a vocabulary size of only 512 tokens. This makes the model:
from transformers import LlamaForCausalLM, LlamaTokenizer
import torch
# Load model and tokenizer
model = LlamaForCausalLM.from_pretrained("samdobson/catalan-stories-6m")
tokenizer = LlamaTokenizer.from_pretrained("samdobson/catalan-stories-6m")
# Generate text
prompt = "Hi havia una vegada"
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=100,
temperature=0.8,
top_k=40,
do_sample=True
)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
This model is intended for:
The model was trained on the Catalan stories dataset, which consists of short stories written in simple Catalan, generated synthetically to be suitable for language learning.
MIT License