Downloads · 30 days
198
57% of all-time downloads
nanochat-students/rl-d20
rl-d20 is a machine learning model from nanochat-students. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This is the RL trained checkpoint from Andrej Karpathy's fullstack llm project to build an LLM, nanochat.
Downloads · 30 days
198
57% of all-time downloads
All-time downloads
347
Public
Repo size
20.8 GB
Likes
0
Public
Click a slice to open those files.
.pt18.7 GB · 90%
From the Hugging Face model README
This is the RL trained checkpoint from Andrej Karpathy's fullstack llm project to build an LLM, nanochat.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "nanochat-students/rl-d20"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True).to(device)
model.eval()
conversation = [
{"role": "user", "content": "Hello, who are you?"},
]
rendered = tokenizer.apply_chat_template(
conversation,
tokenize=False,
add_generation_prompt=True,
)
model_inputs = tokenizer([rendered], return_tensors="pt").to(model.device)
generated = model.generate(**model_inputs, max_new_tokens=256)
output_ids = generated[0, model_inputs.input_ids.shape[1]:]
print(tokenizer.decode(output_ids, skip_special_tokens=True))
timestamp: 2025-10-15 12:59:52
timestamp: 2025-10-15 13:04:39
Logs from training can be found here: https://huggingface.co/spaces/nanochat-students/trackio