gonzalez-agirre commited on
Commit
ffb8213
1 Parent(s): 4810598

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -23
README.md CHANGED
@@ -77,21 +77,16 @@ pipeline_tag: text-generation
77
 
78
  # falcon_7b_balanced_tokenizer_fp16_CPT_open_data_26B_tokens_balanced_es_ca
79
 
80
- ## Overview
81
-
82
- This model is a new result towards the long-run problem of "What is the best strategy for training a model in my language (not English)?"
83
-
84
- This model adapts the [falcon-7b](https://huggingface.co/tiiuae/falcon-7b) to the new target languages Spanish and Catalan by swapping the tokenizer and adjusting the embedding layer before training with 26B tokens in the target languages.
85
 
86
- ## Language Adaptation
87
 
88
- When adapting a model from English to other languages the tokenizer plays a crucial role.
89
 
90
- If the tokenizer does not include the target language in its training data, the resulting model will need many more tokens to perform the same task.
91
- We solve this problem by creating a new tokenizer in the target languages (Spanish and Catalan) and adapting the embedding layer to it.
92
 
93
- ### New Tokenizer
94
- We trained a new BPE Tokenizer for the Catalan and Spanish languages (equal representation). We shuffle a small amount of English in the mixture (since English is in the model training data).
95
  The resulting data has the following language distribution:
96
 
97
  |Language|%|
@@ -100,15 +95,17 @@ The resulting data has the following language distribution:
100
  |Es|41.38%|
101
  |Ca|41.79%|
102
 
103
- *P.D: It was meant to be the same distribution as the model train data (presented in Continual Pre-Training section)*
104
-
105
- This reduces drastically the amount of tokens required to tokenize a text in the target languages (~70 %) while the English tokenization shows a small increase (~115 %).
106
 
107
  ### Embedding Layer Initialization
108
  In order to fully take advantage of the English Pre-Training of the original Falcon model, we decided to re-use the embedding weights of the original model for those tokens shared between the two Tokenizers (the new and the old one). The rest of the embedding weights are initialized as the mean value of the weights of the original Tokenizer.
109
 
110
- ### Continual Pre-Training
111
- Once the model has been successfully initialized, we continue its pre-training in the two target languages: Catalan and Spanish. We also shuffle a small amount of English in order to avoid catastrophic forgetting. The datasets used to train this model follow:
 
 
 
 
112
 
113
  | Dataset | Language | Tokens (pre-epoch) | Epochs |
114
  |---------------------|----------|--------------------|--------------|
@@ -134,20 +131,15 @@ The resulting dataset has the following language distribution:
134
  |Es|41.38%|
135
  |Ca|41.79%|
136
 
137
- ## Model description
138
 
139
- More information needed
140
 
141
  ## Intended uses & limitations
142
 
143
- The model is ready-to-use only for causal language modeling to perform text-generation tasks.
144
- However, it is intended to be fine-tuned on a generative downstream task.
145
 
146
 
147
  ## Limitations and biases
148
- At the time of submission, no measures have been taken to estimate the bias and toxicity embedded in the model.
149
- However, we are well aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources.
150
- We intend to conduct research in these areas in the future, and if completed, this model card will be updated.
151
 
152
  ## Training and evaluation data
153
 
 
77
 
78
  # falcon_7b_balanced_tokenizer_fp16_CPT_open_data_26B_tokens_balanced_es_ca
79
 
80
+ ## Model description
 
 
 
 
81
 
82
+ The **Cǒndor-7B** is a transformer-based causal language model for Catalan, Spanish, and English. It is based on the [Falcon-7B](https://huggingface.co/tiiuae/falcon-7b) model and has been trained on a 26B token trilugual corpus collected from publicly available corpora and crawlers.
83
 
84
+ ## Language adaptation
85
 
86
+ We adapted the original Falcon-7B model to Spanish and Catalan by swapping the tokenizer and adjusting the embedding layer. The adaptation procedure is explained in this [blog](https://medium.com/@mpamies247/ee1ebc70bc79).
 
87
 
88
+ ### New vocabulary
89
+ We trained a new BPE Tokenizer for the Catalan and Spanish languages (equal representation). We shuffled a small amount of English in the mixture (since English is in the model training data).
90
  The resulting data has the following language distribution:
91
 
92
  |Language|%|
 
95
  |Es|41.38%|
96
  |Ca|41.79%|
97
 
98
+ This reduced drastically the number of tokens required to tokenize a text in the target language while the English tokenization shows a small increase.
 
 
99
 
100
  ### Embedding Layer Initialization
101
  In order to fully take advantage of the English Pre-Training of the original Falcon model, we decided to re-use the embedding weights of the original model for those tokens shared between the two Tokenizers (the new and the old one). The rest of the embedding weights are initialized as the mean value of the weights of the original Tokenizer.
102
 
103
+
104
+ ## Training
105
+
106
+ ### Training data
107
+
108
+ Once the model has been successfully initialized, we continue its pre-training in the two target languages: Catalan and Spanish. We also kept a small amount of English in order to avoid catastrophic forgetting. The composition of our 26B token dataset used to train this model is the following:
109
 
110
  | Dataset | Language | Tokens (pre-epoch) | Epochs |
111
  |---------------------|----------|--------------------|--------------|
 
131
  |Es|41.38%|
132
  |Ca|41.79%|
133
 
 
134
 
 
135
 
136
  ## Intended uses & limitations
137
 
138
+ The **Cǒndor-7B** model is ready-to-use only for causal language modeling to perform text-generation tasks. However, it is intended to be fine-tuned on a generative downstream task.
 
139
 
140
 
141
  ## Limitations and biases
142
+ At the time of submission, no measures have been taken to estimate the bias and toxicity embedded in the model. However, we are well aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources. We intend to conduct research in these areas in the future, and if completed, this model card will be updated.
 
 
143
 
144
  ## Training and evaluation data
145