from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("khazarai/Personal-Finance-R2")model = AutoModelForCausalLM.from_pretrained( "khazarai/Personal-Finance-R2", device_map={"": 0}) question = """ I just got accepted into Flatiron's full-time software engineering bootcamp, but I have basically no savings and the $19k price tag is freaking me out.I really love coding and want to break into tech, but I'm looking at taking out a loan through Climb or Ascent with around 6.5% interest—that'd mean paying like $600 a month after.Is this a smart move? I'm torn between chasing this opportunity and being terrified of the debt. Any advice?""" messages = [ {"role" : "user", "content" : question}]text = tokenizer.apply_chat_template( messages, tokenize = False, add_generation_prompt = True, enable_thinking = True, ) from transformers import TextStreamer_ = model.generate( **tokenizer(text, return_tensors = "pt").to("cuda"), max_new_tokens = 3000, temperature = 0.6, top_p = 0.95, top_k = 20, streamer = TextStreamer(tokenizer, skip_prompt = True),)