Downloads · 30 days
23
1% of all-time downloads
Welmia/welmia-2.0-103m-instruct
welmia-2.0-103m-instruct is a text generation model from Welmia. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
A 103M-parameter GPT-style language model (RoPE, RMSNorm, SwiGLU, tied embeddings), pretrained from scratch on ~5B tokens (OpenWebText), then instruction-tuned on the Alpaca dataset.
Downloads · 30 days
23
1% of all-time downloads
All-time downloads
1.6K
Public
Parameters
122M
1.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors487 MB · 100%
From the Hugging Face model README
A 103M-parameter GPT-style language model (RoPE, RMSNorm, SwiGLU, tied embeddings), pretrained from scratch on ~5B tokens (OpenWebText), then instruction-tuned on the Alpaca dataset.
Base (non-instruct) version: Welmia/welmia-2.0-103m-base.
| Parameter | Value |
|---|---|
| Parameters | 103.4M |
| Layers | 12 |
| Attention Heads | 12 |
| Embedding Dim | 768 |
| Context Length | 512 |
| Vocab Size | 24,000 |
| Normalization | RMSNorm |
| Activation | SwiGLU |
| Positional Enc. | RoPE |
| Weight Tying | Yes |
Tokenizer note: custom 24k-vocab BPE tokenizer, not GPT-2/tiktoken. Not interchangeable
with welmia-1.0-81m.
This model expects the Alpaca instruction format:
{your instruction}
or, with additional context:
{your instruction}
{context}
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained("Welmia/welmia-2.0-103m-instruct", trust_remote_code=True)
tok = AutoTokenizer.from_pretrained("Welmia/welmia-2.0-103m-instruct")
prompt = "### Instruction:\nWhat is Machine Learning.\n\n### Response:\n"
ids = tok(prompt, return_tensors="pt").input_ids
out = model.generate(ids, max_new_tokens=150, do_sample=True, temperature=0.7, top_k=40)
print(tok.decode(out[0], skip_special_tokens=True))
trust_remote_code=True is required — custom architecture defined in modeling_gpt.py in this repo.
generate() recomputes the full forward pass each step.Pretrained from scratch on ~5B tokens OpenWebText (causal LM), then fine-tuned on the Alpaca instruction dataset (~52k examples, 3 epochs, AdamW, cosine LR, loss masked over the prompt so only the response is trained on).
Apache License 2.0