Views
No views yet
train_run1.py (included here) with the exact launch command in RUN_COMMAND.txt.1from transformers import AutoTokenizer, LlamaForCausalLM
2import torch
3m = 'ethanker/nanomind-step-002000'
4tok = AutoTokenizer.from_pretrained(m, use_fast=True)
5model = LlamaForCausalLM.from_pretrained(m, torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32)
6model.eval().to('cuda' if torch.cuda.is_available() else 'cpu')
7
8prompt = "Once upon a time,"
9inputs = tok(prompt, return_tensors='pt').to(model.device)
10out = model.generate(**inputs, do_sample=True, top_p=0.9, temperature=0.8, max_new_tokens=128)
11print(tok.decode(out[0], skip_special_tokens=True))model.safetensors, tokenizer/config filestrain_run1.py (training code snapshot)RUN_COMMAND.txt (exact command used)