import torchfrom transformers import AutoModelForCausalLM, AutoTokenizer repo = "LocalWisdom/Penny-Alpha"tok = AutoTokenizer.from_pretrained(repo)model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype=torch.float32).eval() # Training documents were separated by EOS, so start the prompt with it.prompt = tok.eos_token + "The history of the bicycle begins"inputs = tok(prompt, add_special_tokens=False, return_tensors="pt") with torch.no_grad(): out = model.generate( **inputs, max_new_tokens=200, do_sample=True, temperature=0.8, top_k=50, top_p=0.95, repetition_penalty=1.1, use_cache=False, # required: this implementation has no KV cache )print(tok.decode(out[0], skip_special_tokens=True))