Update README.md
Browse files
README.md
CHANGED
@@ -5,7 +5,6 @@ licence:
|
|
5 |
- MIT
|
6 |
tags:
|
7 |
- galician
|
8 |
-
- bloom
|
9 |
- Cerebras
|
10 |
license: mit
|
11 |
inference:
|
@@ -71,13 +70,13 @@ widget:
|
|
71 |
example_title: O neno
|
72 |
---
|
73 |
|
74 |
-
#
|
75 |
|
76 |
## Table of Contents
|
77 |
<details>
|
78 |
<summary>Click to expand</summary>
|
79 |
|
80 |
-
- [
|
81 |
- [Table of Contents](#table-of-contents)
|
82 |
- [Model description](#model-description)
|
83 |
- [Intended uses and limitations](#intended-uses-and-limitations)
|
@@ -100,12 +99,12 @@ widget:
|
|
100 |
|
101 |
## Model description
|
102 |
|
103 |
-
**
|
104 |
It is the result of a continual pretraining of a [Cerebras-GPT-1.3B](https://huggingface.co/cerebras/Cerebras-GPT-1.3B) adapted to catalan, spanish and english previously by the [AINA Project](https://projecteaina.cat/).
|
105 |
|
106 |
## Intended uses and limitations
|
107 |
|
108 |
-
The **
|
109 |
It can perform text-generation tasks and be fine-tuned for specific scenarios.
|
110 |
|
111 |
## How to use
|
@@ -115,7 +114,7 @@ from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM
|
|
115 |
|
116 |
input_text = "Hoxe fai un bo día. O sol "
|
117 |
|
118 |
-
model_id = "proxectonos/
|
119 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
120 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
121 |
generator = pipeline(
|
@@ -144,10 +143,10 @@ It was trained using HuggingFace Transformers and Pytorch, using the [Causal Mod
|
|
144 |
|
145 |
### Language adaptation and training
|
146 |
|
147 |
-
The language adaptation technique used to train
|
148 |
1) We trained our own BPE tokenizer for galician and replaced the tokenizer and vocabulary of the base model with it.
|
149 |
2) The embeddings corresponding to tokens that are present in both the original and the target vocabulary (matching tokens) were used for initialization.
|
150 |
-
3) The embeddings from tokens not present in
|
151 |
4) The model was initialized with the original weights and with our adapted tokenizer (step 1) and embeddings (steps 2-3).
|
152 |
5) The model was then trained on a galician corpus.
|
153 |
|
@@ -193,4 +192,4 @@ The above copyright notice and this permission notice shall be included in all c
|
|
193 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
194 |
|
195 |
### Funding
|
196 |
-
This research was funded by “The Nós project: Galician in the society and economy of Artificial Intelligence”, resulting from the agreement 2021-CP080 between the Xunta de Galicia and the University of Santiago de Compostela, and thanks to the Investigo program, within the National Recovery, Transformation and Resilience Plan, within the framework of the European Recovery Fund (NextGenerationEU).
|
|
|
5 |
- MIT
|
6 |
tags:
|
7 |
- galician
|
|
|
8 |
- Cerebras
|
9 |
license: mit
|
10 |
inference:
|
|
|
70 |
example_title: O neno
|
71 |
---
|
72 |
|
73 |
+
# Carballo-cerebras-1.3B
|
74 |
|
75 |
## Table of Contents
|
76 |
<details>
|
77 |
<summary>Click to expand</summary>
|
78 |
|
79 |
+
- [Carballo-cerebras-1.3B](#Carballo-cerebras-13B)
|
80 |
- [Table of Contents](#table-of-contents)
|
81 |
- [Model description](#model-description)
|
82 |
- [Intended uses and limitations](#intended-uses-and-limitations)
|
|
|
99 |
|
100 |
## Model description
|
101 |
|
102 |
+
**Carballo-cerebras-1.3BL** is a 1.3B-parameter transformer-based causal language model for Galician.
|
103 |
It is the result of a continual pretraining of a [Cerebras-GPT-1.3B](https://huggingface.co/cerebras/Cerebras-GPT-1.3B) adapted to catalan, spanish and english previously by the [AINA Project](https://projecteaina.cat/).
|
104 |
|
105 |
## Intended uses and limitations
|
106 |
|
107 |
+
The **Carballo-cerebras-1.3BL** model is ready-to-use only for causal language modeling.
|
108 |
It can perform text-generation tasks and be fine-tuned for specific scenarios.
|
109 |
|
110 |
## How to use
|
|
|
114 |
|
115 |
input_text = "Hoxe fai un bo día. O sol "
|
116 |
|
117 |
+
model_id = "proxectonos/Carballo-cerebras-1.3B"
|
118 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
119 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
120 |
generator = pipeline(
|
|
|
143 |
|
144 |
### Language adaptation and training
|
145 |
|
146 |
+
The language adaptation technique used to train Carballo-cerebras-1.3B is based in the used to train FLOR-1.3B, which is explained by their authors in this [Medium Post](https://medium.com/@mpamies247/flor-6-3b-a-chinchilla-compliant-model-for-catalan-spanish-and-english-7cdb389a9aac). In summary, we proceeded as follows:
|
147 |
1) We trained our own BPE tokenizer for galician and replaced the tokenizer and vocabulary of the base model with it.
|
148 |
2) The embeddings corresponding to tokens that are present in both the original and the target vocabulary (matching tokens) were used for initialization.
|
149 |
+
3) The embeddings from tokens not present in Carballo-cerebras-1.3B's original vocabulary were initialized as the average of all embeddings.
|
150 |
4) The model was initialized with the original weights and with our adapted tokenizer (step 1) and embeddings (steps 2-3).
|
151 |
5) The model was then trained on a galician corpus.
|
152 |
|
|
|
192 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
193 |
|
194 |
### Funding
|
195 |
+
This research was funded by “The Nós project: Galician in the society and economy of Artificial Intelligence”, resulting from the agreement 2021-CP080 between the Xunta de Galicia and the University of Santiago de Compostela, and thanks to the Investigo program, within the National Recovery, Transformation and Resilience Plan, within the framework of the European Recovery Fund (NextGenerationEU).
|