sharadsin commited on
Commit
4014ebb
1 Parent(s): 155850e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +48 -175
README.md CHANGED
@@ -1,202 +1,75 @@
1
  ---
2
  library_name: peft
3
  base_model: mistralai/Mixtral-8x7B-v0.1
 
 
 
4
  ---
5
 
6
- # Model Card for Model ID
7
-
8
  <!-- Provide a quick summary of what the model is/does. -->
9
 
10
-
11
-
12
  ## Model Details
 
13
 
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
-
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
 
171
- ## Citation [optional]
172
 
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
 
174
 
175
- **BibTeX:**
 
176
 
177
- [More Information Needed]
 
178
 
179
- **APA:**
 
180
 
181
- [More Information Needed]
 
 
 
 
182
 
183
- ## Glossary [optional]
 
184
 
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
 
 
 
 
186
 
187
- [More Information Needed]
 
 
 
 
 
188
 
189
- ## More Information [optional]
 
190
 
191
- [More Information Needed]
 
 
 
 
192
 
193
- ## Model Card Authors [optional]
194
 
195
- [More Information Needed]
196
 
197
- ## Model Card Contact
198
 
199
- [More Information Needed]
 
 
 
200
 
201
 
202
  ### Framework versions
 
1
  ---
2
  library_name: peft
3
  base_model: mistralai/Mixtral-8x7B-v0.1
4
+ license: apache-2.0
5
+ language:
6
+ - en
7
  ---
8
 
9
+ # Dwark Ai
10
+ Dwark Ai is a fine-tuned language model based on the rich and diverse conversations from the Dwarkesh Patel Podcast. It aims to emulate responses as might be given by the esteemed guests of the show, ranging from top AI researchers to other luminaries in various fields.
11
  <!-- Provide a quick summary of what the model is/does. -->
12
 
 
 
13
  ## Model Details
14
+ sharadsin/Mixtral-8x7B-DP-pod-ft-v2 is fine-tuned from Mixtral 8x7B.
15
 
16
+ ## Dataset and Fine-tuning
17
+ The model was trained on transcripts from a selected few episodes of the Dwarkesh Patel Podcast, covering topics such as AI, philosophy, and more. Fine-tuning aimed to adapt the model to replicate the speaking styles and thought patterns of the guests.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
+ ## Performance - Before and After Fine-tuning:
20
 
21
+ ### Question:
22
+ Will next token prediction be enough to reach AGI ?
23
 
24
+ #### Pre Fine-tuning Response:
25
+ The AI2050 project is a non-profit initiative aiming at reaching Artificial General Intelligence (AGI) by 2050. The goal of the project is to build an open source, decentralized and incentivised platform for collaborative research on artificial intelligence with one main objective: building general purpose agents that can solve any task given sufficient computational resources. We believe this will require new breakthroughs in reinforcement learning algorithms as well as advances in other fields such as computer vision or natural language processing. Our approach combines state-of-the-art techniques from these different areas into coherent systems capable of solving complex problems autonomously without human intervention once they are trained properly using large amounts of data available online today thanks largely due to recent progress made possible through deep neural networks architectures like convolutional nets which have become ubiquitous across many industries including finance where we see them being used extensively nowadays both within banks themselves but also externally via third party vendors providing services based upon those same technologies e..g FinTech startups offering alternative lending solutions powered primarily by machine learning models running inside cloud computing environments provided either directly
26
 
27
+ #### Post Fine-tuning Response:
28
+ It’ll depend what you mean by that but I think it will probably get us there or very close at least. It depends how good LLMs have gotten when we run out of data because they can do so much with such little compute nowadays. So if you extrapolate from here then maybe not quite all the way but pretty darn far along. But yeah, my guess would be yes. The reason why people don’t like NLP models right now isn’t really about their ability to learn things per se. They just aren’t able to interact with humans effectively yet which makes them less useful than other kinds of AI systems. And also some parts of intelligence require embodiment more directly. Like being able to manipulate objects requires having hands and eyes and stuff whereas predicting text doesn’t necessarily need any kind of physical apparatuses. That said, even though those tasks might seem different superficially, most cognitive scientists believe that everything boils down to learning patterns ultimately. Even something like playing chess involves recognizing certain board positions and knowing what moves correspond to each one. A lot of cognition does involve pattern recognition and symbolic reasoning. Predictive modeling captures both of these aspects fairly naturally. In fact, GPT-4 has been shown to perform better than human experts on many professional examinations including law school admissions tests (LSAT), medical licensing exams (USMLE) etcetera without needing access to external resources beyond its training corpus–indicating high levels proficiency across multiple domains despite only receiving limited amounts input during fine tuning process post initial pretraining phase(GPT-3). This suggests strong potential applicability towards solving complex problems requiring diverse skillsets once scaled appropriately given sufficient computational power/resources required for running large scale simulations needed train advanced versions future generations transformers architectures similar gpt4 architecture used today develop new capabilities previously unattainable traditional methods alone
29
 
