snigdhachandan commited on
Commit
f11d53a
1 Parent(s): abc8789

Upload folder using huggingface_hub

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