automerger commited on
Commit
f9bffdf
1 Parent(s): 6ba980e

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +63 -0
README.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - merge
5
+ - mergekit
6
+ - lazymergekit
7
+ - automerger
8
+ base_model:
9
+ - NousResearch/Meta-Llama-3-8B-Instruct
10
+ - mlabonne/OrpoLlama-3-8B
11
+ ---
12
+
13
+ # OlethrosConfigurable-7B
14
+
15
+ OlethrosConfigurable-7B is an automated merge created by [Maxime Labonne](https://huggingface.co/mlabonne) using the following configuration.
16
+ * [NousResearch/Meta-Llama-3-8B-Instruct](https://huggingface.co/NousResearch/Meta-Llama-3-8B-Instruct)
17
+ * [mlabonne/OrpoLlama-3-8B](https://huggingface.co/mlabonne/OrpoLlama-3-8B)
18
+
19
+ ## 🧩 Configuration
20
+
21
+ ```yaml
22
+ models:
23
+ - model: NousResearch/Meta-Llama-3-8B
24
+ # No parameters necessary for base model
25
+ - model: NousResearch/Meta-Llama-3-8B-Instruct
26
+ parameters:
27
+ density: 0.6
28
+ weight: 0.5
29
+ - model: mlabonne/OrpoLlama-3-8B
30
+ parameters:
31
+ density: 0.55
32
+ weight: 0.05
33
+ merge_method: dare_ties
34
+ base_model: NousResearch/Meta-Llama-3-8B
35
+ parameters:
36
+ int8_mask: true
37
+ dtype: float16
38
+ ```
39
+
40
+ ## 💻 Usage
41
+
42
+ ```python
43
+ !pip install -qU transformers accelerate
44
+
45
+ from transformers import AutoTokenizer
46
+ import transformers
47
+ import torch
48
+
49
+ model = "automerger/OlethrosConfigurable-7B"
50
+ messages = [{"role": "user", "content": "What is a large language model?"}]
51
+
52
+ tokenizer = AutoTokenizer.from_pretrained(model)
53
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
54
+ pipeline = transformers.pipeline(
55
+ "text-generation",
56
+ model=model,
57
+ torch_dtype=torch.float16,
58
+ device_map="auto",
59
+ )
60
+
61
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
62
+ print(outputs[0]["generated_text"])
63
+ ```