automerger commited on
Commit
66785df
1 Parent(s): f3f0971

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +58 -0
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - merge
5
+ - mergekit
6
+ - lazymergekit
7
+ - automerger
8
+ base_model:
9
+ - automerger/Experiment27Pastiche-7B
10
+ ---
11
+
12
+ # T3qExperiment27pastiche-7B
13
+
14
+ T3qExperiment27pastiche-7B is an automated merge created by [Maxime Labonne](https://huggingface.co/mlabonne) using the following configuration.
15
+ * [automerger/Experiment27Pastiche-7B](https://huggingface.co/automerger/Experiment27Pastiche-7B)
16
+
17
+ ## 🧩 Configuration
18
+
19
+ ```yaml
20
+ models:
21
+ - model: chihoonlee10/T3Q-Mistral-Orca-Math-DPO
22
+ # No parameters necessary for base model
23
+ - model: automerger/Experiment27Pastiche-7B
24
+ parameters:
25
+ density: 0.53
26
+ weight: 0.6
27
+ merge_method: dare_ties
28
+ base_model: chihoonlee10/T3Q-Mistral-Orca-Math-DPO
29
+ parameters:
30
+ int8_mask: true
31
+ dtype: bfloat16
32
+ random_seed: 0
33
+ ```
34
+
35
+ ## 💻 Usage
36
+
37
+ ```python
38
+ !pip install -qU transformers accelerate
39
+
40
+ from transformers import AutoTokenizer
41
+ import transformers
42
+ import torch
43
+
44
+ model = "automerger/T3qExperiment27pastiche-7B"
45
+ messages = [{"role": "user", "content": "What is a large language model?"}]
46
+
47
+ tokenizer = AutoTokenizer.from_pretrained(model)
48
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
49
+ pipeline = transformers.pipeline(
50
+ "text-generation",
51
+ model=model,
52
+ torch_dtype=torch.float16,
53
+ device_map="auto",
54
+ )
55
+
56
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
57
+ print(outputs[0]["generated_text"])
58
+ ```