Update README.md
Browse files
README.md
CHANGED
@@ -82,7 +82,7 @@ import transformers
|
|
82 |
import torch
|
83 |
|
84 |
model = "saucam/Skyro-4X8B"
|
85 |
-
messages = [{"role": "user", "content": "
|
86 |
|
87 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
88 |
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
@@ -95,4 +95,40 @@ pipeline = transformers.pipeline(
|
|
95 |
|
96 |
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
97 |
print(outputs[0]["generated_text"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
```
|
|
|
82 |
import torch
|
83 |
|
84 |
model = "saucam/Skyro-4X8B"
|
85 |
+
messages = [{"role": "user", "content": "In a student council election, candidate A got 20% of the votes while candidate B got 50% more than candidate A's votes. The rest of the votes was given to candidate C. If there were 100 voters, how many votes did candidate C get?"}]
|
86 |
|
87 |
tokenizer = AutoTokenizer.from_pretrained(model)
|
88 |
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
|
|
95 |
|
96 |
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
97 |
print(outputs[0]["generated_text"])
|
98 |
+
```
|
99 |
+
|
100 |
+
## Sample output
|
101 |
+
|
102 |
+
```
|
103 |
+
config.json: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 878/878 [00:00<00:00, 4.18MB/s]
|
104 |
+
model.safetensors.index.json: 100%|ββββββββββββββββββββββββββββββββββββββββββ| 53.5k/53.5k [00:00<00:00, 101MB/s]
|
105 |
+
model-00001-of-00006.safetensors: 100%|βββββββββββββββββββββββββββββββββββββ| 9.89G/9.89G [03:47<00:00, 43.4MB/s]
|
106 |
+
model-00002-of-00006.safetensors: 100%|βββββββββββββββββββββββββββββββββββββ| 9.98G/9.98G [03:23<00:00, 49.0MB/s]
|
107 |
+
model-00003-of-00006.safetensors: 100%|βββββββββββββββββββββββββββββββββββββ| 9.98G/9.98G [03:44<00:00, 44.5MB/s]
|
108 |
+
model-00004-of-00006.safetensors: 100%|βββββββββββββββββββββββββββββββββββββ| 9.90G/9.90G [03:30<00:00, 46.9MB/s]
|
109 |
+
model-00005-of-00006.safetensors: 100%|βββββββββββββββββββββββββββββββββββββ| 9.08G/9.08G [03:08<00:00, 48.1MB/s]
|
110 |
+
model-00006-of-00006.safetensors: 100%|βββββββββββββββββββββββββββββββββββββ| 1.05G/1.05G [00:20<00:00, 51.3MB/s]
|
111 |
+
Downloading shards: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 6/6 [17:58<00:00, 179.78s/it]
|
112 |
+
Loading checkpoint shards: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββ| 6/6 [01:27<00:00, 14.59s/it]
|
113 |
+
WARNING:root:Some parameters are on the meta device device because they were offloaded to the cpu.
|
114 |
+
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
|
115 |
+
|
116 |
+
<|im_start|>user
|
117 |
+
In a student council election, candidate A got 20% of the votes while candidate B got 50% more than candidate A's votes. The rest of the votes was given to candidate C. If there were 100 voters, how many votes did candidate C get?<|im_end|>
|
118 |
+
<|im_start|>assistant
|
119 |
+
Let's denote the number of votes candidate A got as \( A \).
|
120 |
+
|
121 |
+
Candidate B got 50% more votes than candidate A, so candidate B got \( A + 0.5A = 1.5A \) votes.
|
122 |
+
|
123 |
+
Candidate C got the rest of the votes, which means \( C = 100 - (A + 1.5A) \).
|
124 |
+
|
125 |
+
We know that candidate A got 20% of the votes, so \( A = 20\% \times 100 = 20 \).
|
126 |
+
|
127 |
+
Now we can calculate candidate C's votes:
|
128 |
+
\( C = 100 - (20 + 1.5 \times 20) \)
|
129 |
+
\( C = 100 - (20 + 30) \)
|
130 |
+
\( C = 100 - 50 \)
|
131 |
+
\( C = 50 \).
|
132 |
+
|
133 |
+
Therefore, candidate C got 50 votes.<|im_end|>
|
134 |
```
|