Downloads · 30 days
64
9% of all-time downloads
linkanjarad/Gouda-50M-SFT
Gouda-50M-SFT is a machine learning model from linkanjarad. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
<h1 align="center" style="color: gold" Gouda-50M-SFT </h1
Downloads · 30 days
64
9% of all-time downloads
All-time downloads
706
Public
Parameters
54.2M
436 MB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors217 MB · 66%
From the Hugging Face model README
I've always wanted to train a large language model from scratch. Most tutorials and walkthroughs start with the original transformer paper from 2017, "Attenttion is All You Need". However, I wanted to learn the newer advancements in LLMs, such as Grouped Query Attention, SwiGLU, RoPE, and Tied Embeddings. And that is what I did! I coded the model architecture from scratch in raw Pytorch (no Huggingface), and came up with a model which I named Gouda. Gouda-50M-SFT is a Llama-style transformer trained from scratch on only 1 billion training tokens (spanning books, wikipedia, github, and reddit) and 1 billion SFT tokens.
Gouda-50M-SFT is a 50 million parameter decoder-only language model trained from scratch using a Llama-style architecture. The model adopts modern architectural components including Grouped Query Attention (GQA), Rotary Position Embeddings (RoPE), SwiGLU feed-forward layers, RMSNorm, and tied input/output embeddings with a 1k context length.
The model is designed as an efficient small-scale research model suitable for experimentation, educational purposes, lightweight inference, and studying scaling behavior in modern language models.
Gouda-50M-SFT follows a modern Llama-style decoder architecture:
Each transformer block consists of:
The architecture is intentionally lightweight while retaining many of the design choices used in contemporary large language models.
| Pretrain | SFT |
|---|---|
| openbmb/Ultra-FineWeb | HuggingFaceH4/no_robots |
| thomwolf/github-dataset | mlabonne/ultrachat_200k_sft |
| applied-ai-018/pretraining_v1-omega_books | nvidia/Nemotron-SFT-Instruction-Following-Chat-v2 |
| wikimedia/wikipedia | |
| tensorshield/reddit_dataset_157 |
As a 50M parameter language model, Gouda-50M-SFT has limited reasoning ability, factual knowledge, and long-context capabilities compared to larger models. Outputs may contain inaccuracies, hallucinations, or incomplete information.
Performance varies substantially depending on prompt format and task complexity.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("linkanjarad/Gouda-50M-SFT")
model = AutoModelForCausalLM.from_pretrained("linkanjarad/Gouda-50M-SFT")
user_input = "What is Artificial Intelligence?"
prompt = f"<|turn>user\n{user_input}\n<turn|>\n<|turn>model\n"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=512,
do_sample=True,
top_k=64,
top_p=0.9,
temperature=0.7
)
print(tokenizer.decode(outputs[0]))