โ„๏ธ Winterโ€‘Frost

A small language model, built entirely from scratch โ€” tokenizer, pretraining, and instructionโ€‘tuning โ€” on a single free GPU.

Parameters Architecture Tokenizer License Hardware


Winterโ€‘Frost is not built to compete with production models. It's a fromโ€‘firstโ€‘principles build: every stage of the pipeline โ€” tokenization, pretraining, instruction tuning, deployment โ€” was implemented and run from scratch on freeโ€‘tier hardware, as a handsโ€‘on way to actually understand how LLMs work under the hood.

๐Ÿ“‹ Model summary

๐Ÿง  Architecture GPTโ€‘2 (decoderโ€‘only transformer)
๐Ÿ”ข Parameters ~111M
โœ‚๏ธ Tokenizer Custom Byteโ€‘Level BPE, vocab size 32,000
๐Ÿ“ Context length 1,024 tokens
๐Ÿ“š Pretraining data ~4GB custom text corpus
๐ŸŽฏ Instruction tuning One epoch over the Alpaca dataset (~51,760 examples)
โš™๏ธ Training hardware Single freeโ€‘tier NVIDIA T4 GPU (Google Colab)
๐ŸŽ›๏ธ Precision fp16 mixed precision

๐Ÿ› ๏ธ How it was built

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  1. Tokenizer    โ”‚ โ”€โ”€โ–ถ โ”‚  2. Pretraining   โ”‚ โ”€โ”€โ–ถ โ”‚  3. Instruction    โ”‚ โ”€โ”€โ–ถ โ”‚  4. Deploy   โ”‚
โ”‚  Byteโ€‘Level BPE  โ”‚     โ”‚  Raw nextโ€‘token   โ”‚     โ”‚     tuning         โ”‚     โ”‚  Push to     โ”‚
โ”‚  trained from    โ”‚     โ”‚  prediction on    โ”‚     โ”‚  Alpaca dataset,   โ”‚     โ”‚  Hugging     โ”‚
โ”‚  scratch, 32k    โ”‚     โ”‚  ~4GB corpus      โ”‚     โ”‚  teaches Qโ†’A       โ”‚     โ”‚  Face Hub    โ”‚
โ”‚  vocab           โ”‚     โ”‚  (GPTโ€‘2, 111M)    โ”‚     โ”‚  format            โ”‚     โ”‚              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

1. Tokenizer โ€” A Byteโ€‘Level BPE tokenizer was trained from scratch on the target corpus, rather than reusing an existing model's vocabulary.

2. Pretraining (Phase 1) โ€” The tokenizer streamed-encoded the ~4GB corpus into binary token files, feeding a GPT2LMHeadModel (768 hidden size, 12 layers, 12 heads) trained on nextโ€‘token prediction. This teaches raw language patterns โ€” grammar, style, associations โ€” but not instructionโ€‘following.

3. Instruction tuning (Phase 2) โ€” The pretrained checkpoint was fineโ€‘tuned on the Alpaca instruction dataset via trl's SFTTrainer, teaching the model to respond to a prompt instead of just continuing it.

4. Deployment โ€” Final weights and tokenizer were pushed straight to the Hugging Face Hub from the training environment.

๐Ÿš€ How to use it

Quick start

pip install torch transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_dir = "brucoder/winter-frost"
tokenizer = AutoTokenizer.from_pretrained(model_dir)
model = AutoModelForCausalLM.from_pretrained(model_dir)

device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device)
model.eval()

prompt = """Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
What is a computer?

### Response:
"""

inputs = tokenizer(prompt, return_tensors="pt").to(device)
output = model.generate(
    **inputs,
    max_new_tokens=200,
    do_sample=True,
    temperature=0.7,
    top_p=0.9,
    repetition_penalty=1.15,
    pad_token_id=tokenizer.pad_token_id,
)
response = tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(response.strip())

๐Ÿ“ Prompt format

The model expects the Alpacaโ€‘style instruction template it was fineโ€‘tuned on:

Below is an instruction that describes a task. Write a response that appropriately completes the request.

### Instruction:
{your question or task here}

### Response:

Prompts that don't follow this format will still generate text, but responses tend to drift offโ€‘task.

๐ŸŽ›๏ธ Generation tips

Setting Effect
repetition_penalty 1.2โ€“1.4 Reduces looping / repeated phrases
temperature 0.5 (lower) More focused, less rambling output
do_sample=False Deterministic, greedy (mostโ€‘likelyโ€‘token) output

โš ๏ธ Limitations โ€” please read before using

This model is small, and was trained on a small amount of data relative to production LLMs. Please calibrate expectations accordingly:

  • ๐Ÿงฉ World knowledge is limited and unreliable โ€” it only knows what appeared in its ~4GB training corpus plus Alpaca's instruction patterns. It will confidently generate plausibleโ€‘sounding but incorrect information.
  • โž— Math and code are not reliable โ€” training data was not focused on arithmetic or programming.
  • ๐ŸŒ€ Topic drift โ€” on ambiguous or openโ€‘ended prompts, the model may default to whatever topics were overโ€‘represented in training, rather than staying onโ€‘topic.
  • ๐ŸŽฏ Not instructionโ€‘perfect โ€” it recognizes the instruction โ†’ response format but doesn't always answer the actual question asked.
  • ๐Ÿšซ Do not use for factual, medical, legal, financial, or safetyโ€‘critical purposes.

๐ŸŽ“ Intended use

Educational and experimental use โ€” exploring fromโ€‘scratch LLM training, tokenizer behavior, smallโ€‘model generation quality, and the practical realities of training on constrained (freeโ€‘tier) hardware.

๐Ÿ”— Related

A larger followโ€‘up model, winter-frost-1-pro (~774M parameters, broader pretraining corpus via streaming), is trained under the same fromโ€‘scratch philosophy on the same freeโ€‘tier hardware. It's meaningfully bigger and broader, but shares the same category of limitations described above.

๐Ÿ™ Acknowledgements

Built as a solo learning project using Hugging Face transformers, datasets, trl, tokenizers, and Google Colab's free GPU tier.

Made with curiosity, patience, and a lot of Colab reconnects. โ„๏ธ

Downloads last month
248
Safetensors
Model size
0.8B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support