Solshine commited on
Commit
d6ab37a
1 Parent(s): cb380a8

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +72 -0
README.md ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - mlabonne/Hermes-3-Llama-3.1-8B-lorablated
4
+ - Solshine/reflection-llama-3.1-8B
5
+ - Solshine/Meta-Llama-3.1-8B-Instruct-Python-Coder
6
+ - Solshine/reflection-llama-3.1-8B
7
+ - mlabonne/Hermes-3-Llama-3.1-8B-lorablated
8
+ tags:
9
+ - merge
10
+ - mergekit
11
+ - lazymergekit
12
+ - mlabonne/Hermes-3-Llama-3.1-8B-lorablated
13
+ - Solshine/reflection-llama-3.1-8B
14
+ - Solshine/Meta-Llama-3.1-8B-Instruct-Python-Coder
15
+ ---
16
+
17
+ # Llama-3-1-8B-big-thoughtful-passthrough-merge
18
+
19
+ Llama-3-1-8B-big-thoughtful-passthrough-merge is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
20
+ * [mlabonne/Hermes-3-Llama-3.1-8B-lorablated](https://huggingface.co/mlabonne/Hermes-3-Llama-3.1-8B-lorablated)
21
+ * [Solshine/reflection-llama-3.1-8B](https://huggingface.co/Solshine/reflection-llama-3.1-8B)
22
+ * [Solshine/Meta-Llama-3.1-8B-Instruct-Python-Coder](https://huggingface.co/Solshine/Meta-Llama-3.1-8B-Instruct-Python-Coder)
23
+ * [Solshine/reflection-llama-3.1-8B](https://huggingface.co/Solshine/reflection-llama-3.1-8B)
24
+ * [mlabonne/Hermes-3-Llama-3.1-8B-lorablated](https://huggingface.co/mlabonne/Hermes-3-Llama-3.1-8B-lorablated)
25
+
26
+ ## 🧩 Configuration
27
+
28
+ ```yaml
29
+ slices:
30
+ - sources:
31
+ - layer_range: [0, 16]
32
+ model: mlabonne/Hermes-3-Llama-3.1-8B-lorablated
33
+ - sources:
34
+ - layer_range: [4, 20]
35
+ model: Solshine/reflection-llama-3.1-8B
36
+ - sources:
37
+ - layer_range: [8, 24]
38
+ model: Solshine/Meta-Llama-3.1-8B-Instruct-Python-Coder
39
+ - sources:
40
+ - layer_range: [12, 28]
41
+ model: Solshine/reflection-llama-3.1-8B
42
+ - sources:
43
+ - layer_range: [16, 32]
44
+ model: mlabonne/Hermes-3-Llama-3.1-8B-lorablated
45
+ merge_method: passthrough
46
+ dtype: float16
47
+ ```
48
+
49
+ ## 💻 Usage
50
+
51
+ ```python
52
+ !pip install -qU transformers accelerate
53
+
54
+ from transformers import AutoTokenizer
55
+ import transformers
56
+ import torch
57
+
58
+ model = "Solshine/Llama-3-1-8B-big-thoughtful-passthrough-merge"
59
+ messages = [{"role": "user", "content": "What is a large language model?"}]
60
+
61
+ tokenizer = AutoTokenizer.from_pretrained(model)
62
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
63
+ pipeline = transformers.pipeline(
64
+ "text-generation",
65
+ model=model,
66
+ torch_dtype=torch.float16,
67
+ device_map="auto",
68
+ )
69
+
70
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
71
+ print(outputs[0]["generated_text"])
72
+ ```