mlabonne commited on
Commit
72267d1
1 Parent(s): 92558be

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +72 -1
README.md CHANGED
@@ -1,3 +1,74 @@
1
  ---
2
  license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ ---
4
+
5
+ Darewin-7B is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
6
+ * [Intel/neural-chat-7b-v3-3](https://huggingface.co/Intel/neural-chat-7b-v3-3)
7
+ * [openaccess-ai-collective/DPOpenHermes-7B-v2](https://huggingface.co/openaccess-ai-collective/DPOpenHermes-7B-v2)
8
+ * [fblgit/una-cybertron-7b-v2-bf16](https://huggingface.co/fblgit/una-cybertron-7b-v2-bf16)
9
+ * [openchat/openchat-3.5-0106](https://huggingface.co/openchat/openchat-3.5-0106)
10
+ * [OpenPipe/mistral-ft-optimized-1227](https://huggingface.co/OpenPipe/mistral-ft-optimized-1227)
11
+ * [mlabonne/NeuralHermes-2.5-Mistral-7B](https://huggingface.co/mlabonne/NeuralHermes-2.5-Mistral-7B)
12
+
13
+ ## 🧩 Configuration
14
+
15
+ ```yaml
16
+ models:
17
+ - model: mistralai/Mistral-7B-v0.1
18
+ # No parameters necessary for base model
19
+ - model: Intel/neural-chat-7b-v3-3
20
+ parameters:
21
+ density: 0.6
22
+ weight: 0.2
23
+ - model: openaccess-ai-collective/DPOpenHermes-7B-v2
24
+ parameters:
25
+ density: 0.6
26
+ weight: 0.1
27
+ - model: fblgit/una-cybertron-7b-v2-bf16
28
+ parameters:
29
+ density: 0.6
30
+ weight: 0.2
31
+ - model: openchat/openchat-3.5-0106
32
+ parameters:
33
+ density: 0.6
34
+ weight: 0.15
35
+ - model: OpenPipe/mistral-ft-optimized-1227
36
+ parameters:
37
+ density: 0.6
38
+ weight: 0.25
39
+ - model: mlabonne/NeuralHermes-2.5-Mistral-7B
40
+ parameters:
41
+ density: 0.6
42
+ weight: 0.1
43
+ merge_method: dare_ties
44
+ base_model: mistralai/Mistral-7B-v0.1
45
+ parameters:
46
+ int8_mask: true
47
+ dtype: bfloat16
48
+
49
+ ```
50
+
51
+ ## 💻 Usage
52
+
53
+ ```python
54
+ !pip install -qU transformers accelerate
55
+
56
+ from transformers import AutoTokenizer
57
+ import transformers
58
+ import torch
59
+
60
+ model = "mlabonne/NeuralDarewin-7B"
61
+ messages = [{"role": "user", "content": "What is a large language model?"}]
62
+
63
+ tokenizer = AutoTokenizer.from_pretrained(model)
64
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
65
+ pipeline = transformers.pipeline(
66
+ "text-generation",
67
+ model=model,
68
+ torch_dtype=torch.float16,
69
+ device_map="auto",
70
+ )
71
+
72
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
73
+ print(outputs[0]["generated_text"])
74
+ ```