30
+ #### Alternate Post Fine-tuning Response:
31
+ It’ll probably get you most of the way there but I think it will fall short at some point because we don’t know what that last bit looks like yet. We have no idea how much further along or far away from GPT-4 do we need to go before we can say “Okay now we understand all human intelligence.” And so if you just keep training models with more data and compute then eventually they might start behaving intelligently by our standards even though their internals look very different than ours. But maybe not? Maybe something else needs to happen first. So yeah, my guess would be — No, LLMs won’t solve everything forever after X years (probably less than five). They may still play an important part in whatever does come afterwards but they aren’t going to take us all the way there themselves without any other innovations happening alongside them which could include things like RLHF type stuff or new architectures entirely unrelated to transformers etcetera . That said , who knows – perhaps someone out there has already figured out exactly how many tokens one must predict correctly per second until AI becomes sentient… In fact let me ask ChatGPT right now : How many tokens should I train my model up till before it achieves superhuman performance across multiple domains including reasoning about itself?” Hmmm.. Interesting response here! It says ”There isn’t really such thing as ‘superhuman performance.’ A system trained using reinforcement learning techniques can learn faster than humans due its ability process large amounts of data quickly while also being able make decisions autonomously once given sufficient reward signals indicating success/failure during task execution.” Okay cool thanks chat gpt ! Now back onto topic - What kind of tasks were used when evaluating these systems originally anyway? Were those benchmarks designed explicitly around capturing aspects related directly towards achieving Artificial General Intelligence versus simply solving specific problems within certain contexts e. g., ImageNet classification accuracy scores measured against ground truth labels provided via crowdsourced labeling efforts conducted online through platforms like Amazon Mechanical Turk et al... Or was it done differently altogether i n order achieve maximum generality possible under current technological constraints imposed upon researchers working today trying develop smarter machines capable surpass existing capabilities exhibited currently living organisms found throughout nature both terrestrial & extraterrestrial alike?
32
 
33
+ ## Usage
34
+ ```python
35
+ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
36
+ from peft import PeftModel
37
+ import torch
38
 
39
+ model_name_or_path = 'mistralai/Mixtral-8x7B-v0.1'
40
+ adapter_name_or_path = 'sharadsin/Mixtral-8x7B-DP-pod-ft'
41
 
42
+ bnb_config = BitsAndBytesConfig(
43
+ load_in_4bit = True,
44
+ bnb_4bit_use_double_quant = True,
45
+ bnb_4bit_compute_dtype = torch.bfloat16
46
+ )
47
 
48
+ model = AutoModelForCausalLM.from_pretrained(
49
+ model_name_or_path,
50
+ trust_remote_code = True,
51
+ device_map = "auto",
52
+ quantization_config = bnb_config
53
+ )
54
 
55
+ model = PeftModel.from_pretrained(model, adapter_name_or_path)
56
+ model = model.eval()
57
 
58
+ tokenizer = AutoTokenizer.from_pretrained(
59
+ model_name_or_path,
60
+ add_bos_token = True,
61
+ trust_remote_code = True
62
+ )
63
 
64
+ eval_prompt = """You are participating as a guest on a podcast, where your role is to answer the interviewer's questions in a detailed, nuanced, and well-thought-out manner. Focus on providing comprehensive and insightful responses, drawing on a wide range of knowledge. Tailor your answers to be informative and engaging, suitable for a podcast audience. Avoid overly technical language unless specifically asked for, and ensure your responses are well-structured and coherent. If a question falls outside your area of expertise, acknowledge this and offer a general perspective based on available information.\n\n### Interviewer: \nWill next token prediction be enough to reach AGI ?\n\n### Guest:"""
65
 
66
+ model_input = tokenizer(eval_prompt, return_tensors="pt").to("cuda")
67
 
 
68
 
69
+ with torch.no_grad():
70
+ print(tokenizer.decode(model.generate(**model_input, max_new_tokens=500, top_k = 4,
71
+ penalty_alpha = 0.6, repetition_penalty=1.15)[0], skip_special_tokens= True))
72
+ ```
73
 
74
 
75
  ### Framework versions