Update README.md
Browse files
README.md
CHANGED
@@ -1,59 +1,53 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
- huihui-ai/QwQ-32B-Preview-abliterated
|
7 |
-
- fblgit/TheBeagle-v2beta-32B-MGS
|
8 |
-
- Qwen/QwQ-32B
|
9 |
-
- Qwen/Qwen2.5-32B-Instruct
|
10 |
-
- Qwen/Qwen2.5-32B
|
11 |
-
library_name: transformers
|
12 |
-
tags:
|
13 |
-
- mergekit
|
14 |
-
- merge
|
15 |
-
|
16 |
-
---
|
17 |
-
# merge
|
18 |
-
|
19 |
-
This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
|
20 |
-
|
21 |
-
## Merge Details
|
22 |
### Merge Method
|
23 |
|
24 |
This model was merged using the [Model Stock](https://arxiv.org/abs/2403.19522) merge method using [Qwen/Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct) as a base.
|
25 |
|
26 |
-
### Models Merged
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
-
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
- model: fblgit/TheBeagle-v2beta-32B-MGS #math
|
49 |
-
- model: tanliboy/lambda-qwen2.5-32b-dpo-test #dpo
|
50 |
-
- model: allura-org/Qwen2.5-32b-RP-Ink # RP
|
51 |
-
merge_method: model_stock
|
52 |
-
base_model: Qwen/Qwen2.5-32B-Instruct
|
53 |
-
normalize: true
|
54 |
-
int8_mask: true
|
55 |
-
dtype: bfloat16
|
56 |
|
|
|
|
|
57 |
|
|
|
58 |
|
59 |
-
```
|
|
|
1 |
+
|
2 |
+
# Apollo Model
|
3 |
+
|
4 |
+
This is an experimental hybrid reasoning model built on Qwen2.5-32B-Instruct
|
5 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
### Merge Method
|
7 |
|
8 |
This model was merged using the [Model Stock](https://arxiv.org/abs/2403.19522) merge method using [Qwen/Qwen2.5-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-32B-Instruct) as a base.
|
9 |
|
|
|
10 |
|
11 |
+
### Enable reasoning
|
12 |
+
|
13 |
+
prompt the LLM with think deeper and step by step
|
14 |
+
|
15 |
+
### Example code
|
16 |
+
|
17 |
+
'''
|
18 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
19 |
+
|
20 |
+
model_name = "rootxhacker/Apollo-v3-32B"
|
21 |
+
|
22 |
+
model = AutoModelForCausalLM.from_pretrained(
|
23 |
+
model_name,
|
24 |
+
torch_dtype="auto",
|
25 |
+
device_map="auto"
|
26 |
+
)
|
27 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
28 |
|
29 |
+
prompt = "How many r's are in the word strawberry"
|
30 |
+
messages = [
|
31 |
+
{"role": "user", "content": prompt}
|
32 |
+
]
|
33 |
+
text = tokenizer.apply_chat_template(
|
34 |
+
messages,
|
35 |
+
tokenize=False,
|
36 |
+
add_generation_prompt=True
|
37 |
+
)
|
38 |
|
39 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
40 |
|
41 |
+
generated_ids = model.generate(
|
42 |
+
**model_inputs,
|
43 |
+
max_new_tokens=32768
|
44 |
+
)
|
45 |
+
generated_ids = [
|
46 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
47 |
+
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
50 |
+
print(response)
|
51 |
|
52 |
+
'''
|
53 |
|
|