JoPmt commited on
Commit
181c3da
1 Parent(s): 047c6e7

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +57 -0
README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - merge
4
+ - mergekit
5
+ - lazymergekit
6
+ - harborwater/open-llama-3b-v2-wizard-evol-instuct-v2-196k
7
+ base_model:
8
+ - harborwater/open-llama-3b-v2-wizard-evol-instuct-v2-196k
9
+ ---
10
+
11
+ # Wooly-Llama-3B-code-instruct-Ties
12
+
13
+ Wooly-Llama-3B-code-instruct-Ties is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
14
+ * [harborwater/open-llama-3b-v2-wizard-evol-instuct-v2-196k](https://huggingface.co/harborwater/open-llama-3b-v2-wizard-evol-instuct-v2-196k)
15
+
16
+ ## 🧩 Configuration
17
+
18
+ ```yaml
19
+ dtype: bfloat16
20
+ merge_method: ties
21
+ slices:
22
+ - sources:
23
+ - layer_range: [0, 32]
24
+ model: harborwater/open-llama-3b-v2-wizard-evol-instuct-v2-196k
25
+ parameters:
26
+ weight: 0.5
27
+ - layer_range: [0, 32]
28
+ model: mwitiderrick/open_llama_3b_code_instruct_0.1
29
+ parameters:
30
+ weight: 0.5
31
+
32
+ ```
33
+
34
+ ## 💻 Usage
35
+
36
+ ```python
37
+ !pip install -qU transformers accelerate
38
+
39
+ from transformers import AutoTokenizer
40
+ import transformers
41
+ import torch
42
+
43
+ model = "JoPmt/Wooly-Llama-3B-code-instruct-Ties"
44
+ messages = [{"role": "user", "content": "What is a large language model?"}]
45
+
46
+ tokenizer = AutoTokenizer.from_pretrained(model)
47
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
48
+ pipeline = transformers.pipeline(
49
+ "text-generation",
50
+ model=model,
51
+ torch_dtype=torch.float16,
52
+ device_map="auto",
53
+ )
54
+
55
+ outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
56
+ print(outputs[0]["generated_text"])
57
+ ```