mrm8488 commited on
Commit
fba6754
1 Parent(s): fb75879

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -76
README.md CHANGED
@@ -8,9 +8,12 @@ language:
8
  thumbnail: https://huggingface.co/clibrain/lince-zero/resolve/main/LINCE-CLIBRAIN-HD.jpg
9
  pipeline_tag: text-generation
10
  library_name: transformers
 
11
  ---
12
 
13
- **LINCE-ZERO** (Llm for Instructions from Natural Corpus en Español) is a state-of-the-art Spanish instruction-tuned large language model. Developed by [Clibrain](https://www.clibrain.com/), it is a causal decoder-only model with 7B parameters. LINCE-ZERO is based on [Falcon-7B](https://huggingface.co/tiiuae/falcon-7b) and has been fine-tuned using an 80k examples proprietary dataset inspired in famous instruction datasets such as Alpaca and Dolly.
 
 
14
 
15
  The model is released under the Apache 2.0 license.
16
 
@@ -18,6 +21,8 @@ The model is released under the Apache 2.0 license.
18
  <img src="https://huggingface.co/clibrain/lince-zero/resolve/main/LINCE-CLIBRAIN-HD.jpg" alt="lince logo"">
19
  </div>
20
 
 
 
21
  # Table of Contents
22
 
23
  - [Model Details](#model-details)
@@ -30,27 +35,19 @@ The model is released under the Apache 2.0 license.
30
  - [Recommendations](#recommendations)
31
  - [Training Details](#training-details)
32
  - [Training Data](#training-data)
33
- - [Training Procedure](#training-procedure)
34
- - [Preprocessing](#preprocessing)
35
- - [Speeds, Sizes, Times](#speeds-sizes-times)
36
  - [Evaluation](#evaluation)
37
- - [Testing Data, Factors & Metrics](#testing-data-factors--metrics)
38
- - [Testing Data](#testing-data)
39
- - [Factors](#factors)
40
- - [Metrics](#metrics)
41
  - [Results](#results)
42
- - [Model Examination](#model-examination)
43
  - [Environmental Impact](#environmental-impact)
44
  - [Technical Specifications](#technical-specifications)
45
  - [Model Architecture and Objective](#model-architecture-and-objective)
46
  - [Compute Infrastructure](#compute-infrastructure)
47
  - [Hardware](#hardware)
48
  - [Software](#software)
 
49
  - [Citation](#citation)
50
  - [Contact](#contact)
51
- - [How to Get Started with the Model](#how-to-get-started-with-the-model)
52
 
53
- # Model Details
54
 
55
  ## Model Description
56
 
@@ -60,21 +57,19 @@ LINCE-ZERO (Llm for Instructions from Natural Corpus en Español) is a state-of-
60
  - **Model type:** Language model, instruction model, causal decoder-only
61
  - **Language(s) (NLP):** es
62
  - **License:** apache-2.0
63
- - **Parent Model:** [https://huggingface.co/tiiuae/falcon-7b](https://huggingface.co/tiiuae/falcon-7b)
64
 
65
  ## Model Sources
66
 
67
- - **Paper**: Coming soon!
68
- - **Demo**: Coming soon!
69
 
70
- # Uses
71
 
72
  ## Direct Use
73
 
74
  LINCE-ZERO's fine-tuning on an instructions dataset enables it to follow natural language instructions in Spanish. The direct use cases include virtual assistants and content generation.
75
 
76
- Please note that running inference with LINCE-ZERO efficiently requires a minimum of XGB of memory.
77
-
78
  ## Downstream Use
79
 
80
  LINCE-ZERO is an instruct model, it’s primarily intended for direct use and may not be ideal for further fine-tuning. It serves as a general model suitable for a wide range of applications. However, for specific use cases within certain domains, fine-tuning with domain-specific data may improve LINCE-ZERO's performance.
@@ -83,7 +78,7 @@ LINCE-ZERO is an instruct model, it’s primarily intended for direct use and ma
83
 
84
  LINCE-ZERO should not be used for production purposes without conducting a thorough assessment of risks and mitigation strategies.
85
 
86
- # Bias, Risks, and Limitations
87
 
88
  LINCE-ZERO has limitations associated with both the underlying language model and the instruction tuning data. It is crucial to acknowledge that predictions generated by the model may inadvertently exhibit common deficiencies of language models, including hallucination, toxicity, and perpetuate harmful stereotypes across protected classes, identity characteristics, and sensitive, social, and occupational groups.
89
 
@@ -93,47 +88,21 @@ Please, when utilizing LINCE-ZERO, exercise caution and critically assess the ou
93
 
94
  If considering LINCE-ZERO for production use, it is crucial to thoroughly evaluate the associated risks and adopt suitable precautions. Conduct a comprehensive assessment to address any potential biases and ensure compliance with legal and ethical standards.
95
 
96
- # Training Details
97
 
98
  ## Training Data
99
 
100
  LINCE-ZERO is based on **[Falcon-7B](https://huggingface.co/tiiuae/falcon-7b)** and has been fine-tuned using an 80k examples proprietary dataset inspired in famous instruction datasets such as Alpaca and Dolly.
101
 
102
- ## Training Procedure
103
-
104
- For detailed information about the model architecture and compute infrastructure, please refer to the Technical Specifications section.
105
-
106
- ### Preprocessing
107
-
108
- The training data was tokenized using LINCE-ZERO’s tokenizer, which is based on the Falcon-**[7B](https://huggingface.co/tiiuae/falcon-7b)**/**[40B](https://huggingface.co/tiiuae/falcon-40b)** tokenizer.
109
-
110
- ### Training Hyperparameters
111
-
112
- More information needed
113
-
114
- ### Speeds, Sizes, Times
115
 
116
- More information needed (throughput, start/end time, checkpoint size if relevant, etc.)
117
-
118
- # Evaluation
119
-
120
- ## Testing Data, Factors & Metrics
121
-
122
- ### Testing Data
123
-
124
- More information needed
125
-
126
- ### Metrics
127
-
128
- Since LINCE-ZERO is an instruction model, the metrics used to evaluate it are:
129
-
130
- - X: <value>
131
 
132
  ### Results
133
 
134
- Paper coming soon. Meanwhile, check the [OpenLLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard).
135
 
136
- # Technical Specifications
137
 
138
  ## Model Architecture and Objective
139
 
@@ -153,37 +122,27 @@ LINCE-ZERO was trained on AWS SageMaker, on ... GPUs in ... instances.
153
 
154
  ### Software
155
 
156
- More information needed
157
-
158
- # Environmental Impact
159
 
160
- 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).
 
 
 
 
161
 
162
- - **Hardware Type:** More information needed
163
- - **Hours used:** More information needed
164
- - **Cloud Provider:** More information needed
165
- - **Compute Region:** More information needed
166
- - **Carbon Emitted:** More information needed
167
 
168
- # Citation
169
-
170
- There is a paper coming soon! Meanwhile, when using LINCE-ZERO please use the following information to cite:
171
-
172
- ```markdown
173
- @article{lince-zero,
174
- title={{LINCE}: Llm for Instructions from Natural Corpus en Español},
175
- author={},
176
- year={2023}
177
- }
178
- ```
179
-
180
- # Contact
181
 
182
- [contacto@clibrain.com](mailto:contacto@clibrain.com)
 
 
 
 
183
 
184
- # How to Get Started with LINCE-ZERO
185
 
186
- Use the code below to get started with LINCE-ZERO 🔥
187
 
188
  ```py
189
  import torch
@@ -191,7 +150,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, AutoTokenizer
191
 
192
  model_id = "clibrain/lince-zero"
193
 
194
- model = AutoModelForCausalLM.from_pretrained(model_id).to("cuda")
195
  tokenizer = AutoTokenizer.from_pretrained(model_id)
196
 
197
  def create_instruction(instruction, input_data=None, context=None):
@@ -226,7 +185,7 @@ def generate(
226
  ):
227
 
228
  prompt = create_instruction(instruction, input, context)
229
- print(prompt)
230
  inputs = tokenizer(prompt, return_tensors="pt")
231
  input_ids = inputs["input_ids"].to("cuda")
232
  attention_mask = inputs["attention_mask"].to("cuda")
@@ -254,3 +213,19 @@ def generate(
254
  instruction = "Dame una lista de lugares a visitar en España."
255
  print(generate(instruction))
256
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  thumbnail: https://huggingface.co/clibrain/lince-zero/resolve/main/LINCE-CLIBRAIN-HD.jpg
9
  pipeline_tag: text-generation
10
  library_name: transformers
11
+ inference: false
12
  ---
13
 
14
+ **LINCE-ZERO** (Llm for Instructions from Natural Corpus en Español) is a SOTA Spanish instruction-tuned LLM 🔥
15
+
16
+ Developed by [Clibrain](https://www.clibrain.com/), it is a causal decoder-only model with 7B parameters. LINCE-ZERO is based on [Falcon-7B](https://huggingface.co/tiiuae/falcon-7b) and has been fine-tuned using an 80k examples proprietary dataset inspired in famous instruction datasets such as Alpaca and Dolly.
17
 
18
  The model is released under the Apache 2.0 license.
19
 
 
21
  <img src="https://huggingface.co/clibrain/lince-zero/resolve/main/LINCE-CLIBRAIN-HD.jpg" alt="lince logo"">
22
  </div>
23
 
24
+ <br />
25
+
26
  # Table of Contents
27
 
28
  - [Model Details](#model-details)
 
35
  - [Recommendations](#recommendations)
36
  - [Training Details](#training-details)
37
  - [Training Data](#training-data)
 
 
 
38
  - [Evaluation](#evaluation)
 
 
 
 
39
  - [Results](#results)
 
40
  - [Environmental Impact](#environmental-impact)
41
  - [Technical Specifications](#technical-specifications)
42
  - [Model Architecture and Objective](#model-architecture-and-objective)
43
  - [Compute Infrastructure](#compute-infrastructure)
44
  - [Hardware](#hardware)
45
  - [Software](#software)
46
+ - [How to Get Started with the Model](#how-to-get-started-with-the-model)
47
  - [Citation](#citation)
48
  - [Contact](#contact)
 
49
 
50
+ # 🐯 Model Details
51
 
52
  ## Model Description
53
 
 
57
  - **Model type:** Language model, instruction model, causal decoder-only
58
  - **Language(s) (NLP):** es
59
  - **License:** apache-2.0
60
+ - **Parent Model:** https://huggingface.co/tiiuae/falcon-7b
61
 
62
  ## Model Sources
63
 
64
+ - **Paper**: Coming soon!
65
+ - **Demo**: Coming soon!
66
 
67
+ # 💡 Uses
68
 
69
  ## Direct Use
70
 
71
  LINCE-ZERO's fine-tuning on an instructions dataset enables it to follow natural language instructions in Spanish. The direct use cases include virtual assistants and content generation.
72
 
 
 
73
  ## Downstream Use
74
 
75
  LINCE-ZERO is an instruct model, it’s primarily intended for direct use and may not be ideal for further fine-tuning. It serves as a general model suitable for a wide range of applications. However, for specific use cases within certain domains, fine-tuning with domain-specific data may improve LINCE-ZERO's performance.
 
78
 
79
  LINCE-ZERO should not be used for production purposes without conducting a thorough assessment of risks and mitigation strategies.
80
 
81
+ # ⚠️ Bias, Risks, and Limitations
82
 
83
  LINCE-ZERO has limitations associated with both the underlying language model and the instruction tuning data. It is crucial to acknowledge that predictions generated by the model may inadvertently exhibit common deficiencies of language models, including hallucination, toxicity, and perpetuate harmful stereotypes across protected classes, identity characteristics, and sensitive, social, and occupational groups.
84
 
 
88
 
89
  If considering LINCE-ZERO for production use, it is crucial to thoroughly evaluate the associated risks and adopt suitable precautions. Conduct a comprehensive assessment to address any potential biases and ensure compliance with legal and ethical standards.
90
 
91
+ # 📚 Training Details
92
 
93
  ## Training Data
94
 
95
  LINCE-ZERO is based on **[Falcon-7B](https://huggingface.co/tiiuae/falcon-7b)** and has been fine-tuned using an 80k examples proprietary dataset inspired in famous instruction datasets such as Alpaca and Dolly.
96
 
97
+ # Evaluation
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
+ We are evaluating the model and will publish the results soon.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
 
101
  ### Results
102
 
103
+ Paper coming soon! Meanwhile, check the [OpenLLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard).
104
 
105
+ # ⚙️ Technical Specifications
106
 
107
  ## Model Architecture and Objective
108
 
 
122
 
123
  ### Software
124
 
125
+ We used the following libraries:
 
 
126
 
127
+ - transformers
128
+ - accelerate
129
+ - peft
130
+ - bitsandbytes
131
+ - einops
132
 
133
+ # 🌳 Environmental Impact
 
 
 
 
134
 
135
+ 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).
 
 
 
 
 
 
 
 
 
 
 
 
136
 
137
+ - **Hardware Type:** 1 X A100 - 40 GB
138
+ - **Hours used:** 8
139
+ - **Cloud Provider:** Google
140
+ - **Compute Region:** Europe
141
+ - **Carbon Emitted:** 250W x 10h = 2.5 kWh x 0.57 kg eq. CO2/kWh = 1.42 kg eq. CO2
142
 
143
+ # 🔥 How to Get Started with LINCE-ZERO
144
 
145
+ Use the code below to get started with LINCE-ZERO!
146
 
147
  ```py
148
  import torch
 
150
 
151
  model_id = "clibrain/lince-zero"
152
 
153
+ model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True).to("cuda")
154
  tokenizer = AutoTokenizer.from_pretrained(model_id)
155
 
156
  def create_instruction(instruction, input_data=None, context=None):
 
185
  ):
186
 
187
  prompt = create_instruction(instruction, input, context)
188
+ print(prompt.replace("### Respuesta:\n", "")
189
  inputs = tokenizer(prompt, return_tensors="pt")
190
  input_ids = inputs["input_ids"].to("cuda")
191
  attention_mask = inputs["attention_mask"].to("cuda")
 
213
  instruction = "Dame una lista de lugares a visitar en España."
214
  print(generate(instruction))
215
  ```
216
+
217
+ # 📝 Citation
218
+
219
+ There is a paper coming soon! Meanwhile, when using LINCE-ZERO please use the following information to cite:
220
+
221
+ ```markdown
222
+ @article{lince-zero,
223
+ title={{LINCE-ZERO}: Llm for Instructions from Natural Corpus en Español},
224
+ author={clibrain.com},
225
+ year={2023}
226
+ }
227
+ ```
228
+
229
+ # 📧 Contact
230
+
231
+ [contacto@clibrain.com](mailto:contacto@clibrain.com)