jvaldiviezom
commited on
Commit
•
63c4b4a
1
Parent(s):
c7a9ac8
Update README.md
Browse files
README.md
CHANGED
@@ -1,205 +1,53 @@
|
|
1 |
---
|
2 |
license: mit
|
3 |
-
|
4 |
-
-
|
5 |
-
|
6 |
-
- accuracy
|
7 |
-
library_name: keras
|
8 |
-
tags:
|
9 |
-
- code
|
10 |
-
- education
|
11 |
-
- learning
|
12 |
---
|
13 |
-
#
|
|
|
|
|
|
|
14 |
|
15 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
16 |
|
17 |
-
This
|
18 |
|
19 |
-
##
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
24 |
|
|
|
|
|
25 |
|
|
|
|
|
|
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
- **Model type:** [More Information Needed]
|
30 |
-
- **Language(s) (NLP):** [More Information Needed]
|
31 |
-
- **License:** [More Information Needed]
|
32 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
## Uses
|
43 |
-
|
44 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
45 |
-
|
46 |
-
### Direct Use
|
47 |
-
|
48 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
49 |
-
|
50 |
-
[More Information Needed]
|
51 |
-
|
52 |
-
### Downstream Use [optional]
|
53 |
-
|
54 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
55 |
-
|
56 |
-
[More Information Needed]
|
57 |
-
|
58 |
-
### Out-of-Scope Use
|
59 |
-
|
60 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
61 |
-
|
62 |
-
[More Information Needed]
|
63 |
-
|
64 |
-
## Bias, Risks, and Limitations
|
65 |
-
|
66 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
67 |
-
|
68 |
-
[More Information Needed]
|
69 |
-
|
70 |
-
### Recommendations
|
71 |
-
|
72 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
73 |
-
|
74 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
75 |
-
|
76 |
-
## How to Get Started with the Model
|
77 |
-
|
78 |
-
Use the code below to get started with the model.
|
79 |
-
|
80 |
-
[More Information Needed]
|
81 |
-
|
82 |
-
## Training Details
|
83 |
-
|
84 |
-
### Training Data
|
85 |
-
|
86 |
-
<!-- This should link to a Data 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. -->
|
87 |
-
|
88 |
-
[More Information Needed]
|
89 |
-
|
90 |
-
### Training Procedure
|
91 |
-
|
92 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
93 |
-
|
94 |
-
#### Preprocessing [optional]
|
95 |
-
|
96 |
-
[More Information Needed]
|
97 |
-
|
98 |
-
|
99 |
-
#### Training Hyperparameters
|
100 |
-
|
101 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
102 |
-
|
103 |
-
#### Speeds, Sizes, Times [optional]
|
104 |
-
|
105 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
106 |
-
|
107 |
-
[More Information Needed]
|
108 |
-
|
109 |
-
## Evaluation
|
110 |
-
|
111 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
112 |
-
|
113 |
-
### Testing Data, Factors & Metrics
|
114 |
-
|
115 |
-
#### Testing Data
|
116 |
-
|
117 |
-
<!-- This should link to a Data Card if possible. -->
|
118 |
-
|
119 |
-
[More Information Needed]
|
120 |
-
|
121 |
-
#### Factors
|
122 |
-
|
123 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
124 |
-
|
125 |
-
[More Information Needed]
|
126 |
-
|
127 |
-
#### Metrics
|
128 |
-
|
129 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
130 |
-
|
131 |
-
[More Information Needed]
|
132 |
-
|
133 |
-
### Results
|
134 |
-
|
135 |
-
[More Information Needed]
|
136 |
-
|
137 |
-
#### Summary
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
## Model Examination [optional]
|
142 |
-
|
143 |
-
<!-- Relevant interpretability work for the model goes here -->
|
144 |
-
|
145 |
-
[More Information Needed]
|
146 |
-
|
147 |
-
## Environmental Impact
|
148 |
-
|
149 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
150 |
-
|
151 |
-
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).
|
152 |
-
|
153 |
-
- **Hardware Type:** [More Information Needed]
|
154 |
-
- **Hours used:** [More Information Needed]
|
155 |
-
- **Cloud Provider:** [More Information Needed]
|
156 |
-
- **Compute Region:** [More Information Needed]
|
157 |
-
- **Carbon Emitted:** [More Information Needed]
|
158 |
-
|
159 |
-
## Technical Specifications [optional]
|
160 |
-
|
161 |
-
### Model Architecture and Objective
|
162 |
-
|
163 |
-
[More Information Needed]
|
164 |
-
|
165 |
-
### Compute Infrastructure
|
166 |
-
|
167 |
-
[More Information Needed]
|
168 |
-
|
169 |
-
#### Hardware
|
170 |
-
|
171 |
-
[More Information Needed]
|
172 |
-
|
173 |
-
#### Software
|
174 |
-
|
175 |
-
[More Information Needed]
|
176 |
-
|
177 |
-
## Citation [optional]
|
178 |
-
|
179 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
180 |
-
|
181 |
-
**BibTeX:**
|
182 |
-
|
183 |
-
[More Information Needed]
|
184 |
-
|
185 |
-
**APA:**
|
186 |
-
|
187 |
-
[More Information Needed]
|
188 |
-
|
189 |
-
## Glossary [optional]
|
190 |
-
|
191 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
192 |
-
|
193 |
-
[More Information Needed]
|
194 |
-
|
195 |
-
## More Information [optional]
|
196 |
-
|
197 |
-
[More Information Needed]
|
198 |
-
|
199 |
-
## Model Card Authors [optional]
|
200 |
-
|
201 |
-
[More Information Needed]
|
202 |
-
|
203 |
-
## Model Card Contact
|
204 |
-
|
205 |
-
[More Information Needed]
|
|
|
1 |
---
|
2 |
license: mit
|
3 |
+
datasets:
|
4 |
+
- SkillstechAI/dataset-LMO-chatgpt
|
5 |
+
pipeline_tag: text-generation
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
---
|
7 |
+
# 🦙🧠 Based on Miniguanaco-7b
|
8 |
+
📝 [Article](https://towardsdatascience.com/fine-tune-your-own-llama-2-model-in-a-colab-notebook-df9823a04a32) |
|
9 |
+
💻 [Colab](https://colab.research.google.com/drive/1PEQyJO1-f6j0S_XJ8DV50NkpzasXkrzd?usp=sharing) |
|
10 |
+
📄 [Script](https://gist.github.com/mlabonne/b5718e1b229ce6553564e3f56df72c5c)
|
11 |
|
|
|
12 |
|
13 |
+
This is a `Llama-2-7b-chat-hf` model fine-tuned using QLoRA (4-bit precision) on Skills dataset generated by Zuriel Cevada and Jesus Valdiviezo
|
14 |
|
15 |
+
## 🔧 Training
|
16 |
|
17 |
+
It was trained on a Google Colab notebook with a T4 GPU and high RAM. It is mainly designed for educational purposes, not for inference.
|
18 |
|
19 |
+
## 💻 Usage
|
20 |
|
21 |
+
``` python
|
22 |
+
# pip install transformers accelerate
|
23 |
|
24 |
+
from transformers import AutoTokenizer
|
25 |
+
import transformers
|
26 |
+
import torch
|
27 |
|
28 |
+
model = "mlabonne/llama-2-7b-skills1"
|
29 |
+
prompt = "What is a large language model?"
|
|
|
|
|
|
|
|
|
30 |
|
31 |
+
tokenizer = AutoTokenizer.from_pretrained(model)
|
32 |
+
pipeline = transformers.pipeline(
|
33 |
+
"text-generation",
|
34 |
+
model=model,
|
35 |
+
torch_dtype=torch.float16,
|
36 |
+
device_map="auto",
|
37 |
+
)
|
38 |
|
39 |
+
sequences = pipeline(
|
40 |
+
f'<s>[INST] {prompt} [/INST]',
|
41 |
+
do_sample=True,
|
42 |
+
top_k=10,
|
43 |
+
num_return_sequences=1,
|
44 |
+
eos_token_id=tokenizer.eos_token_id,
|
45 |
+
max_length=200,
|
46 |
+
)
|
47 |
+
for seq in sequences:
|
48 |
+
print(f"Result: {seq['generated_text']}")
|
49 |
+
```
|
50 |
|
51 |
+
Output:
|
52 |
+
> A large language model is trained on massive amounts of text data to understand and generate human language. The model learns by predicting the next word in a sequence based on the context of the previous words. This process allows the language model to learn patterns, rules, and relationships within the language that allow it to generate text that looks and sounds authentic and coherent. These large language models are used for many applications, such as language translation, sentiment analysis, and language generation. These models can also be used to generate text summaries of complex documents, such as legal or scientific papers, or to generate text summaries of social media posts. These models are often used in natural language processing (NLP) and machine learning applications.
|
53 |
+
> The large language models are trained using a large number of parameters, often in the billions or even in the tens of billions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|