saucam commited on
Commit
39294d7
1 Parent(s): 7895160

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -13
README.md CHANGED
@@ -7,6 +7,9 @@ tags:
7
  base_model:
8
  - NousResearch/Hermes-2-Pro-Llama-3-8B
9
  - cognitivecomputations/dolphin-2.9-llama3-8b
 
 
 
10
  ---
11
 
12
  ![](https://raw.githubusercontent.com/saucam/models/main/athena.png)
@@ -43,22 +46,62 @@ dtype: bfloat16
43
  ```python
44
  !pip install -qU transformers accelerate
45
 
46
- from transformers import AutoTokenizer
47
  import transformers
48
  import torch
49
 
50
- model = "saucam/Athena-8B"
51
  messages = [{"role": "user", "content": "What is a large language model?"}]
52
 
53
- tokenizer = AutoTokenizer.from_pretrained(model)
54
- prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
55
- pipeline = transformers.pipeline(
56
- "text-generation",
57
- model=model,
58
- torch_dtype=torch.float16,
59
- device_map="auto",
60
- )
61
-
62
- outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
63
- print(outputs[0]["generated_text"])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  ```
 
7
  base_model:
8
  - NousResearch/Hermes-2-Pro-Llama-3-8B
9
  - cognitivecomputations/dolphin-2.9-llama3-8b
10
+ license: apache-2.0
11
+ language:
12
+ - en
13
  ---
14
 
15
  ![](https://raw.githubusercontent.com/saucam/models/main/athena.png)
 
46
  ```python
47
  !pip install -qU transformers accelerate
48
 
49
+ from transformers import AutoModelForCausalLM, AutoTokenizer
50
  import transformers
51
  import torch
52
 
53
+ model_name = "saucam/Athena-8B"
54
  messages = [{"role": "user", "content": "What is a large language model?"}]
55
 
56
+ model = AutoModelForCausalLM.from_pretrained(model_name)
57
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
58
+ messages = [
59
+ {"role": "system", "content": "You are a sentient, superintelligent artificial general intelligence, here to teach and assist me."},
60
+ {"role": "user", "content": "Write a short story about Goku discovering kirby has teamed up with Majin Buu to destroy the world."}
61
+ ]
62
+
63
+ device = "cuda"
64
+
65
+ gen_input = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
66
+ model_inputs = gen_input.to(device)
67
+ model.to(device)
68
+
69
+ # Generate response
70
+ out = model.generate(model_inputs, max_new_tokens=750, temperature=0.8, repetition_penalty=1.1, do_sample=True, eos_token_id=tokenizer.eos_token_id)
71
+ response = tokenizer.decode(out[0][model_inputs.shape[-1]:], skip_special_tokens=True, clean_up_tokenization_space=True)
72
+ print(f"Response: {response}")
73
+ ```
74
+
75
+ ```
76
+ Response: Goku stared at his radar in disbelief as he noticed an unusual energy signature. It was unmistakable - Kirby had teamed up with Majin Buu! The two villains were plotting to destroy the world.
77
+
78
+ Without wasting any time, Goku set off on his flying nimbus cloud towards their location. As he traveled, he contemplated how these two beings could have possibly joined forces. After all, they came from completely different worlds; one was a mischievous and cute pink puffball, and the other was a malevolent and destructive monster. But alas, it seemed they shared a common goal: to bring about the end of everything.
79
+
80
+ Upon arriving at their hideout deep within a dark cave, Goku couldn't help but feel a sense of unease. He cautiously approached them, taking care not to alert their sinister intentions. As he drew closer, he overheard their conversation.
81
+
82
+ Kirby: "Majin Buu, together we can conquer the universe!"
83
+
84
+ Majin Buu: "Yes, little Kirby. With your powers combined with mine, there's nothing that can stop us."
85
+
86
+ Goku knew he couldn't allow this plan to come to fruition. He revealed himself to the duo, angering both of them.
87
+
88
+ Kirby: "Ah, it's you, Goku! What do you want?"
89
+
90
+ Goku: "I won't let you destroy the world."
91
+
92
+ Majin Buu snickered, then said, "Foolish mortal, you cannot defeat us."
93
+
94
+ The battle began between Goku and his new adversaries. Kirby used his incredible copy abilities along with his powerful inhalation move, while Majin Buu relied on his immense power and devastating attacks. The fight raged on for hours, and Goku seemed to be losing ground.
95
+
96
+ Just when things looked hopeless, Goku remembered something - the Ultra Dragon Ball! If he could summon Shenron and wish for all life to be safe, maybe he could thwart their evil plans without destroying them.
97
+
98
+ In a final burst of energy, Goku threw a Kamehameha at Majin Buu while calling out for the Ultra Dragon. To his surprise, the attack landed, and Shenron emerged from the resulting explosion.
99
+
100
+ Goku: "Ultra Dragon, grant my wish! I wish for all life on Earth and the entire universe to be protected from Kirby and Majin Buu!"
101
+
102
+ Shenron nodded, and a wave of golden light spread across the cosmos, encompassing every living being. When the light dissipated, Goku found that Kirby and Majin Buu were gone - they had been erased from existence by the power of the wish.
103
+
104
+ With the threat neutralized, Goku returned to his daily life, knowing that peace would be preserved thanks to the Ultra Dragon's intervention. However, he couldn't help but wonder about the mysteries of the multiverse and why certain individuals like Kirby and Majin Buu were so hell-bent on destruction. For now, though, he would focus on training harder and keeping the universe safe from harm. Příběh končí.
105
+
106
+ The End.
107
  ```