Rogendo commited on
Commit
b3e2cfe
·
verified ·
1 Parent(s): 7171980

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +206 -1
README.md CHANGED
@@ -9,4 +9,209 @@ metrics:
9
  - accuracy
10
  library_name: transformers
11
  pipeline_tag: translation
12
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  - accuracy
10
  library_name: transformers
11
  pipeline_tag: translation
12
+ ---
13
+
14
+ ---
15
+ license: mit
16
+ datasets:
17
+ - Rogendo/English-Swahili-Sentence-Pairs
18
+ language:
19
+ - en
20
+ - sw
21
+ metrics:
22
+ - accuracy
23
+ library_name: transformers
24
+ ---
25
+
26
+ # Model Card for Rogendo/en-sw model
27
+
28
+ <!-- Provide a quick summary of what the model is/does. -->
29
+
30
+ This is a pre-trained language translation model that aims to create a translation system for English and Swahili lanuages. It is a fine-tuned version of Helsinki-NLP/opus-mt-en-swc on an unknown dataset.
31
+
32
+ ## Model Details
33
+
34
+ - Transformer architecture used
35
+ - Trained on a 210000 corpus pairs
36
+ - Pre-trained Helsinki-NLP/opus-mt-en-swc
37
+ - 2 models to enforce biderectional translation
38
+ ### Model Description
39
+
40
+ <!-- Provide a longer summary of what this model is. -->
41
+
42
+
43
+
44
+ - **Developed by:** Peter Rogendo
45
+ - **Model type:** Transformer
46
+ - **Language(s) (NLP):** Transformer, Pandas, Numpy
47
+ - **License:** Distributed under the MIT License
48
+ - **Finetuned from model [Helsinki-NLP/opus-mt-en-swc]:** This pre-trained model was re-trained on a swahili-english sentence pairs that were collected across Kenya. Swahili is the national language and is among the top three of the most spoken language in Africa. The sentences that were used to train this model were 210000 in total.
49
+
50
+ ### Model Sources [optional]
51
+
52
+ <!-- Provide the basic links for the model. -->
53
+
54
+ - **Repository:** https://github.com/Rogendo/Eng-Swa-Translator
55
+
56
+ ## Uses
57
+
58
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
59
+ This translation model is intended to be used in many cases, from language translators, screen assistants, to even in official cases such as translating legal documents.
60
+
61
+ ### Direct Use
62
+
63
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
64
+ pip install sentencepiece
65
+
66
+
67
+ from transformers import pipeline
68
+ model_checkpoint = "Rogendo/en-sw"
69
+ fine_tuned_model = pipeline("translation", model=model_checkpoint)
70
+
71
+
72
+ fine_tuned_model("Earlier today, I saw her going through the stalls in the market")
73
+
74
+ # Use a pipeline as a high-level helper
75
+
76
+ from transformers import pipeline
77
+
78
+ pipe = pipeline("text2text-generation", model="Rogendo/sw-en")
79
+
80
+ # Load model directly
81
+
82
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
83
+
84
+ tokenizer = AutoTokenizer.from_pretrained("Rogendo/sw-en")
85
+ model = AutoModelForSeq2SeqLM.from_pretrained("Rogendo/sw-en")
86
+
87
+ ### Downstream Use [optional]
88
+
89
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
90
+
91
+ [More Information Needed]
92
+
93
+ ### Out-of-Scope Use
94
+
95
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
96
+
97
+ [More Information Needed]
98
+
99
+ ## Bias, Risks, and Limitations
100
+
101
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
102
+
103
+ [More Information Needed]
104
+
105
+ ### Recommendations
106
+
107
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
108
+
109
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
110
+
111
+ ## How to Get Started with the Model
112
+
113
+ # Use a pipeline as a high-level helper
114
+
115
+ from transformers import pipeline
116
+
117
+ pipe = pipeline("text2text-generation", model="Rogendo/sw-en")
118
+
119
+ # Load model directly
120
+
121
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
122
+
123
+ tokenizer = AutoTokenizer.from_pretrained("Rogendo/sw-en")
124
+ model = AutoModelForSeq2SeqLM.from_pretrained("Rogendo/sw-en")
125
+
126
+
127
+
128
+ ## Training Details
129
+
130
+ ### Training Data
131
+
132
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
133
+ curl -X GET \
134
+ "https://datasets-server.huggingface.co/rows?dataset=Rogendo%2FEnglish-Swahili-Sentence-Pairs&config=default&split=train&offset=0&length=100"
135
+
136
+ View More
137
+ https://huggingface.co/datasets/Rogendo/English-Swahili-Sentence-Pairs
138
+
139
+
140
+
141
+ ### Training Procedure
142
+
143
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
144
+
145
+ #### Preprocessing [optional]
146
+
147
+ [More Information Needed]
148
+
149
+
150
+ #### Training Hyperparameters
151
+
152
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
153
+
154
+ #### Speeds, Sizes, Times [optional]
155
+
156
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
157
+
158
+ [More Information Needed]
159
+
160
+ ## Evaluation
161
+
162
+ <!-- This section describes the evaluation protocols and provides the results. -->
163
+
164
+ ### Testing Data, Factors & Metrics
165
+
166
+ #### Testing Data
167
+
168
+ <!-- This should link to a Dataset Card if possible. -->
169
+
170
+ [More Information Needed]
171
+
172
+ #### Factors
173
+
174
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
175
+
176
+ [More Information Needed]
177
+
178
+ #### Metrics
179
+
180
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
181
+
182
+ [More Information Needed]
183
+
184
+ ### Results
185
+
186
+ [More Information Needed]
187
+
188
+ #### Summary
189
+
190
+
191
+
192
+ ## Model Examination [optional]
193
+
194
+ <!-- Relevant interpretability work for the model goes here -->
195
+
196
+ [More Information Needed]
197
+
198
+ ## Environmental Impact
199
+
200
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
201
+
202
+ 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).
203
+
204
+ - **Hardware Type:** [More Information Needed]
205
+ - **Hours used:** [More Information Needed]
206
+ - **Cloud Provider:** [More Information Needed]
207
+ - **Compute Region:** [More Information Needed]
208
+ - **Carbon Emitted:** [More Information Needed]
209
+
210
+ ## Technical Specifications [optional]
211
+
212
+ ## Model Card Authors [optional]
213
+
214
+ Peter Rogendo
215
+ ## Model Card Contact
216
+
217