automerger commited on
Commit
8fd31cc
1 Parent(s): 72b3f20

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +64 -0
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ tags:
4
+ - merge
5
+ - mergekit
6
+ - lazymergekit
7
+ - automerger
8
+ base_model:
9
+ - Kukedlc/NeuralMiLLaMa-8B-slerp
10
+ - KingNish/KingNish-Llama3-8b
11
+ ---
12
+
13
+ # NeuralmillamaKingnish-8B
14
+
15
+ NeuralmillamaKingnish-8B is an automated merge created by [Maxime Labonne](https://huggingface.co/mlabonne) using the following configuration.
16
+ * [Kukedlc/NeuralMiLLaMa-8B-slerp](https://huggingface.co/Kukedlc/NeuralMiLLaMa-8B-slerp)
17
+ * [KingNish/KingNish-Llama3-8b](https://huggingface.co/KingNish/KingNish-Llama3-8b)
18
+
19
+ ## 🧩 Configuration
20
+
21
+ ```yaml
22
+ slices:
23
+ - sources:
24
+ - model: Kukedlc/NeuralMiLLaMa-8B-slerp
25
+ layer_range: [0, 32]
26
+ - model: KingNish/KingNish-Llama3-8b
27
+ layer_range: [0, 32]
28
+ merge_method: slerp
29
+ base_model: Kukedlc/NeuralMiLLaMa-8B-slerp
30
+ parameters:
31
+ t:
32
+ - filter: self_attn
33
+ value: [0, 0.5, 0.3, 0.7, 1]
34
+ - filter: mlp
35
+ value: [1, 0.5, 0.7, 0.3, 0]
36
+ - value: 0.5
37
+ dtype: bfloat16
38
+ random_seed: 0
39
+ ```
40
+
41
+ ## 💻 Usage
42
+
43
+ ```python
44
+ !pip install -qU transformers accelerate
45
+
46
+ from transformers import AutoTokenizer
47
+ import transformers
48
+ import torch
49
+
50
+ model = "automerger/NeuralmillamaKingnish-8B"
51
+ messages = [{"role": "user", "content": "What is a large language model?"}]
52
+
53
+ tokenizer = AutoTokenizer.from_pretrained(model)
54
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
55
+ pipeline = transformers.pipeline(
56
+ "text-generation",
57
+ model=model,
58
+ torch_dtype=torch.float16,
59
+ device_map="auto",
60
+ )
61
+
62
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
63
+ print(outputs[0]["generated_text"])
64
+ ```