Downloads · 30 days
18
25% of all-time downloads
mountainrock/vadakayil-llm-tiny
vadakayil-llm-tiny is a text generation model from mountainrock. Use it when you need the model to write or continue text. The card lists the license as mit.
A medium-sized character-level LLM trained on Capt Ajit Vadakayil's writings about Mach 0.3, consciousness, and Vedic philosophy.
Downloads · 30 days
18
25% of all-time downloads
All-time downloads
72
Public
Repo size
157 MB
Likes
0
Public
Click a slice to open those files.
.pt153 MB · 100%
From the Hugging Face model README
A medium-sized character-level LLM trained on Capt Ajit Vadakayil's writings about Mach 0.3, consciousness, and Vedic philosophy.
| Parameter | Value |
|---|---|
| Architecture | Decoder-only Transformer |
| Vocabulary | Character-level (74 tokens) |
| Parameters | ~12.7M |
| d_model | 512 |
| num_layers | 6 |
| num_heads | 8 |
| d_ff | 1024 |
| max_seq_len | 512 |
| Training Data | vadakayil_combined_training.txt (~57K chars) |
| Parameter | Value |
|---|---|
| Epochs | 150 |
| Learning Rate | 3e-4 |
| Batch Size | 32 |
| Sequence Length | 256 |
| Train Split | 95% |
| Final Val Loss | 0.078 |
| Metric | Value |
|---|---|
| Initial Val Loss | 5.37 |
| Final Val Loss | 0.078 |
| Improvement | 98.5% |
from model import TinyLLM
from tokenizer import Tokenizer
import torch
# Load tokenizer
tokenizer = Tokenizer.load("tokenizer.json")
# Load model
checkpoint = torch.load("model.pt", map_location="cpu")
model = TinyLLM(
vocab_size=74,
d_model=512,
num_heads=8,
num_layers=6,
d_ff=1024,
max_seq_len=512,
dropout=0.1,
pad_token_id=0
)
model.load_state_dict(checkpoint["model_state_dict"])
model.eval()
# Generate text
prompt = "What is Mach 0.3"
input_ids = tokenizer.encode(prompt, add_special_tokens=False)
input_ids = torch.tensor([input_ids], dtype=torch.long)
output = model.generate(input_ids, max_new_tokens=150, temperature=0.8)
print(tokenizer.decode(output[0].tolist()))
MIT License
Training data: Capt Ajit Vadakayil's writings Model: Custom transformer implementation