Downloads · 30 days
0
vansh-myth/kaito
kaito is a text generation model from vansh-myth. Use it when you need the model to write or continue text. The card lists the license as mit.
A GPT-2 style decoder-only transformer with modern architectural enhancements, built from scratch in PyTorch. The model features two variants: a 114M parameter dense model and an optional 510M parameter Mixture of Exp…
Downloads · 30 days
0
Access
Public
Updated Jun 21, 2026
Repo size
2.8 GB
Likes
1
Public
Click a slice to open those files.
.pt2.1 GB · 100%
From the Hugging Face model README
A GPT-2 style decoder-only transformer with modern architectural enhancements, built from scratch in PyTorch. The model features two variants: a 114M parameter dense model and an optional 510M parameter Mixture of Experts (MoE) variant, both capable of efficient training and generation.
en)The Kaito model incorporates several advancements over the original GPT-2:
This model is intended for educational purposes, architecture experimentation, and text generation tasks. It demonstrates how modern LLM optimizations can be integrated into a foundational scale model.
bfloat16 autocast on CUDA/TPU).You can load and use the model with the source code provided in the repository.
from main import kaitomodel
import torch
from text_generation import generate_text
import tiktoken
# Initialize tokenizer and model
tokenizer = tiktoken.get_encoding("gpt2")
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = kaitomodel().to(device)
# Load weights if available
# model.load_state_dict(torch.load("model.pt", map_location=device))
model.eval()
# Generate text
result = generate_text(
model=model,
idx="In the beginning",
tokenizer=tokenizer,
new_max_length=100,
temperature=0.8,
top_k=50,
top_p=0.9,
)
print(result)
If you use this model or its architectural implementations in your work, please refer to the corresponding techniques: