pascalrai commited on
Commit
3ffdf40
1 Parent(s): 76da75f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +14 -145
README.md CHANGED
@@ -50,165 +50,34 @@ ROUGEL : 0.154
50
 
51
  <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
52
  You can use this model for text summarization.
53
- ### Direct Use
54
-
55
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
56
-
57
- [More Information Needed]
58
-
59
- ### Downstream Use [optional]
60
-
61
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
62
-
63
- [More Information Needed]
64
-
65
- ### Out-of-Scope Use
66
-
67
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
68
-
69
- [More Information Needed]
70
-
71
- ## Bias, Risks, and Limitations
72
-
73
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
74
-
75
- [More Information Needed]
76
-
77
- ### Recommendations
78
-
79
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
80
-
81
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
82
 
83
  ## How to Get Started with the Model
84
 
85
  Use the code below to get started with the model.
86
 
87
- [More Information Needed]
88
-
89
- ## Training Details
90
-
91
- ### Training Data
92
-
93
- <!-- 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. -->
94
-
95
- [More Information Needed]
96
-
97
- ### Training Procedure
98
-
99
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
100
-
101
- #### Preprocessing [optional]
102
-
103
- [More Information Needed]
104
-
105
-
106
- #### Training Hyperparameters
107
-
108
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
109
-
110
- #### Speeds, Sizes, Times [optional]
111
-
112
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
113
-
114
- [More Information Needed]
115
-
116
- ## Evaluation
117
-
118
- <!-- This section describes the evaluation protocols and provides the results. -->
119
-
120
- ### Testing Data, Factors & Metrics
121
-
122
- #### Testing Data
123
-
124
- <!-- This should link to a Dataset Card if possible. -->
125
-
126
- [More Information Needed]
127
 
128
- #### Factors
 
129
 
130
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
 
131
 
132
- [More Information Needed]
133
 
134
- #### Metrics
135
 
136
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
137
 
138
- [More Information Needed]
139
 
140
- ### Results
 
141
 
142
- [More Information Needed]
143
 
144
- #### Summary
145
-
146
-
147
-
148
- ## Model Examination [optional]
149
-
150
- <!-- Relevant interpretability work for the model goes here -->
151
-
152
- [More Information Needed]
153
-
154
- ## Environmental Impact
155
-
156
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
157
-
158
- 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).
159
-
160
- - **Hardware Type:** [More Information Needed]
161
- - **Hours used:** [More Information Needed]
162
- - **Cloud Provider:** [More Information Needed]
163
- - **Compute Region:** [More Information Needed]
164
- - **Carbon Emitted:** [More Information Needed]
165
-
166
- ## Technical Specifications [optional]
167
-
168
- ### Model Architecture and Objective
169
-
170
- [More Information Needed]
171
-
172
- ### Compute Infrastructure
173
-
174
- [More Information Needed]
175
 
176
  #### Hardware
177
 
178
- [More Information Needed]
179
-
180
- #### Software
181
-
182
- [More Information Needed]
183
-
184
- ## Citation [optional]
185
-
186
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
187
-
188
- **BibTeX:**
189
-
190
- [More Information Needed]
191
-
192
- **APA:**
193
-
194
- [More Information Needed]
195
-
196
- ## Glossary [optional]
197
-
198
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
199
-
200
- [More Information Needed]
201
-
202
- ## More Information [optional]
203
-
204
- [More Information Needed]
205
-
206
- ## Model Card Authors [optional]
207
-
208
- [More Information Needed]
209
-
210
- ## Model Card Contact
211
-
212
- [More Information Needed]
213
-
214
-
 
50
 
51
  <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
52
  You can use this model for text summarization.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  ## How to Get Started with the Model
55
 
56
  Use the code below to get started with the model.
57
 
58
+ import torch
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
+ # Load model directly
61
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
62
 
63
+ tokenizer = AutoTokenizer.from_pretrained("pascalrai/nep_summ_BART")
64
+ model = AutoModelForSeq2SeqLM.from_pretrained("pascalrai/nep_summ_BART")
65
 
66
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
67
 
68
+ sentence = """अत्यधिक माग भएका बेला दसैंमा चिनीको हाहाकार भएको थियो । उपत्यकाबाहिरका केही जिल्लामा चिनी पाइए पनि काठमाडौंमा भने अभाव नै कायम रहेको छ । प्रधानमन्त्री पुष्पकमल दाहालले बिहीबार बिहान उद्योग तथा वाणिज्य मन्त्री तथा मुख्यसचिवलाई चिनीको अभाव सिर्जना हुन नदिन सबै उपायको खोजी गर्न निर्देशन दिएका थिए ।
69
 
70
+ नेपाली चिनी उद्योगहरूले आम उपभोक्तालाई सहज हुने किसिमले बजारमा चिनी नपठाइ ठूला उद्योगलाई आपूर्ति गर्न गोदाममै राख्ने गरेको पनि भेटिएको छ । वाणिज्य विभागको तथ्यांक अनुसार, नेपालमा उत्पादन हुने चिनीको सत्तरी प्रतिशत चिनी बिभिन्न पेय पदार्थ, मिठाइ, चकलेट, विस्कुटलगायतका उद्योगहरुमा आपूर्ति हुने गर्दछ ।
71
 
72
+ नेपाल प्रहरीले नेपालमा रहेका सबै चिनी उद्योगको स्टक रेकर्ड चेक गर्ने तथा सो आधारमा बजारमा चिनी पठाउन उद्योगीहरूसँग छलफल गरिने विभागले जनाएको छ"""
73
 
74
+ inputs = tokenizer(sentence, max_length=1000, return_tensors="pt")
75
+ summary_ids = model.to(device).generate(inputs["input_ids"].to(device))
76
 
77
+ tokenizer.decode(summary_ids[0], skip_special_tokens=True, clean_up_tokenization_spaces=False)
78
 
79
+ 'दशैंका बेला सबै चिनी उद्योगको स्टक रेकर्ड गर्ने र बजारमा चिनी पठाउन उद्योगीहरूसँग छलफल गरिने अधिकारीहरूले बताएका छन्। यसकारण, उपत्यकाबाहिरका केही जिल्लामा पनि चिनीको अभाव कायम रहेको अधिकारीहरूले बताएका छन्।'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
 
81
  #### Hardware
82
 
83
+ The model was trained on a single A10G GPU in an AWS instance with each epoch taking roughly 2 days.