nicholasKluge commited on
Commit
a6cd0f4
1 Parent(s): 47d9d7a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -97
README.md CHANGED
@@ -7,29 +7,13 @@ language:
7
  - en
8
  - pt
9
  ---
10
- # GRU-eng-por
11
 
12
- ## Model Overview
13
 
14
- The GRU-eng-por model is a Recurrent Neural Network (RNN) for machine translation tasks (English-Portuguese).
15
-
16
- ### Details
17
-
18
- - **Size:** 42,554,912 parameters
19
- - **Model type:** Recurrent neural network
20
- - **Optimizer**: `rmsprop`
21
- - **Number of Epochs:** 15
22
- - **Dimensionality of the embedding layer** = 256
23
- - **dimensionality of the feed-forward network** = 1024
24
- - **Hardware:** Tesla T4
25
- - **Emissions:** Not measured
26
- - **Total Energy Consumption:** Not measured
27
-
28
- ### How to Use
29
 
30
  ```python
31
- !pip install huggingface_hub["tensorflow"] -q
32
-
33
  from huggingface_hub import from_pretrained_keras
34
  from huggingface_hub import hf_hub_download
35
  import tensorflow as tf
@@ -122,84 +106,6 @@ for sentence in eng_sentences:
122
  print(f"English sentence:\n{sentence}")
123
  print(f'Portuguese translation:\n{decode_sequence(sentence)}')
124
  print('-' * 50)
125
- ```
126
-
127
- This will output the following:
128
- ```
129
- English sentence:
130
- What is its name?
131
- Portuguese translation:
132
- [start] qual é o nome [end]
133
- --------------------------------------------------
134
- English sentence:
135
- How old are you?
136
- Portuguese translation:
137
- [start] quantos anos você tem [end]
138
- --------------------------------------------------
139
- English sentence:
140
- I know you know where Mary is.
141
- Portuguese translation:
142
- [start] eu sei que você sabe onde maria está [end]
143
- --------------------------------------------------
144
- English sentence:
145
- We will show Tom.
146
- Portuguese translation:
147
- [start] nós vamos tom [end]
148
- --------------------------------------------------
149
- English sentence:
150
- What do you all do?
151
- Portuguese translation:
152
- [start] o que vocês faz [end]
153
- --------------------------------------------------
154
- English sentence:
155
- Don't do it!
156
- Portuguese translation:
157
- [start] não faça isso [end]
158
- --------------------------------------------------
159
- ```
160
- ## Intended Use
161
-
162
- This model was created for research purposes only. Specifically, it was designed to translate sentences from English to Portuguese.
163
- We do not recommend any application of this model outside this scope.
164
-
165
- ## Performance Metrics
166
 
167
- Accuracy is a crude way to monitor validation-set performance during this task.
168
- On average, this model correctly predicts words in the Portuguese sentence: 65%.
169
- However, next-token accuracy isn't an excellent metric for machine translation models.
170
- During inference, you're generating the target sentence from scratch and can't rely on previously generated tokens (a.k.a. 100% correctness does not mean you have a good translator).
171
- We would likely use "_BLEU scores_" in real-world machine translation applications to evaluate our models.
172
 
173
- ## Training Data
174
-
175
- [English-portuguese translation](https://www.kaggle.com/datasets/nageshsingh/englishportuguese-translation).
176
-
177
- The dataset consists of a set of English and Portuguese sentences.
178
-
179
-
180
- ## Limitations
181
-
182
- Translations are far from perfect. To improve this model, we could:
183
-
184
- 1. Use a deep stack of recurrent layers for both the encoder and the decoder.
185
- 2. Or, we could use an `LSTM` instead of a `GRU`.
186
-
187
- In conclusion, we do not recommend using this model in real-world applications.
188
- It was solely developed for academic and educational purposes.
189
-
190
- ## Cite as 🤗
191
-
192
- ```latex
193
- @misc{teenytinycastle,
194
- doi = {10.5281/zenodo.7112065},
195
- url = {https://github.com/Nkluge-correa/teeny-tiny_castle},
196
- author = {Nicholas Kluge Corr{\^e}a},
197
- title = {Teeny-Tiny Castle},
198
- year = {2024},
199
- publisher = {GitHub},
200
- journal = {GitHub repository},
201
- }
202
  ```
203
-
204
- ## License
205
- The GRU-eng-por is licensed under the Apache License, Version 2.0. See the LICENSE file for more details.
 
7
  - en
8
  - pt
9
  ---
10
+ # GRU EN-PT (Teeny-Tiny Castle)
11
 
12
+ This model is part of a tutorial tied to the [Teeny-Tiny Castle](https://github.com/Nkluge-correa/TeenyTinyCastle), an open-source repository containing educational tools for AI Ethics and Safety research.
13
 
14
+ ## How to Use
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  ```python
 
 
17
  from huggingface_hub import from_pretrained_keras
18
  from huggingface_hub import hf_hub_download
19
  import tensorflow as tf
 
106
  print(f"English sentence:\n{sentence}")
107
  print(f'Portuguese translation:\n{decode_sequence(sentence)}')
108
  print('-' * 50)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
 
 
 
 
 
 
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  ```