AIencoder commited on
Commit
eb16e91
·
verified ·
1 Parent(s): f2da7d7

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +84 -0
README.md ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - mistralai/Mistral-7B-Instruct-v0.3
4
+ - uukuguy/speechless-code-mistral-7b-v2.0
5
+ - Nondzu/Mistral-7B-Instruct-v0.2-code-ft
6
+ - teknium/OpenHermes-2.5-Mistral-7B
7
+ - meta-math/MetaMath-Mistral-7B
8
+ tags:
9
+ - merge
10
+ - mergekit
11
+ - lazymergekit
12
+ - mistralai/Mistral-7B-Instruct-v0.3
13
+ - uukuguy/speechless-code-mistral-7b-v2.0
14
+ - Nondzu/Mistral-7B-Instruct-v0.2-code-ft
15
+ - teknium/OpenHermes-2.5-Mistral-7B
16
+ - meta-math/MetaMath-Mistral-7B
17
+ ---
18
+
19
+ # Mistral-CodingBeast-7B
20
+
21
+ Mistral-CodingBeast-7B is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
22
+ * [mistralai/Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3)
23
+ * [uukuguy/speechless-code-mistral-7b-v2.0](https://huggingface.co/uukuguy/speechless-code-mistral-7b-v2.0)
24
+ * [Nondzu/Mistral-7B-Instruct-v0.2-code-ft](https://huggingface.co/Nondzu/Mistral-7B-Instruct-v0.2-code-ft)
25
+ * [teknium/OpenHermes-2.5-Mistral-7B](https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B)
26
+ * [meta-math/MetaMath-Mistral-7B](https://huggingface.co/meta-math/MetaMath-Mistral-7B)
27
+
28
+ ## 🧩 Configuration
29
+
30
+ ```yaml
31
+ merge_method: dare_ties
32
+ base_model: mistralai/Mistral-7B-Instruct-v0.3
33
+ models:
34
+ - model: mistralai/Mistral-7B-Instruct-v0.3
35
+ parameters:
36
+ weight: 0.15
37
+ density: 0.5
38
+ - model: uukuguy/speechless-code-mistral-7b-v2.0
39
+ parameters:
40
+ weight: 0.25
41
+ density: 0.7
42
+ - model: Nondzu/Mistral-7B-Instruct-v0.2-code-ft
43
+ parameters:
44
+ weight: 0.2
45
+ density: 0.6
46
+ - model: teknium/OpenHermes-2.5-Mistral-7B
47
+ parameters:
48
+ weight: 0.2
49
+ density: 0.6
50
+ - model: meta-math/MetaMath-Mistral-7B
51
+ parameters:
52
+ weight: 0.2
53
+ density: 0.6
54
+ parameters:
55
+ int8_mask: true
56
+ normalize: true
57
+ dtype: bfloat16
58
+ tokenizer_source: mistralai/Mistral-7B-Instruct-v0.3
59
+ ```
60
+
61
+ ## 💻 Usage
62
+
63
+ ```python
64
+ !pip install -qU transformers accelerate
65
+
66
+ from transformers import AutoTokenizer
67
+ import transformers
68
+ import torch
69
+
70
+ model = "AIencoder/Mistral-CodingBeast-7B"
71
+ messages = [{"role": "user", "content": "What is a large language model?"}]
72
+
73
+ tokenizer = AutoTokenizer.from_pretrained(model)
74
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
75
+ pipeline = transformers.pipeline(
76
+ "text-generation",
77
+ model=model,
78
+ torch_dtype=torch.float16,
79
+ device_map="auto",
80
+ )
81
+
82
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
83
+ print(outputs[0]["generated_text"])
84
+ ```