Downloads · 30 days
0
0% of all-time downloads
VijayShinde1996/VRS-Foundation-LLM
VRS-Foundation-LLM is a text generation model from VijayShinde1996. Use it when you need the model to write or continue text. It is set up for pytorch. The card lists the license as mit.
A ~28M-parameter, Qwen3-style decoder-only language model trained entirely from scratch on a single 8 GB laptop GPU, plus its fine-tuned variants. Small, fully open, and designed so you can actually understand and run…
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
49
Public
Repo size
—
Likes
1
Public
Click a slice to open those files.
.json554 KB · 97%
From the Hugging Face model README
A ~28M-parameter, Qwen3-style decoder-only language model trained entirely from scratch on a single 8 GB laptop GPU, plus its fine-tuned variants. Small, fully open, and designed so you can actually understand and run every piece.
📚 Full 14-chapter book + training code: GitHub →
VijayShinde1996/VRS-Foundation-LLM🧪 Live demo: https://vrsaifoundation.pythonanywhere.com/
| File | What it is |
|---|---|
best.safetensors | Base model (from-scratch pre-training) |
sft_best.safetensors | Instruction-tuned (SFT) — cue story |
dpo_best.safetensors | Preference-aligned (DPO) — cue story |
qna_best.safetensors | Conversation expert — cue reply |
ds_best.safetensors | Data-science expert — cue answer |
config.json | Model architecture config |
tokenizer.json | Custom byte-level BPE tokenizer (vocab 8,192) |
meta.json | eos id + dataset info |
modeling_vrs.py | The model definition (one self-contained file) |
inference.py | Ready-to-run generation script |
Decoder-only transformer: GQA · RoPE · RMSNorm · SwiGLU · weight-tied embeddings · KV-cache.
| Parameters | ~28M |
| d_model / layers / heads | 512 / 8 / 8 (4 KV heads) |
| Context | 512 tokens · Vocab 8,192 |
# 1) download this repo
pip install -U huggingface_hub
huggingface-cli download VijayShinde1996/VRS-Foundation-LLM --local-dir VRS-Foundation-LLM
cd VRS-Foundation-LLM
# 2) install the 3 tiny deps
pip install -r requirements.txt
# 3) generate!
python inference.py --weights sft_best.safetensors --prompt "write a short story about a robot" --cue story
python inference.py --weights ds_best.safetensors --prompt "what is overfitting" --cue answer
python inference.py --weights qna_best.safetensors --prompt "hello, who are you" --cue reply
python inference.py --weights best.safetensors --prompt "once upon a time" # base: raw continuation
import json, torch
from huggingface_hub import snapshot_download
from safetensors.torch import load_model
from tokenizers import Tokenizer
d = snapshot_download("VijayShinde1996/VRS-Foundation-LLM")
import sys; sys.path.insert(0, d)
from modeling_vrs import GPT, ModelConfig
cfg = ModelConfig(**json.load(open(f"{d}/config.json")))
model = GPT(cfg); load_model(model, f"{d}/sft_best.safetensors"); model.eval()
tok = Tokenizer.from_file(f"{d}/tokenizer.json")
eos = json.load(open(f"{d}/meta.json"))["eos_id"]
ids = tok.encode("instruction: write a short story about a dragon\nstory:").ids
out = model.generate(torch.tensor([ids]), max_new_tokens=160, temperature=0.7,
top_k=50, repetition_penalty=1.3, eos_id=eos)
print(tok.decode(out[0][len(ids):].tolist()))
instruction: <your text>\n<cue>: where cue is story (SFT/DPO), reply (QnA), or
answer (data-science). The base model (best) takes raw text and just continues it.
This is a tiny model on a toy dataset. It writes simple, children's-story-style English, has no real-world knowledge, will hallucinate, and must not be used for factual or production decisions. It exists to teach how LLMs are built. For real use: RAG or fine-tune a larger open base (both shown in the GitHub book).
MIT.
@misc{shinde2026vrsllm,
title = {VRS Foundation LLM: Create LLMs From Scratch},
author = {Vijay Shinde},
year = {2026},
howpublished = {\url{https://huggingface.co/VijayShinde1996/VRS-Foundation-LLM}}
}
Vijay Shinde — Senior Data Scientist, John Deere India Pvt Ltd · Portfolio · LinkedIn · 📧 [email protected]