Nhoodie commited on
Commit
8d4a380
·
verified ·
1 Parent(s): ba8ed27

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +88 -0
README.md ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - merge
4
+ - mergekit
5
+ - lazymergekit
6
+ - hiieu/Meta-Llama-3-8B-Instruct-function-calling-json-mode
7
+ - Orenguteng/Lexi-Llama-3-8B-Uncensored
8
+ - NousResearch/Meta-Llama-3-8B
9
+ - vicgalle/Configurable-Llama-3-8B-v0.3
10
+ - NousResearch/Meta-Llama-3-8B-Instruct
11
+ base_model:
12
+ - hiieu/Meta-Llama-3-8B-Instruct-function-calling-json-mode
13
+ - Orenguteng/Lexi-Llama-3-8B-Uncensored
14
+ - NousResearch/Meta-Llama-3-8B
15
+ - vicgalle/Configurable-Llama-3-8B-v0.3
16
+ - NousResearch/Meta-Llama-3-8B-Instruct
17
+ ---
18
+
19
+ # Meta-Llama-3-8b-Configurable-Lexi-Uninstruct-function-calling-json-mode-Task-Arithmetic-v0.0A
20
+
21
+ Meta-Llama-3-8b-Configurable-Lexi-Uninstruct-function-calling-json-mode-Task-Arithmetic-v0.0A is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
22
+ * [hiieu/Meta-Llama-3-8B-Instruct-function-calling-json-mode](https://huggingface.co/hiieu/Meta-Llama-3-8B-Instruct-function-calling-json-mode)
23
+ * [Orenguteng/Lexi-Llama-3-8B-Uncensored](https://huggingface.co/Orenguteng/Lexi-Llama-3-8B-Uncensored)
24
+ * [NousResearch/Meta-Llama-3-8B](https://huggingface.co/NousResearch/Meta-Llama-3-8B)
25
+ * [vicgalle/Configurable-Llama-3-8B-v0.3](https://huggingface.co/vicgalle/Configurable-Llama-3-8B-v0.3)
26
+ * [NousResearch/Meta-Llama-3-8B-Instruct](https://huggingface.co/NousResearch/Meta-Llama-3-8B-Instruct)
27
+
28
+ ## 🧩 Configuration
29
+
30
+ ```yaml
31
+ slices:
32
+ - sources:
33
+ - model: hiieu/Meta-Llama-3-8B-Instruct-function-calling-json-mode
34
+ parameters:
35
+ weight: 1
36
+ layer_range: [0, 32]
37
+ - model: Orenguteng/Lexi-Llama-3-8B-Uncensored
38
+ parameters:
39
+ weight: 0.9
40
+ layer_range: [0, 32]
41
+ - model: NousResearch/Meta-Llama-3-8B
42
+ parameters:
43
+ weight: 0.6
44
+ layer_range: [0, 32]
45
+ - model: vicgalle/Configurable-Llama-3-8B-v0.3
46
+ parameters:
47
+ weight: 0.8
48
+ layer_range: [0, 32]
49
+ - model: NousResearch/Meta-Llama-3-8B-Instruct
50
+ parameters:
51
+ weight: 0.7
52
+ layer_range: [0, 32]
53
+ merge_method: task_arithmetic
54
+ base_model: NousResearch/Meta-Llama-3-8B-Instruct
55
+ parameters:
56
+ t:
57
+ - filter: self_attn
58
+ value: [0, 0.5, 0.3, 0.7, 1]
59
+ - filter: mlp
60
+ value: [1, 0.5, 0.7, 0.3, 0]
61
+ - value: 0.5
62
+ dtype: bfloat16
63
+ ```
64
+
65
+ ## 💻 Usage
66
+
67
+ ```python
68
+ !pip install -qU transformers accelerate
69
+
70
+ from transformers import AutoTokenizer
71
+ import transformers
72
+ import torch
73
+
74
+ model = "Nhoodie/Meta-Llama-3-8b-Configurable-Lexi-Uninstruct-function-calling-json-mode-Task-Arithmetic-v0.0A"
75
+ messages = [{"role": "user", "content": "What is a large language model?"}]
76
+
77
+ tokenizer = AutoTokenizer.from_pretrained(model)
78
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
79
+ pipeline = transformers.pipeline(
80
+ "text-generation",
81
+ model=model,
82
+ torch_dtype=torch.float16,
83
+ device_map="auto",
84
+ )
85
+
86
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
87
+ print(outputs[0]["generated_text"])
88
+ ```