mlabonne commited on
Commit
24665cb
1 Parent(s): 75b178e

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +92 -0
README.md ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ tags:
4
+ - merge
5
+ - mergekit
6
+ - lazymergekit
7
+ base_model:
8
+ - NousResearch/Meta-Llama-3-8B-Instruct
9
+ - mlabonne/OrpoLlama-3-8B
10
+ - cognitivecomputations/dolphin-2.9-llama3-8b
11
+ - Locutusque/llama-3-neural-chat-v1-8b
12
+ - cloudyu/Meta-Llama-3-8B-Instruct-DPO
13
+ - vicgalle/Configurable-Llama-3-8B-v0.3
14
+ - dreamgen/opus-v1.2-llama-3-8b
15
+ ---
16
+
17
+ # ChimeraLlama-3-8B-v2
18
+
19
+ ChimeraLlama-3-8B-v2 is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
20
+ * [NousResearch/Meta-Llama-3-8B-Instruct](https://huggingface.co/NousResearch/Meta-Llama-3-8B-Instruct)
21
+ * [mlabonne/OrpoLlama-3-8B](https://huggingface.co/mlabonne/OrpoLlama-3-8B)
22
+ * [cognitivecomputations/dolphin-2.9-llama3-8b](https://huggingface.co/cognitivecomputations/dolphin-2.9-llama3-8b)
23
+ * [Locutusque/llama-3-neural-chat-v1-8b](https://huggingface.co/Locutusque/llama-3-neural-chat-v1-8b)
24
+ * [cloudyu/Meta-Llama-3-8B-Instruct-DPO](https://huggingface.co/cloudyu/Meta-Llama-3-8B-Instruct-DPO)
25
+ * [vicgalle/Configurable-Llama-3-8B-v0.3](https://huggingface.co/vicgalle/Configurable-Llama-3-8B-v0.3)
26
+ * [dreamgen/opus-v1.2-llama-3-8b](https://huggingface.co/dreamgen/opus-v1.2-llama-3-8b)
27
+
28
+ ## 🧩 Configuration
29
+
30
+ ```yaml
31
+ models:
32
+ - model: NousResearch/Meta-Llama-3-8B
33
+ # No parameters necessary for base model
34
+ - model: NousResearch/Meta-Llama-3-8B-Instruct
35
+ parameters:
36
+ density: 0.6
37
+ weight: 0.55
38
+ - model: mlabonne/OrpoLlama-3-8B
39
+ parameters:
40
+ density: 0.55
41
+ weight: 0.05
42
+ - model: cognitivecomputations/dolphin-2.9-llama3-8b
43
+ parameters:
44
+ density: 0.55
45
+ weight: 0.1
46
+ - model: Locutusque/llama-3-neural-chat-v1-8b
47
+ parameters:
48
+ density: 0.55
49
+ weight: 0.05
50
+ - model: cloudyu/Meta-Llama-3-8B-Instruct-DPO
51
+ parameters:
52
+ density: 0.55
53
+ weight: 0.1
54
+ - model: vicgalle/Configurable-Llama-3-8B-v0.3
55
+ parameters:
56
+ density: 0.55
57
+ weight: 0.1
58
+ - model: dreamgen/opus-v1.2-llama-3-8b
59
+ parameters:
60
+ density: 0.55
61
+ weight: 0.05
62
+ merge_method: dare_ties
63
+ base_model: NousResearch/Meta-Llama-3-8B
64
+ parameters:
65
+ int8_mask: true
66
+ dtype: float16
67
+ ```
68
+
69
+ ## 💻 Usage
70
+
71
+ ```python
72
+ !pip install -qU transformers accelerate
73
+
74
+ from transformers import AutoTokenizer
75
+ import transformers
76
+ import torch
77
+
78
+ model = "mlabonne/ChimeraLlama-3-8B-v2"
79
+ messages = [{"role": "user", "content": "What is a large language model?"}]
80
+
81
+ tokenizer = AutoTokenizer.from_pretrained(model)
82
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
83
+ pipeline = transformers.pipeline(
84
+ "text-generation",
85
+ model=model,
86
+ torch_dtype=torch.float16,
87
+ device_map="auto",
88
+ )
89
+
90
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
91
+ print(outputs[0]["generated_text"])
92
+ ```