automerger commited on
Commit
28880a1
1 Parent(s): 08fc0cc

Upload folder using huggingface_hub

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