avacaondata commited on
Commit
0fe7255
1 Parent(s): 413fc36

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +163 -11
README.md CHANGED
@@ -1,22 +1,174 @@
1
  ---
2
- base_model: avacaondata/qwen2-1.5b-instruct-es
3
- language:
4
- - en
5
  license: apache-2.0
6
  tags:
7
  - text-generation-inference
8
  - transformers
9
- - unsloth
10
  - qwen2
11
- - trl
 
 
 
 
12
  ---
13
 
14
- # Uploaded model
15
 
16
- - **Developed by:** avacaondata
17
- - **License:** apache-2.0
18
- - **Finetuned from model :** avacaondata/qwen2-1.5b-instruct-es
19
 
20
- This qwen2 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
21
 
22
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language: es
 
 
3
  license: apache-2.0
4
  tags:
5
  - text-generation-inference
6
  - transformers
 
7
  - qwen2
8
+ - chat
9
+ - qa
10
+ - multi-task-learning
11
+ - instruction-tuning
12
+ base_model: Qwen/Qwen2-1.5B
13
  ---
14
 
 
15
 
16
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61f333df8f26cc42dc587011/KX0yrpzeH2x3M4FWyx40Y.png)
 
 
17
 
18
+ # Chat & Instructions 1.5B LLM by LenguajeNatural.AI | Modelo LenguajeNatural.AI Chat e Instrucciones 1.5B
19
 
