gate369 commited on
Commit
bddcb5f
·
verified ·
1 Parent(s): 891221d

Upload folder using huggingface_hub

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