wwe180 commited on
Commit
8c36b9b
·
verified ·
1 Parent(s): 67ceed4

Upload folder using huggingface_hub

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