20
+ ## Developed by LenguajeNatural.AI
21
+
22
+ This model has been developed by [**LenguajeNatural.AI**](https://lenguajenatural.ai/), with the aim of providing the Spanish-speaking community with advanced tools for text generation, chat, and instructions.
23
+ It is the second released model of the LeNIA series, significantly outperforming the first one, being also smaller (1.5B vs 2B) and with a larger sequence size (32K vs 8K).
24
+
25
+ ### Technical Details
26
+
27
+ - Maximum Sequence Length: 32K
28
+ - Model Size: 1.5B parameters
29
+ - Architecture: Qwen2
30
+ - Trained in 3 steps:
31
+ - Domain Flan-style adaptation to Spanish: Massive Spanish instruction tuning
32
+ - High Quality Spanish Instruction Tuning
33
+ - Chat-Abstractive QA Fine-Tuning
34
+
35
+ ## Desarrollado por LenguajeNatural.AI
36
+
37
+ Este modelo ha sido desarrollado por [**LenguajeNatural.AI**](https://lenguajenatural.ai/), con el objetivo de proporcionar a la comunidad de habla hispana herramientas avanzadas para la generación de texto, chat e instrucciones.
38
+ Es el segundo modelo liberado de la saga LeNIA, superando con bastante margen el rendimiento del primero de ellos, siendo además más pequeño (1.5B vs 2B) y con mayor tamaño de secuencia (32K vs 8K).
39
+
40
+ ## License
41
+
42
+ This model is distributed under Apache 2.0. License.
43
+
44
+ ## Licencia
45
+
46
+ Este modelo se distribuye bajo la licencia Apache 2.0.
47
+
48
+ ## Base Model
49
+
50
+ This model has been fine-tuned from Qwen/Qwen2-1.5B, incorporating advanced features for better text generation and understanding in Spanish chat and instruction tasks.
51
+
52
+ ## Modelo Base
53
+
54
+ Este modelo se ha afinado a partir de `Qwen/Qwen2-1.5B`, incorporando características avanzadas para una mejor generación de texto y comprensión en tareas de chat e instrucciones en español.
55
+
56
+ ## Language
57
+
58
+ The model has been trained exclusively in Spanish, with the aim of maximizing its effectiveness in applications intended for Spanish-speaking users.
59
+
60
+ ## Idioma
61
+
62
+ El modelo ha sido entrenado exclusivamente en español, con el objetivo de maximizar su efectividad en aplicaciones destinadas a usuarios de habla hispana.
63
+
64
+ ## Training
65
+
66
+ The model has been trained in three distinct phases to ensure good performance across a wide range of tasks:
67
+
68
+ 1. **Multi-task learning in Spanish**: Using multiple supervised datasets for FLAN-style training.
69
+ 2. **High-quality instruction training**: Fine-tuning the model to understand and generate responses to complex instructions.
70
+ 3. **Chat and abstractive QA training**: Optimizing the model for smooth conversations and generating answers to abstract questions.
71
+
72
+ In all three phases, training was carried out thanks to our library [autotransformers](https://github.com/lenguajenatural-ai/autotransformers).
73
+
74
+ ## Entrenamiento
75
+
76
+ El modelo se ha entrenado en tres fases distintas para asegurar un buen rendimiento en una amplia gama de tareas:
77
+
78
+ 1. **Aprendizaje multi-tarea en español**: Utilizando múltiples conjuntos de datos supervisados para un entrenamiento al estilo FLAN.
79
+ 2. **Entrenamiento de instrucciones de alta calidad**: Afinando el modelo para entender y generar respuestas a instrucciones complejas.
80
+ 3. **Entrenamiento de chat y QA abstractivo**: Optimizando el modelo para conversaciones fluidas y la generación de respuestas a preguntas abstractas.
81
+
82
+ En las 3 fases se ha llevado a cabo el entrenamiento gracias a nuestra librería [autotransformers](https://github.com/lenguajenatural-ai/autotransformers).
83
+
84
+
85
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61f333df8f26cc42dc587011/LbzqllY6iX7IHhqXx4qeA.png)
86
+
87
+ ## Maximum Sequence Length
88
+
89
+ The maximum sequence length for this model is 32768 tokens, 4x more than the previous LeNIA-Chat version.
90
+
91
+ ## Tamaño máximo de secuencia
92
+
93
+ El tamaño máximo de secuencia para este modelo es de 8192 tokens, 4 veces más que la versión anterior de LeNIA-Chat.
94
+
95
+ ## Usage and Limitations
96
+
97
+ This model is designed to be used in text generation applications, chatbots, and virtual assistants in Spanish. Although it has been trained to minimize biases and errors, we recommend evaluating its performance in its specific context of use. Users should be aware of the inherent limitations of language models and use this model responsibly.
98
+ Additionally, it should be noted that the base model is only 1.5B parameters, so this model shares the inherent limitations of models of that size.
99
+
100
+ ## Usos y Limitaciones
101
+
102
+ Este modelo está diseñado para ser utilizado en aplicaciones de generación de texto, chatbots, y asistentes virtuales en español. Aunque ha sido entrenado para minimizar sesgos y errores, recomendamos evaluar su desempeño en su contexto específico de uso. Los usuarios deben ser conscientes de las limitaciones inherentes a los modelos de lenguaje y utilizar este modelo de manera responsable.
103
+ Además, debe tenerse en cuenta que el modelo base es de únicamente 1.5b parámetros, por lo que este modelo comparte las limitaciones inherentes a los modelos de ese tamaño.
104
+
105
+ ## How to start?
106
+
107
+ You can start using this model through the Hugging Face API or integrate it into your applications using the transformers library. Here is an example of how to load the model:
108
+
109
+ ```python
110
+ from transformers import AutoModelForCausalLM, AutoTokenizer
111
+ import torch
112
+
113
+ model_name = "LenguajeNaturalAI/leniachat-gemma-2b-v0"
114
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
115
+ model = AutoModelForCausalLM.from_pretrained(model_name)
116
+
117
+ # Generar texto
118
+ messages = [
119
+ {"role": "system", "content": "Eres un asistente que ayuda al usuario a lo largo de la conversación resolviendo sus dudas."},
120
+ {"role": "user", "content": "¿Qué fue la revolución industrial?"}
121
+ ]
122
+ input_ids = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt")
123
+ with torch.no_grad():
124
+ output = model.generate(input_ids, max_new_tokens=50)
125
+ print(tokenizer.decode(output[0], skip_special_tokens=True))
126
+ ```
127
+
128
+
129
+ ## ¿Cómo empezar?
130
+
131
+ Puedes empezar a utilizar este modelo a través de la API de Hugging Face o integrarlo en tus aplicaciones utilizando la biblioteca `transformers`. Aquí tienes un ejemplo de cómo cargar el modelo:
132
+
133
+ ```python
134
+ from transformers import AutoModelForCausalLM, AutoTokenizer
135
+ import torch
136
+
137
+ model_name = "LenguajeNaturalAI/leniachat-gemma-2b-v0"
138
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
139
+ model = AutoModelForCausalLM.from_pretrained(model_name)
140
+
141
+ # Generar texto
142
+ messages = [
143
+ {"role": "system", "content": "Eres un asistente que ayuda al usuario a lo largo de la conversación resolviendo sus dudas."},
144
+ {"role": "user", "content": "¿Qué fue la revolución industrial?"}
145
+ ]
146
+ input_ids = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt")
147
+ with torch.no_grad():
148
+ output = model.generate(input_ids, max_new_tokens=50)
149
+ print(tokenizer.decode(output[0], skip_special_tokens=True))
150
+ ```
151
+
152
+ ## Evaluation
153
+
154
+ To ensure the quality of the model, an extensive evaluation has been carried out on several datasets, showing significant performance in text generation and understanding instructions in Spanish. The specific details of the evaluation of the LeNIA-Chat models are available in the following table.
155
+
156
+ ## Evaluación
157
+
158
+ Para asegurar la calidad del modelo, se ha realizado una evaluación exhaustiva en varios conjuntos de datos, mostrando un rendimiento significativo en la generación de texto y la comprensión de instrucciones en español. Los detalles específicos de la evaluación de los modelos LeNIA-Chat están disponibles en la siguiente tabla.
159
+
160
+
161
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61f333df8f26cc42dc587011/V4pAiSeaj3-vKhuba9dPZ.png)
162
+
163
+ ## Contributions and Future Versions
164
+
165
+ We encourage the community to help to build better LLMs in Spanish by providing suggestions or feedback to improve the model. Collaboration is fundamental for AI advancements, specially to make it accessible and ethical.
166
+
167
+ We plan to keep on improving this model and launch future versions with advanced capabilities. Stay tuned to our updates through our [webpage](https://lenguajenatural.ai/) or our [LinkedIn page](https://www.linkedin.com/company/lenguajenatural-ai/)
168
+
169
+
170
+ ## Contribuciones
171
+ Animamos a la comunidad a contribuir con retroalimentación, sugerencias, y mejoras para este modelo. La colaboración es fundamental para el avance de la inteligencia artificial accesible y ética.
172
+
173
+ ## Futuras Versiones
174
+ Planeamos continuar mejorando este modelo y lanzar versiones futuras con capacidades ampliadas. Mantente atento a nuestras actualizaciones. Puedes estar al tanto en nuestra [página web](https://lenguajenatural.ai/) o nuestra [página de LinkedIn](https://www.linkedin.com/company/lenguajenatural-ai/).