Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
license_name: qwen
|
4 |
+
license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE
|
5 |
+
language:
|
6 |
+
- en
|
7 |
+
pipeline_tag: text-generation
|
8 |
+
base_model:
|
9 |
+
- ssmits/Qwen2.5-95B-Instruct
|
10 |
+
tags:
|
11 |
+
- chat
|
12 |
+
---
|
13 |
+
|
14 |
+
# Qwen-95B
|
15 |
+
|
16 |
+
Qwen-95B is a [Qwen/Qwen-72B](https://huggingface.co/Qwen/Qwen-72B) self-merge made with [MergeKit](https://github.com/arcee-ai/mergekit/tree/main).
|
17 |
+
|
18 |
+
It was inspired by large merges like:
|
19 |
+
|
20 |
+
- [alpindale/goliath-120b](https://huggingface.co/alpindale/goliath-120b)
|
21 |
+
- [cognitivecomputations/MegaDolphin-120b](https://huggingface.co/cognitivecomputations/MegaDolphin-120b)
|
22 |
+
- [mlabonne/Meta-Llama-3-120B-Instruct](https://huggingface.co/mlabonne/Meta-Llama-3-120B-Instruct)
|
23 |
+
|
24 |
+
Special thanks to [Eric Hartford](https://huggingface.co/ehartford) for both inspiring and evaluating the original model, to [Charles Goddard](https://huggingface.co/chargoddard) for creating MergeKit, and to [Mathieu Labonne](https://huggingface.co/mlabonne) for creating the Meta-Llama-3-120B-Instruct model that served as the main inspiration for this merge.
|
25 |
+
|
26 |
+
## 🔍 Applications
|
27 |
+
|
28 |
+
This model is recommended for creative writing tasks. It uses the Qwen chat template with a default context window of 8K (can be extended with rope theta).
|
29 |
+
|
30 |
+
The model is generally quite creative and has a good writing style. It may occasionally output typos and show a preference for uppercase text.
|
31 |
+
|
32 |
+
## ⚡ Quantized models
|
33 |
+
|
34 |
+
To be quantized.
|
35 |
+
|
36 |
+
* **GGUF**: [Link to GGUF model]
|
37 |
+
* **EXL2**: [Link to EXL2 model]
|
38 |
+
* **mlx**: [Link to mlx model]
|
39 |
+
|
40 |
+
## 🏆 Evaluation
|
41 |
+
This model has yet to be thoroughly evaluated. It is expected to excel in creative writing but may have limitations in other tasks. Use it with caution and don't expect it to outperform state-of-the-art models outside of specific creative use cases.
|
42 |
+
|
43 |
+
Once the model is created and tested, this section will be updated with:
|
44 |
+
|
45 |
+
* Links to evaluation threads on social media platforms
|
46 |
+
* Examples of the model's performance in creative writing tasks
|
47 |
+
* Comparisons with other large language models in various applications
|
48 |
+
* Community feedback and use cases
|
49 |
+
|
50 |
+
We encourage users to share their experiences and evaluations to help build a comprehensive understanding of the model's capabilities and limitations.
|
51 |
+
|
52 |
+
## 🧩 Configuration
|
53 |
+
|
54 |
+
```yaml
|
55 |
+
slices:
|
56 |
+
- sources:
|
57 |
+
- layer_range: [0, 10]
|
58 |
+
model: Qwen/Qwen2.5-72B-Instruct
|
59 |
+
- sources:
|
60 |
+
- layer_range: [5, 15]
|
61 |
+
model: Qwen/Qwen2.5-72B-Instruct
|
62 |
+
- sources:
|
63 |
+
- layer_range: [10, 20]
|
64 |
+
model: Qwen/Qwen2.5-72B-Instruct
|
65 |
+
- sources:
|
66 |
+
- layer_range: [15, 25]
|
67 |
+
model: Qwen/Qwen2.5-72B-Instruct
|
68 |
+
- sources:
|
69 |
+
- layer_range: [20, 30]
|
70 |
+
model: Qwen/Qwen2.5-72B-Instruct
|
71 |
+
- sources:
|
72 |
+
- layer_range: [25, 80]
|
73 |
+
model: Qwen/Qwen2.5-72B-Instruct
|
74 |
+
merge_method: passthrough
|
75 |
+
dtype: bfloat16
|
76 |
+
```
|
77 |
+
|
78 |
+
## 💻 Usage
|
79 |
+
|
80 |
+
```python
|
81 |
+
!pip install -qU transformers accelerate
|
82 |
+
|
83 |
+
from transformers import AutoTokenizer
|
84 |
+
import transformers
|
85 |
+
import torch
|
86 |
+
|
87 |
+
model = "ssmits/Qwen2.5-95B-Instruct"
|
88 |
+
messages = [{"role": "user", "content": "What is a large language model?"}]
|
89 |
+
|
90 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
91 |
+
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
92 |
+
pipeline = transformers.pipeline(
|
93 |
+
"text-generation",
|
94 |
+
model=model,
|
95 |
+
torch_dtype=torch.float16,
|
96 |
+
device_map="auto",
|
97 |
+
)
|
98 |
+
|
99 |
+
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
100 |
+
print(outputs[0]["generated_text"])
|