paulml commited on
Commit
d97719b
1 Parent(s): 17653b7

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +70 -0
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - merge
4
+ - mergekit
5
+ - lazymergekit
6
+ - shadowml/WestBeagle-7B
7
+ - shadowml/Beaglake-7B
8
+ - mlabonne/NeuralOmniBeagle-7B
9
+ base_model:
10
+ - shadowml/WestBeagle-7B
11
+ - shadowml/Beaglake-7B
12
+ - mlabonne/NeuralOmniBeagle-7B
13
+ ---
14
+
15
+ # NeuralOmniWestBeaglake-7B
16
+
17
+ NeuralOmniWestBeaglake-7B is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
18
+ * [shadowml/WestBeagle-7B](https://huggingface.co/shadowml/WestBeagle-7B)
19
+ * [shadowml/Beaglake-7B](https://huggingface.co/shadowml/Beaglake-7B)
20
+ * [mlabonne/NeuralOmniBeagle-7B](https://huggingface.co/mlabonne/NeuralOmniBeagle-7B)
21
+
22
+ ## 🧩 Configuration
23
+
24
+ ```yaml
25
+ models:
26
+ - model: mistralai/Mistral-7B-v0.1
27
+ # no parameters necessary for base model
28
+ - model: shadowml/WestBeagle-7B
29
+ parameters:
30
+ density: 0.65
31
+ weight: 0.4
32
+ - model: shadowml/Beaglake-7B
33
+ parameters:
34
+ density: 0.6
35
+ weight: 0.35
36
+ - model: mlabonne/NeuralOmniBeagle-7B
37
+ parameters:
38
+ density: 0.6
39
+ weight: 0.45
40
+ merge_method: dare_ties
41
+ base_model: mistralai/Mistral-7B-v0.1
42
+ parameters:
43
+ int8_mask: true
44
+ dtype: float16
45
+ ```
46
+
47
+ ## 💻 Usage
48
+
49
+ ```python
50
+ !pip install -qU transformers accelerate
51
+
52
+ from transformers import AutoTokenizer
53
+ import transformers
54
+ import torch
55
+
56
+ model = "paulml/NeuralOmniWestBeaglake-7B"
57
+ messages = [{"role": "user", "content": "What is a large language model?"}]
58
+
59
+ tokenizer = AutoTokenizer.from_pretrained(model)
60
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
61
+ pipeline = transformers.pipeline(
62
+ "text-generation",
63
+ model=model,
64
+ torch_dtype=torch.float16,
65
+ device_map="auto",
66
+ )
67
+
68
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
69
+ print(outputs[0]["generated_text"])
70
+ ```