rootxhacker commited on
Commit
6ec46e6
·
verified ·
1 Parent(s): a4eb20f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +42 -48
README.md CHANGED
@@ -1,59 +1,53 @@
1
- ---
2
- base_model:
3
- - allura-org/Qwen2.5-32b-RP-Ink
4
- - Qwen/Qwen2.5-Coder-32B
5
- - tanliboy/lambda-qwen2.5-32b-dpo-test
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
- The following models were included in the merge:
29
- * [allura-org/Qwen2.5-32b-RP-Ink](https://huggingface.co/allura-org/Qwen2.5-32b-RP-Ink)
30
- * [Qwen/Qwen2.5-Coder-32B](https://huggingface.co/Qwen/Qwen2.5-Coder-32B)
31
- * [tanliboy/lambda-qwen2.5-32b-dpo-test](https://huggingface.co/tanliboy/lambda-qwen2.5-32b-dpo-test)
32
- * [huihui-ai/QwQ-32B-Preview-abliterated](https://huggingface.co/huihui-ai/QwQ-32B-Preview-abliterated)
33
- * [fblgit/TheBeagle-v2beta-32B-MGS](https://huggingface.co/fblgit/TheBeagle-v2beta-32B-MGS)
34
- * [Qwen/QwQ-32B](https://huggingface.co/Qwen/QwQ-32B)
35
- * [Qwen/Qwen2.5-32B](https://huggingface.co/Qwen/Qwen2.5-32B)
 
 
 
 
 
 
 
 
 
36
 
37
- ### Configuration
 
 
 
 
 
 
 
 
38
 
39
- The following YAML configuration was used to produce this model:
40
 
41
- ```yaml
42
- models:
43
- - model: Qwen/QwQ-32B #logic
44
- - model: huihui-ai/QwQ-32B-Preview-abliterated #uncensored
45
- - model: Qwen/Qwen2.5-32B #text generation
46
- - model: Qwen/Qwen2.5-32B-Instruct #chat assistant
47
- - model: Qwen/Qwen2.5-Coder-32B #coding
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