Downloads · 30 days
0
nowefnyieryfner/gpt-10m-dpo-sharegpt
gpt-10m-dpo-sharegpt is a text generation model from nowefnyieryfner. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
A tiny 10-million parameter GPT-style model trained from scratch, fine-tuned using Supervised Fine-Tuning (SFT) on ShareGPT conversations, and aligned via Direct Preference Optimization (DPO) using preferences judged…
Downloads · 30 days
0
Access
Public
Updated Jul 11, 2026
Repo size
127 MB
Likes
0
Public
Click a slice to open those files.
.pt127 MB · 99%
From the Hugging Face model README
A tiny 10-million parameter GPT-style model trained from scratch, fine-tuned using Supervised Fine-Tuning (SFT) on ShareGPT conversations, and aligned via Direct Preference Optimization (DPO) using preferences judged by Gemini 3.1 Flash Lite.
You can use the custom PyTorch definition in model.py and tokenizer.json to load the model:
import torch
from tokenizers import Tokenizer
from model import GPT
# Load model checkpoint
checkpoint = torch.load("dpo_model.pt", map_location="cpu")
config = checkpoint["config"]
model = GPT(config)
model.load_state_dict(checkpoint["model"])
model.eval()
# Load tokenizer
tokenizer = Tokenizer.from_file("tokenizer.json")
# Generate text
prompt = "<|im_start|>user\nWrite a python function to check if a number is prime.<|im_end|>\n<|im_start|>assistant\n"
x = torch.tensor(tokenizer.encode(prompt).ids, dtype=torch.long).unsqueeze(0)
y = model.generate(x, max_new_tokens=150, temperature=0.8, top_k=50)
print(tokenizer.decode(y[0].tolist()))