Rustamshry commited on
Commit
3591c04
·
verified ·
1 Parent(s): 07c9e1d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -0
README.md CHANGED
@@ -90,6 +90,29 @@ _ = model.generate(
90
  streamer = TextStreamer(tokenizer, skip_prompt = True),
91
  )
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  ```
94
 
95
  ### Framework versions
 
90
  streamer = TextStreamer(tokenizer, skip_prompt = True),
91
  )
92
 
93
+ ```
94
+ **For pipeline:**
95
+
96
+ ```python
97
+ from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
98
+ from peft import PeftModel
99
+
100
+ tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen3-0.6B")
101
+ base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen3-0.6B")
102
+ model = PeftModel.from_pretrained(base_model, "khazarai/Chemistry-R1")
103
+
104
+
105
+ question="""
106
+ A bowl contains 10 jellybeans (four red, one blue and five white). If you pick three jellybeans from the bowl at random and without replacement,
107
+ what is the probability that exactly two will be red? Express your answer as a common fraction?
108
+ """
109
+
110
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
111
+ messages = [
112
+ {"role": "user", "content": question}
113
+ ]
114
+ pipe(messages)
115
+
116
  ```
117
 
118
  ### Framework versions