Rustamshry commited on
Commit
9a60cc0
·
verified ·
1 Parent(s): 083a784

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -0
README.md CHANGED
@@ -84,6 +84,24 @@ _ = model.generate(
84
  )
85
  ```
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  ### Framework versions
88
 
89
  - PEFT 0.17.1
 
84
  )
85
  ```
86
 
87
+ **For pipeline:**
88
+
89
+ ```python
90
+ from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
91
+ from peft import PeftModel
92
+
93
+ tokenizer = AutoTokenizer.from_pretrained("unsloth/Qwen2.5-0.5B-Instruct")
94
+ base_model = AutoModelForCausalLM.from_pretrained("unsloth/Qwen2.5-0.5B-Instruct")
95
+ model = PeftModel.from_pretrained(base_model, "khazarai/SympQwen-0.5B")
96
+
97
+ question = "I have a rash on my skin that is itchy and has a different color than the rest of my skin. I also have some firm pimples or breakouts on my skin."
98
+
99
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
100
+ messages = [
101
+ {"role": "user", "content": question}
102
+ ]
103
+ pipe(messages)
104
+ ```
105
  ### Framework versions
106
 
107
  - PEFT 0.17.1