Kukedlc commited on
Commit
a07eb60
1 Parent(s): 37bdf66

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +72 -0
README.md CHANGED
@@ -1,3 +1,75 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+ ---
5
+ tags:
6
+ - merge
7
+ - mergekit
8
+ - '#dpo'
9
+ - MaximeLabonne
10
+ - '#mergeofmerge'
11
+ base_model:
12
+ - CultriX/NeuralTrix-7B-dpo
13
+ - paulml/OmniBeagleSquaredMBX-v3-7B-v2
14
+
15
+ license: apache-2.0
16
+ ---
17
+ # This model was merged, trained, and so on, thanks to the knowledge I gained from reading Maxime Labonne's course. Special thanks to him!
18
+ [Labonne LLM Course](https://github.com/mlabonne/llm-course)
19
+
20
+ ![NeuTrixOmniBe](https://raw.githubusercontent.com/kukedlc87/imagenes/main/DALL%C2%B7E%202023-12-29%2002.13.09%20-%20A%20robot%20with%20a%20unique%20design%20where%20its%20face%20is%20a%20screen%20displaying%20binary%20code.%20The%20robot's%20body%20is%20sleek%20and%20modern%2C%20with%20a%20metallic%20finish%20that%20refl.png)
21
+
22
+ # NeuTrixOmniBe-DPO
23
+
24
+ NeuTrix7000-7b-DPO is a merge of the following models using [LazyMergekit](https://colab.research.google.com/drive/1obulZ1ROXHjYLn6PPZJwRR6GzgQogxxb?usp=sharing):
25
+
26
+ ## 🧩 Configuration
27
+
28
+ ```yaml
29
+ MODEL_NAME = "NeuTrix7000-7b-DPO"
30
+ yaml_config = """
31
+ slices:
32
+ - sources:
33
+ - model: CultriX/NeuralTrix-7B-dpo
34
+ layer_range: [0, 32]
35
+ - model: paulml/OmniBeagleSquaredMBX-v3-7B-v2
36
+ layer_range: [0, 32]
37
+ merge_method: slerp
38
+ base_model: CultriX/NeuralTrix-7B-dpo
39
+ parameters:
40
+ t:
41
+ - filter: self_attn
42
+ value: [0, 0.5, 0.3, 0.7, 1]
43
+ - filter: mlp
44
+ value: [1, 0.5, 0.7, 0.3, 0]
45
+ - value: 0.5
46
+ dtype: bfloat16
47
+ """
48
+ ```
49
+
50
+ It was then trained with DPO using:
51
+ * Intel/orca_dpo_pairs
52
+
53
+
54
+
55
+
56
+
57
+ ## 💻 Usage
58
+
59
+ ```python
60
+ !pip install -qU transformers accelerate
61
+ from transformers import AutoTokenizer
62
+ import transformers
63
+ import torch
64
+ model = "Kukedlc/NeuTrix7000-7b-DPO"
65
+ messages = [{"role": "user", "content": "What is a large language model?"}]
66
+ tokenizer = AutoTokenizer.from_pretrained(model)
67
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
68
+ pipeline = transformers.pipeline(
69
+ "text-generation",
70
+ model=model,
71
+ torch_dtype=torch.float16,
72
+ device_map="auto",
73
+ )
74
+ outputs = pipeline(prompt, max_new_tokens=128, do_sample=True, temperature=0.5, top_k=50, top_p=0.95)
75
+ print(outputs[0]["generated_text"])