shadowml commited on
Commit
6f9efde
1 Parent(s): 88c647e

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. README.md +61 -0
  2. model-1.safetensors +3 -0
  3. model-2.safetensors +3 -0
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - merge
5
+ - mergekit
6
+ - lazymergekit
7
+ - jondurbin/bagel-dpo-34b-v0.2
8
+ - SUSTech/SUS-Chat-34B
9
+ ---
10
+
11
+ # SusBagle-34B
12
+
13
+ SusBagle-34B is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
14
+ * [jondurbin/bagel-dpo-34b-v0.2](https://huggingface.co/jondurbin/bagel-dpo-34b-v0.2)
15
+ * [SUSTech/SUS-Chat-34B](https://huggingface.co/SUSTech/SUS-Chat-34B)
16
+
17
+ ## 🧩 Configuration
18
+
19
+ ```yaml
20
+ slices:
21
+ - sources:
22
+ - model: jondurbin/bagel-dpo-34b-v0.2
23
+ layer_range: [0, 60]
24
+ - model: SUSTech/SUS-Chat-34B
25
+ layer_range: [0, 60]
26
+ merge_method: slerp
27
+ base_model: jondurbin/bagel-dpo-34b-v0.2
28
+ parameters:
29
+ t:
30
+ - filter: self_attn
31
+ value: [0, 0.5, 0.3, 0.7, 1]
32
+ - filter: mlp
33
+ value: [1, 0.5, 0.7, 0.3, 0]
34
+ - value: 0.5
35
+ dtype: bfloat16
36
+ ```
37
+
38
+ ## 💻 Usage
39
+
40
+ ```python
41
+ !pip install -qU transformers accelerate
42
+
43
+ from transformers import AutoTokenizer
44
+ import transformers
45
+ import torch
46
+
47
+ model = "shadowml/SusBagle-34B"
48
+ messages = [{"role": "user", "content": "What is a large language model?"}]
49
+
50
+ tokenizer = AutoTokenizer.from_pretrained(model)
51
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
52
+ pipeline = transformers.pipeline(
53
+ "text-generation",
54
+ model=model,
55
+ torch_dtype=torch.float16,
56
+ device_map="auto",
57
+ )
58
+
59
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
60
+ print(outputs[0]["generated_text"])
61
+ ```
model-1.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbdeb36ae9ea62bca83adecc05d12f7b9677a27f525e179dff1bbff7793a9d26
3
+ size 9843206304
model-2.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a484b6d412cd09d125c7e987f522049643c5f890e7d57d70bc09cc34dd308fe4
3
+ size 9747829888