SAVRN
Search Contact SAVRN

Open-weight model · Text generation

vinayslm-tiny

by Vinay Poduri vinaypoduri/vinayslm-tiny

VinaySLM is a small language model (SLM) built from scratch in PyTorch to learn how decoder-only Transformers work end to end -- tokenization, embeddings, causal self-attention, training, and generation -- without importing a pretrained architecture.

Parameters466,176
Context
Weights1.9 MB
Licensemit
AccessOpen weights
Monthly Downloads

Runs On

What it takes to serve vinayslm-tiny (466,176 parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.0 GB 0.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Vinay Poduri, published under mit, revision ef7571ae298c.

VinaySLM is a small language model (SLM) built from scratch in PyTorch to learn how decoder-only Transformers work end to end -- tokenization, embeddings, causal self-attention, training, and generation -- without importing a pretrained architecture. This is not a production-quality language model. - A tiny, hand-written, decoder-only (GPT-style) Transformer. - 466,176 parameters. - Trained on a ~600-token toy corpus of AI/programming sentences. - Packaged here as a custom Hugging Face model (trustremotecode=True) so it can be loaded and inspected through the transformers ecosystem, while the actual Transformer implementation (modelingvinayslm.py) is a thin wrapper around this project's…

Read Vinay Poduri's full model card

VinaySLM is a small language model (SLM) built from scratch in PyTorch to learn how decoder-only Transformers work end to end -- tokenization, embeddings, causal self-attention, training, and generation -- without importing a pretrained architecture. This is not a production-quality language model.

What this is

  • A tiny, hand-written, decoder-only (GPT-style) Transformer.
  • 466,176 parameters.
  • Trained on a ~600-token toy corpus of AI/programming sentences.
  • Packaged here as a custom Hugging Face model (trust_remote_code=True) so it can be loaded and inspected through the transformers ecosystem, while the actual Transformer implementation (modeling_vinayslm.py) is a thin wrapper around this project's own, unmodified model code.

Architecture

Type Decoder-only Transformer (GPT-style, pre-LayerNorm)
Parameters 466,176
Vocabulary size 255
Context length 32
Embedding dimension 128
Transformer layers 2
Attention heads 4
Feed-forward dimension 512
Dropout 0.0
Positional encoding Learned absolute positional embeddings
LM head Untied from the token embedding
Decoding Greedy (argmax) only -- no sampling yet

Tokenizer

A minimal, from-scratch word-level tokenizer (VinaySLMTokenizer, wrapping this project's WordTokenizer): text is lowercased and split into words and punctuation with a regex; the vocabulary was built directly from the training corpus. <pad>, <unk>, <bos>, <eos> are the only special tokens. This is not a BPE or pretrained tokenizer.

Training data

A tiny, hand-written corpus of AI/programming sentences (see this project's data/raw/toy_corpus.txt) -- a few hundred tokens total.

Important limitation

The model heavily overfits this tiny toy corpus. It was trained to memorize a few dozen short sentences, not to generalize. Prompts close to a training sentence will often reproduce that sentence verbatim; novel prompts will produce low-quality or repetitive continuations. This model exists to demonstrate a correct, from-scratch Transformer pipeline, not to produce useful or general text.

Example

Prompt:  "Machine learning"
Output:  "machine learning allows computers to learn patterns from data."

How to load

This repository ships its own model/config/tokenizer code (see configuration_vinayslm.py, modeling_vinayslm.py, tokenization_vinayslm.py), so loading it requires trust_remote_code=True and the vinayslm Python package installed (the custom code imports this project's own TinyGPT/WordTokenizer classes rather than duplicating them -- see "Limitations" in this project's README):

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("vinaypoduri/vinayslm-tiny", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("vinaypoduri/vinayslm-tiny", trust_remote_code=True)

Or, equivalently, import the classes directly:

from vinayslm.hf import VinaySLMForCausalLM, VinaySLMTokenizer, generate_greedy

model = VinaySLMForCausalLM.from_pretrained("vinaypoduri/vinayslm-tiny")
tokenizer = VinaySLMTokenizer.from_pretrained("vinaypoduri/vinayslm-tiny")
print(generate_greedy(model, tokenizer, "Machine learning", max_new_tokens=15))

How to reproduce this export

From the VinaySLM project root, with its .venv active:

python scripts/prepare_data.py
python scripts/train.py
python scripts/export_hf.py

scripts/export_hf.py loads the trained artifact from checkpoints/tiny/, wraps it in the Hugging Face-compatible classes, verifies it produces identical greedy output to the original local model, and writes this directory. Nothing is uploaded to the Hugging Face Hub by this script.

Configuration

Architecture
VinaySLMForCausalLM
Vocabulary size
255
Model type
vinayslm

Identity and Version

Repository
vinaypoduri/vinayslm-tiny
Publisher
Vinay Poduri
Task
Text generation
Modality
Text
Library
Not stated by the source
Parameters
466,176 parameters
Languages
Not stated by the source
Revision
ef7571ae298cc4bcdf6fc46a0d94821b270f1fbd
First published
2026-09-18
Last updated
2026-09-18

Files and Weights

9 files, 1.9 MB in total. The weights are 1 file totalling 1.9 MB in safetensors.

Weights1 file · 1.9 MB
Configuration4 files · 10.6 KB
Tokenizer2 files · 5.7 KB
Documentation1 file · 4.1 KB
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights1.9 MB d680a7c2688a
config.jsonConfiguration549 B
configuration_vinayslm.pyConfiguration2.6 KB
modeling_vinayslm.pyConfiguration4.3 KB
tokenization_vinayslm.pyConfiguration3.2 KB
README.mdDocumentation4.1 KB
.gitattributesRepository1.5 KB
tokenizer_config.jsonTokenizer1.1 KB
vocab.jsonTokenizer4.6 KB

License and Download

License
mit
Access
Open weights, no gate
Download size
1.9 MB
Download from Vinay Poduri

Released by Vinay Poduri through its official repository on Hugging Face. Read the license.

Memory Requirements

PrecisionWeights in memory
As published1.9 MB
16-bit0.0 GB
8-bit0.0 GB
4-bit0.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About vinayslm-tiny

How much GPU memory does vinayslm-tiny need?

About 0 GB at 16-bit and 0 GB at 4-bit: the weights (466,176 parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run vinayslm-tiny on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use vinayslm-tiny commercially?

Yes. vinayslm-tiny is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

Similar Models

Model · Text generation

Ornith-1.0-35B

Ornith

Aloha! Today, we are releasing Ornith-1.0, a self-improving family of open-source models for agentic coding. This model card documents Ornith-1.0-35B, the lightweight member of the Ornith family, designed for efficient single-GPU deployment. The two recipes below stand up an OpenAI-compatible server on a single 8×80GB GPU node (tensor-parallel 8). Adjust --tensor-parallel-size / --tp to the number of GPUs you have. For a quick local test (or to script offline generation), load the model directly with Transformers. Make sure you have a recent release installed — see the Transformers installation guide; Ornith-1.0-35B requires transformers >= 5.8.1. To split the reasoning trace from the final…

Open weights mit 664,944 parameters 262,144 tokens transformers

Fine-tune Qwen3 (14B) for free using our Google Colab notebook! - Read our Blog about Qwen3 support: unsloth.ai/blog/qwen3 - View the rest of our notebooks in our docs here. Qwen3-Coder is available in multiple sizes. Today, we're excited to introduce Qwen3-Coder-30B-A3B-Instruct. This streamlined model maintains impressive performance and efficiency, featuring the following key enhancements: - Significant Performance among open models on Agentic Coding, Agentic Browser-Use, and other foundational coding tasks. - Long-context Capabilities with native support for 256K tokens, extendable up to 1M tokens using Yarn, optimized for repository-scale understanding. - Agentic Coding supporting for…

Open weights apache-2.0 transformers

Model · Text generation

opt-125m

AI at Meta

OPT was first introduced in Open Pre-trained Transformer Language Models and first released in metaseq's repository on May 3rd 2022 by Meta AI. Disclaimer: The team releasing OPT wrote an official model card, which is available in Appendix D of the paper. Content from this model card has been written by the Hugging Face team. To quote the first two paragraphs of the official paper OPT was predominantly pretrained with English text, but a small amount of non-English data is still present within the training corpus via CommonCrawl. The model was pretrained using a causal language modeling (CLM) objective. OPT belongs to the same family of decoder-only models like GPT-3. As such, it was…

Open weights other 2,048 tokens transformers

Model · Text generation

Ornith-1.5-9B-GGUF

Ornith

Chirp Chirp! We are introducing Ornith-1.5, a major step toward building foundation models through end-to-end self-improvement. Ornith-1.5 extends Ornith-1.0 (which was developed on top of Qwen3.5 and Gemma4 with additional continued pretraining, mid-training, and post-training) by expanding the self-improvement loop from scaffold and rollout optimization to jointly optimizing task generation, scaffold construction, and solution rollouts. Rather than relying on a fixed set of human-curated tasks and manually designed harnesses, Ornith-1.5 continuously generates new training tasks, discovers effective strategies for solving them, and improves the policy through reinforcement learning. For…

Open weights mit transformers

Model · Text generation

Ornith-1.5-35B-A3B-GGUF

Ornith

Chirp Chirp! We are introducing Ornith-1.5, a major step toward building foundation models through end-to-end self-improvement. Ornith-1.5 extends Ornith-1.0 (which was developed on top of Qwen3.5 and Gemma4 with additional continued pretraining, mid-training, and post-training) by expanding the self-improvement loop from scaffold and rollout optimization to jointly optimizing task generation, scaffold construction, and solution rollouts. Rather than relying on a fixed set of human-curated tasks and manually designed harnesses, Ornith-1.5 continuously generates new training tasks, discovers effective strategies for solving them, and improves the policy through reinforcement learning. For…

Open weights mit transformers

Model · Text generation

Ornith-1.0-9B-GGUF

Ornith

Aloha! Today, we are releasing Ornith-1.0, a self-improving family of open-source models for agentic coding. This model card documents Ornith-1.0-9B, the most lightweight member of the Ornith family, designed for efficient single-GPU deployment. Ornith-1.0-9B is a dense ~9B model (≈19 GB in bf16), so it serves comfortably on a single 80GB GPU. The recipes below stand up an OpenAI-compatible server; add --tensor-parallel-size / --tp if you want to shard across more GPUs. For a quick local test (or to script offline generation), load the model directly with Transformers. Make sure you have a recent release installed — see the Transformers installation guide; Ornith-1.0-9B requires…

Open weights mit transformers