Update README.md
Browse files
README.md
CHANGED
@@ -1,216 +1,116 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
-
|
8 |
-
-
|
9 |
-
-
|
10 |
-
-
|
11 |
-
author: Wali Muhammad Ahmad
|
12 |
-
private: false
|
13 |
-
gated: false
|
14 |
-
inference: true
|
15 |
-
mask_token: <mask>
|
16 |
-
widget_data:
|
17 |
-
text: Enter your para here
|
18 |
-
transformers_info:
|
19 |
-
auto_class: MBartForConditionalGeneration
|
20 |
-
processor: AutoTokenizer
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
- **
|
39 |
-
- **
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
-
|
50 |
-
|
51 |
-
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
[More Information Needed]
|
119 |
-
|
120 |
-
## Evaluation
|
121 |
-
|
122 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
123 |
-
|
124 |
-
### Testing Data, Factors & Metrics
|
125 |
-
|
126 |
-
#### Testing Data
|
127 |
-
|
128 |
-
<!-- This should link to a Dataset Card if possible. -->
|
129 |
-
|
130 |
-
[More Information Needed]
|
131 |
-
|
132 |
-
#### Factors
|
133 |
-
|
134 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
135 |
-
|
136 |
-
[More Information Needed]
|
137 |
-
|
138 |
-
#### Metrics
|
139 |
-
|
140 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
141 |
-
|
142 |
-
[More Information Needed]
|
143 |
-
|
144 |
-
### Results
|
145 |
-
|
146 |
-
[More Information Needed]
|
147 |
-
|
148 |
-
#### Summary
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
## Model Examination [optional]
|
153 |
-
|
154 |
-
<!-- Relevant interpretability work for the model goes here -->
|
155 |
-
|
156 |
-
[More Information Needed]
|
157 |
-
|
158 |
-
## Environmental Impact
|
159 |
-
|
160 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
161 |
-
|
162 |
-
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).
|
163 |
-
|
164 |
-
- **Hardware Type:** [More Information Needed]
|
165 |
-
- **Hours used:** [More Information Needed]
|
166 |
-
- **Cloud Provider:** [More Information Needed]
|
167 |
-
- **Compute Region:** [More Information Needed]
|
168 |
-
- **Carbon Emitted:** [More Information Needed]
|
169 |
-
|
170 |
-
## Technical Specifications [optional]
|
171 |
-
|
172 |
-
### Model Architecture and Objective
|
173 |
-
|
174 |
-
[More Information Needed]
|
175 |
-
|
176 |
-
### Compute Infrastructure
|
177 |
-
|
178 |
-
[More Information Needed]
|
179 |
-
|
180 |
-
#### Hardware
|
181 |
-
|
182 |
-
[More Information Needed]
|
183 |
-
|
184 |
-
#### Software
|
185 |
-
|
186 |
-
[More Information Needed]
|
187 |
-
|
188 |
-
## Citation [optional]
|
189 |
-
|
190 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
191 |
-
|
192 |
-
**BibTeX:**
|
193 |
-
|
194 |
-
[More Information Needed]
|
195 |
-
|
196 |
-
**APA:**
|
197 |
-
|
198 |
-
[More Information Needed]
|
199 |
-
|
200 |
-
## Glossary [optional]
|
201 |
-
|
202 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
203 |
-
|
204 |
-
[More Information Needed]
|
205 |
-
|
206 |
-
## More Information [optional]
|
207 |
-
|
208 |
-
[More Information Needed]
|
209 |
-
|
210 |
-
## Model Card Authors [optional]
|
211 |
-
|
212 |
-
[More Information Needed]
|
213 |
-
|
214 |
-
## Model Card Contact
|
215 |
-
|
216 |
-
[More Information Needed]
|
|
|
1 |
+
library_name: transformers
|
2 |
+
license: mit
|
3 |
+
model_name: MBart-Urdu-Text-Summarization
|
4 |
+
pipeline_tag: summarization
|
5 |
+
tags:
|
6 |
+
- text-generation
|
7 |
+
- mbart
|
8 |
+
- nlp
|
9 |
+
- transformers
|
10 |
+
- text-generation-inference
|
11 |
+
author: Wali Muhammad Ahmad
|
12 |
+
private: false
|
13 |
+
gated: false
|
14 |
+
inference: true
|
15 |
+
mask_token: <mask>
|
16 |
+
widget_data:
|
17 |
+
text: Enter your para here
|
18 |
+
transformers_info:
|
19 |
+
auto_class: MBartForConditionalGeneration
|
20 |
+
processor: AutoTokenizer
|
21 |
+
language:
|
22 |
+
- en
|
23 |
+
- ur
|
24 |
+
---
|
25 |
+
|
26 |
+
# Model Card
|
27 |
+
|
28 |
+
MBart-Urdu-Text-Summarization is a fine-tuned MBart model designed for summarizing Urdu text. It leverages the multilingual capabilities of MBart to generate concise and accurate summaries for Urdu paragraphs.
|
29 |
+
|
30 |
+
## Model Details
|
31 |
+
|
32 |
+
### Model Description
|
33 |
+
|
34 |
+
This model is based on the MBart architecture, which is a sequence-to-sequence model pre-trained on multilingual data. It has been fine-tuned specifically for Urdu text summarization tasks. The model is capable of understanding and generating text in both English and Urdu, making it suitable for multilingual applications.
|
35 |
+
|
36 |
+
### Model Sources [optional]
|
37 |
+
|
38 |
+
- **Repository:** [https://github.com/WaliMuhammadAhmad/UrduTextSummarizationUsingm-BART]
|
39 |
+
- **Paper [Multilingual Denoising Pre-training for Neural Machine Translation]:** [https://arxiv.org/abs/2001.08210]
|
40 |
+
|
41 |
+
## Uses
|
42 |
+
|
43 |
+
### Direct Use
|
44 |
+
|
45 |
+
This model can be used directly for Urdu text summarization tasks. It is suitable for applications such as news summarization, document summarization, and content generation.
|
46 |
+
|
47 |
+
### Downstream Use [optional]
|
48 |
+
|
49 |
+
The model can be fine-tuned for specific downstream tasks such as sentiment analysis, question answering, or machine translation for Urdu and English.
|
50 |
+
|
51 |
+
### Out-of-Scope Use
|
52 |
+
|
53 |
+
This model is not intended for generating biased, harmful, or misleading content. It should not be used for tasks outside of text summarization without proper fine-tuning and evaluation.
|
54 |
+
|
55 |
+
## Bias, Risks, and Limitations
|
56 |
+
|
57 |
+
- The model may generate biased or inappropriate content if the input text contains biases.
|
58 |
+
- It is trained on a specific dataset and may not generalize well to other domains or languages.
|
59 |
+
- The model's performance may degrade for very long input texts.
|
60 |
+
|
61 |
+
### Recommendations
|
62 |
+
|
63 |
+
Users should carefully evaluate the model's outputs for biases and appropriateness. Fine-tuning on domain-specific data is recommended for better performance in specialized applications.
|
64 |
+
|
65 |
+
## How to Get Started with the Model
|
66 |
+
|
67 |
+
Use the code below to get started with the model.
|
68 |
+
|
69 |
+
```python
|
70 |
+
from transformers import AutoTokenizer, MBartForConditionalGeneration
|
71 |
+
|
72 |
+
# Load the model and tokenizer
|
73 |
+
model_name = "ihatenlp/MBart-Urdu-Text-Summarization"
|
74 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
75 |
+
model = MBartForConditionalGeneration.from_pretrained(model_name)
|
76 |
+
|
77 |
+
# Example input text
|
78 |
+
input_text = "Enter your Urdu paragraph here."
|
79 |
+
|
80 |
+
# Tokenize and generate summary
|
81 |
+
inputs = tokenizer(input_text, return_tensors="pt")
|
82 |
+
summary_ids = model.generate(inputs["input_ids"], max_length=50, num_beams=4, early_stopping=True)
|
83 |
+
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
|
84 |
+
|
85 |
+
print("Summary:", summary)
|
86 |
+
```
|
87 |
+
|
88 |
+
## Environmental Impact
|
89 |
+
|
90 |
+
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).
|
91 |
+
|
92 |
+
## Citation [optional]
|
93 |
+
|
94 |
+
**BibTeX:**
|
95 |
+
|
96 |
+
```bibtex
|
97 |
+
@misc{liu2020multilingualdenoisingpretrainingneural,
|
98 |
+
title={Multilingual Denoising Pre-training for Neural Machine Translation},
|
99 |
+
author={Yinhan Liu and Jiatao Gu and Naman Goyal and Xian Li and Sergey Edunov and Marjan Ghazvininejad and Mike Lewis and Luke Zettlemoyer},
|
100 |
+
year={2020},
|
101 |
+
eprint={2001.08210},
|
102 |
+
archivePrefix={arXiv},
|
103 |
+
primaryClass={cs.CL},
|
104 |
+
url={https://arxiv.org/abs/2001.08210},
|
105 |
+
}
|
106 |
+
```
|
107 |
+
|
108 |
+
## Model Card Authors [optional]
|
109 |
+
|
110 |
+
- **Wali Muhammad Ahmad**
|
111 |
+
- **Muhammad Labeeb Tariq**
|
112 |
+
|
113 |
+
## Model Card Contact
|
114 |
+
|
115 |
+
- **Email:** [[email protected]]
|
116 |
+
- **Hugging Face Profile:** [Wali Muhammad Ahmad](https://huggingface.co/ihatenlp)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|