CoT
Collection
Chain of Thought • 8 items • Updated • 1
This model is fine-tuned for instruction-following in the domain of personal finance, with a focus on:
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("khazarai/Personal-Finance-R1")
model = AutoModelForCausalLM.from_pretrained(
"khazarai/Personal-Finance-R1",
device_map={"": 0}
)
question ="""
$19k for a coding bootcamp
Hi!
I was just accepted into the full-time software engineering program with Flatiron and have approx. $0 to my name.
I know I can get a loan with either Climb or accent with around 6.50% interest, is this a good option?
I would theoretically be paying near $600/month.
I really enjoy coding and would love to start a career in tech but the potential $19k price tag is pretty scary. 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 = 2048,
temperature = 0.6,
top_p = 0.95,
top_k = 20,
streamer = TextStreamer(tokenizer, skip_prompt = True),
)
Dataset Overview: PersonalFinance_v2 is a collection of high-quality instruction-response pairs focused on personal finance topics. It covers a wide range of subjects including budgeting, saving, investing, credit management, retirement planning, insurance, and financial literacy.
Data Format: The dataset consists of conversational-style prompts paired with detailed and well-structured responses. It is formatted to enable instruction-following language models to understand and generate coherent financial advice and reasoning.