Rustamshry commited on
Commit
75149df
·
verified ·
1 Parent(s): b4a70d6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +29 -0
README.md CHANGED
@@ -111,6 +111,35 @@ _ = model.generate(
111
  streamer = TextStreamer(tokenizer, skip_prompt = True),
112
  )
113
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
115
  ## Training Details
116
 
 
111
  streamer = TextStreamer(tokenizer, skip_prompt = True),
112
  )
113
  ```
114
+ **For pipeline:**
115
+
116
+ ```python
117
+ from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
118
+ from peft import PeftModel
119
+
120
+ tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen3-1.7B")
121
+ base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3-1.7B")
122
+ model = PeftModel.from_pretrained(base_model, "khazarai/Personal-Finance-R1")
123
+
124
+ question =
125
+ """
126
+ $19k for a coding bootcamp
127
+
128
+ Hi!
129
+
130
+ I was just accepted into the full-time software engineering program with Flatiron and have approx. $0 to my name.
131
+ I know I can get a loan with either Climb or accent with around 6.50% interest, is this a good option?
132
+ I would theoretically be paying near $600/month.
133
+
134
+ I really enjoy coding and would love to start a career in tech but the potential $19k price tag is pretty scary. Any advice?
135
+ """
136
+
137
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
138
+ messages = [
139
+ {"role": "user", "content": question}
140
+ ]
141
+ pipe(messages)
142
+ ```
143
 
144
  ## Training Details
145