MultiTrickFox
commited on
Commit
•
8e03a3e
1
Parent(s):
bc29640
Update README.md
Browse files
README.md
CHANGED
@@ -1 +1,31 @@
|
|
1 |
-
Bloom (2.5 B) Scientific Model fine tuned on Zen Knowledge
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Bloom (2.5 B) Scientific Model fine tuned on Zen Knowledge
|
2 |
+
|
3 |
+
|
4 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
+
|
6 |
+
tokenizer = AutoTokenizer.from_pretrained("MultiTrickFox/bloom-2b5_Zen")
|
7 |
+
model = AutoModelForCausalLM.from_pretrained("MultiTrickFox/bloom-2b5_Zen")
|
8 |
+
|
9 |
+
generator = pipeline('text-generation', model=model, tokenizer=tokenizer)
|
10 |
+
|
11 |
+
inp = [
|
12 |
+
"""Today""",
|
13 |
+
"""Yesterday"""
|
14 |
+
]
|
15 |
+
|
16 |
+
out = generator(
|
17 |
+
inp,
|
18 |
+
do_sample=True,
|
19 |
+
|
20 |
+
temperature=.6,
|
21 |
+
typical_p=.7,
|
22 |
+
#top_p=.9,
|
23 |
+
repetition_penalty=1.2,
|
24 |
+
|
25 |
+
max_new_tokens=666,
|
26 |
+
max_time=60, # seconds
|
27 |
+
|
28 |
+
pad_token_id = tokenizer.eos_token_id,
|
29 |
+
)
|
30 |
+
|
31 |
+
for o in out: print(o[0]['generated_text'])
|