Vasanth commited on
Commit
3b65501
1 Parent(s): 1f5842d

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +69 -0
README.md ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - merge
4
+ - mergekit
5
+ - lazymergekit
6
+ - flemmingmiguel/MBX-7B-v3
7
+ - FelixChao/WestSeverus-7B-DPO-v2
8
+ - cognitivecomputations/WestLake-7B-v2-laser
9
+ base_model:
10
+ - flemmingmiguel/MBX-7B-v3
11
+ - FelixChao/WestSeverus-7B-DPO-v2
12
+ - cognitivecomputations/WestLake-7B-v2-laser
13
+ ---
14
+
15
+ # Beast-Soul-new
16
+
17
+ Beast-Soul-new is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
18
+ * [flemmingmiguel/MBX-7B-v3](https://huggingface.co/flemmingmiguel/MBX-7B-v3)
19
+ * [FelixChao/WestSeverus-7B-DPO-v2](https://huggingface.co/FelixChao/WestSeverus-7B-DPO-v2)
20
+ * [cognitivecomputations/WestLake-7B-v2-laser](https://huggingface.co/cognitivecomputations/WestLake-7B-v2-laser)
21
+
22
+ ## 🧩 Configuration
23
+
24
+ ```yaml
25
+ slices:
26
+ - sources:
27
+ - model: flemmingmiguel/MBX-7B-v3
28
+ layer_range: [0, 32]
29
+ - model: FelixChao/WestSeverus-7B-DPO-v2
30
+ layer_range: [0, 32]
31
+ - model: cognitivecomputations/WestLake-7B-v2-laser
32
+ layer_range: [0, 32]
33
+
34
+ merge_method: slerp
35
+ base_model: flemmingmiguel/MBX-7B-v3
36
+ parameters:
37
+ t:
38
+ - filter: self_attn
39
+ value: [0, 0.5, 0.3, 0.7, 1]
40
+ - filter: mlp
41
+ value: [1, 0.5, 0.7, 0.3, 0]
42
+ - value: 0.5
43
+ dtype: bfloat16
44
+ ```
45
+
46
+ ## 💻 Usage
47
+
48
+ ```python
49
+ !pip install -qU transformers accelerate
50
+
51
+ from transformers import AutoTokenizer
52
+ import transformers
53
+ import torch
54
+
55
+ model = "Vasanth/Beast-Soul-new"
56
+ messages = [{"role": "user", "content": "What is a large language model?"}]
57
+
58
+ tokenizer = AutoTokenizer.from_pretrained(model)
59
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
60
+ pipeline = transformers.pipeline(
61
+ "text-generation",
62
+ model=model,
63
+ torch_dtype=torch.float16,
64
+ device_map="auto",
65
+ )
66
+
67
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
68
+ print(outputs[0]["generated_text"])
69
+ ```