minchyeom commited on
Commit
f95aa06
·
verified ·
1 Parent(s): 16b29a1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -1
README.md CHANGED
@@ -21,4 +21,25 @@ Borrowed some ideas from my other "distillation" technique, which significantly
21
 
22
  Thanks and have fun!!
23
 
24
- Also happy birthday to myself :)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  Thanks and have fun!!
23
 
24
+ Also happy birthday to myself :)
25
+
26
+ Usage (taken from official Gemma 2 9B repo):
27
+ ```python
28
+ import torch
29
+ from transformers import pipeline
30
+
31
+ pipe = pipeline(
32
+ "text-generation",
33
+ model="minchyeom/birthday-llm",
34
+ model_kwargs={"torch_dtype": torch.bfloat16},
35
+ device="cuda", # replace with "mps" to run on a Mac device
36
+ )
37
+
38
+ messages = [
39
+ {"role": "user", "content": "How many r's are there in the word strawberry?"},
40
+ ]
41
+
42
+ outputs = pipe(messages, max_new_tokens=256)
43
+ assistant_response = outputs[0]["generated_text"][-1]["content"].strip()
44
+ print(assistant_response)
45
+ ```