johannhartmann commited on
Commit
5b54833
1 Parent(s): dab9b6c

Upload README.md

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
+ - DiscoResearch/DiscoLM_German_7b_v1
7
+ - DRXD1000/Phoenix
8
+ - OpenPipe/mistral-ft-optimized-1227
9
+ base_model:
10
+ - DiscoResearch/DiscoLM_German_7b_v1
11
+ - DRXD1000/Phoenix
12
+ - OpenPipe/mistral-ft-optimized-1227
13
+ ---
14
+
15
+ # DiscoPhoenix-7B
16
+
17
+ DiscoPhoenix-7B is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
18
+ * [DiscoResearch/DiscoLM_German_7b_v1](https://huggingface.co/DiscoResearch/DiscoLM_German_7b_v1)
19
+ * [DRXD1000/Phoenix](https://huggingface.co/DRXD1000/Phoenix)
20
+ * [OpenPipe/mistral-ft-optimized-1227](https://huggingface.co/OpenPipe/mistral-ft-optimized-1227)
21
+
22
+ ## 🧩 Configuration
23
+
24
+ ```yaml
25
+ models:
26
+ - model: mistralai/Mistral-7B-v0.1
27
+ # No parameters necessary for base model
28
+ - model: DiscoResearch/DiscoLM_German_7b_v1
29
+ parameters:
30
+ density: 0.6
31
+ weight: 0.3
32
+ - model: DRXD1000/Phoenix
33
+ parameters:
34
+ density: 0.6
35
+ weight: 0.3
36
+ - model: OpenPipe/mistral-ft-optimized-1227
37
+ parameters:
38
+ density: 0.6
39
+ weight: 0.4
40
+ merge_method: dare_ties
41
+ base_model: mistralai/Mistral-7B-v0.1
42
+ parameters:
43
+ int8_mask: true
44
+ dtype: bfloat16
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 = "mayflowergmbh/DiscoPhoenix-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
+ ```