fhai50032 commited on
Commit
0022c02
1 Parent(s): 884d5ff

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +64 -0
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - merge
4
+ - mergekit
5
+ - mistral
6
+ - xDAN-AI/xDAN-L1-Chat-RL-v1
7
+ - fhai50032/BeagleLake-7B-Toxic
8
+ base_model:
9
+ - xDAN-AI/xDAN-L1-Chat-RL-v1
10
+ - fhai50032/BeagleLake-7B-Toxic
11
+ ---
12
+
13
+ # xLakeChat
14
+
15
+ xLakeChat is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
16
+ * [xDAN-AI/xDAN-L1-Chat-RL-v1](https://huggingface.co/xDAN-AI/xDAN-L1-Chat-RL-v1)
17
+ * [fhai50032/BeagleLake-7B-Toxic](https://huggingface.co/fhai50032/BeagleLake-7B-Toxic)
18
+
19
+ ## 🧩 Configuration
20
+
21
+ ```yaml
22
+ models:
23
+ - model: senseable/WestLake-7B-v2
24
+ # no params for base model
25
+ - model: xDAN-AI/xDAN-L1-Chat-RL-v1
26
+ parameters:
27
+ weight: 0.73
28
+ density: 0.64
29
+ - model: fhai50032/BeagleLake-7B-Toxic
30
+ parameters:
31
+ weight: 0.46
32
+ density: 0.55
33
+ merge_method: dare_ties
34
+ base_model: senseable/WestLake-7B-v2
35
+ parameters:
36
+ normalize: true
37
+ int8_mask: true
38
+ dtype: float16
39
+ ```
40
+
41
+ ## 💻 Usage
42
+
43
+ ```python
44
+ !pip install -qU transformers accelerate
45
+
46
+ from transformers import AutoTokenizer
47
+ import transformers
48
+ import torch
49
+
50
+ model = "fhai50032/xLakeChat"
51
+ messages = [{"role": "user", "content": "What is a large language model?"}]
52
+
53
+ tokenizer = AutoTokenizer.from_pretrained(model)
54
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
55
+ pipeline = transformers.pipeline(
56
+ "text-generation",
57
+ model=model,
58
+ torch_dtype=torch.float16,
59
+ device_map="auto",
60
+ )
61
+
62
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
63
+ print(outputs[0]["generated_text"])
64
+ ```