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