pszemraj commited on
Commit
4dbe9d0
·
1 Parent(s): 8c30a2f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +255 -0
README.md CHANGED
@@ -1,3 +1,258 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ tags:
4
+ - generated_from_trainer
5
+ metrics:
6
+ - rouge
7
+ model-index:
8
+ - name: long-t5-tglobal-base-scientific_lay_summarisation-plos-norm-kw
9
+ results: []
10
+ widget:
11
+ - text: >-
12
+ large earthquakes along a given fault segment do not occur at random
13
+ intervals because it takes time to accumulate the strain energy for the
14
+ rupture. The rates at which tectonic plates move and accumulate strain at
15
+ their boundaries are approximately uniform. Therefore, in first
16
+ approximation, one may expect that large ruptures of the same fault segment
17
+ will occur at approximately constant time intervals. If subsequent main
18
+ shocks have different amounts of slip across the fault, then the recurrence
19
+ time may vary, and the basic idea of periodic mainshocks must be modified.
20
+ For great plate boundary ruptures the length and slip often vary by a factor
21
+ of 2. Along the southern segment of the San Andreas fault the recurrence
22
+ interval is 145 years with variations of several decades. The smaller the
23
+ standard deviation of the average recurrence interval, the more specific
24
+ could be the long term prediction of a future mainshock.
25
+ example_title: earthquakes
26
+ - text: ' A typical feed-forward neural field algorithm. Spatiotemporal coordinates are fed into a neural network that predicts values in the reconstructed domain. Then, this domain is mapped to the sensor domain where sensor measurements are available as supervision. Class and Section Problems Addressed Generalization (Section 2) Inverse problems, ill-posed problems, editability; symmetries. Hybrid Representations (Section 3) Computation & memory efficiency, representation capacity, editability: Forward Maps (Section 4) Inverse problems Network Architecture (Section 5) Spectral bias, integration & derivatives. Manipulating Neural Fields (Section 6) Edit ability, constraints, regularization. Table 2: The five classes of techniques in the neural field toolbox each addresses problems that arise in learning, inference, and control. (Section 3). We can supervise reconstruction via differentiable forward maps that transform Or project our domain (e.g, 3D reconstruction via 2D images; Section 4) With appropriate network architecture choices, we can overcome neural network spectral biases (blurriness) and efficiently compute derivatives and integrals (Section 5). Finally, we can manipulate neural fields to add constraints and regularizations, and to achieve editable representations (Section 6). Collectively, these classes constitute a ''toolbox'' of techniques to help solve problems with neural fields There are three components in a conditional neural field: (1) An encoder or inference function € that outputs the conditioning latent variable 2 given an observation 0 E(0) =2. 2 is typically a low-dimensional vector, and is often referred to aS a latent code Or feature code_ (2) A mapping function 4 between Z and neural field parameters O: Y(z) = O; (3) The neural field itself $. The encoder € finds the most probable z given the observations O: argmaxz P(2/0). The decoder maximizes the inverse conditional probability to find the most probable 0 given Z: arg- max P(Olz). We discuss different encoding schemes with different optimality guarantees (Section 2.1.1), both global and local conditioning (Section 2.1.2), and different mapping functions Y (Section 2.1.3) 2. Generalization Suppose we wish to estimate a plausible 3D surface shape given a partial or noisy point cloud. We need a suitable prior over the sur- face in its reconstruction domain to generalize to the partial observations. A neural network expresses a prior via the function space of its architecture and parameters 0, and generalization is influenced by the inductive bias of this function space (Section 5).'
27
+ example_title: scientific paper
28
+ - text: >-
29
+ Is a else or outside the cob and tree written being of early client rope and
30
+ you have is for good reasons. On to the ocean in Orange for time. By's the
31
+ aggregate we can bed it yet. Why this please pick up on a sort is do and
32
+ also M Getoi's nerocos and do rain become you to let so is his brother is
33
+ made in use and Mjulia's's the lay major is aging Masastup coin present sea
34
+ only of Oosii rooms set to you We do er do we easy this private oliiishs
35
+ lonthen might be okay. Good afternoon everybody. Welcome to this lecture of
36
+ Computational Statistics. As you can see, I'm not socially my name is
37
+ Michael Zelinger. I'm one of the task for this class and you might have
38
+ already seen me in the first lecture where I made a quick appearance. I'm
39
+ also going to give the tortillas in the last third of this course. So to
40
+ give you a little bit about me, I'm a old student here with better Bulman
41
+ and my research centres on casual inference applied to biomedical disasters,
42
+ so that could be genomics or that could be hospital data. If any of you is
43
+ interested in writing a bachelor thesis, a semester paper may be mastathesis
44
+ about this topic feel for reach out to me. you have my name on models and my
45
+ email address you can find in the directory I'd Be very happy to talk about
46
+ it. you do not need to be sure about it, we can just have a chat. So with
47
+ that said, let's get on with the lecture. There's an exciting topic today
48
+ I'm going to start by sharing some slides with you and later on during the
49
+ lecture we'll move to the paper. So bear with me for a few seconds. Well,
50
+ the projector is starting up. Okay, so let's get started. Today's topic is a
51
+ very important one. It's about a technique which really forms one of the
52
+ fundamentals of data science, machine learning, and any sort of modern
53
+ statistics. It's called cross validation. I know you really want to
54
+ understand this topic I Want you to understand this and frankly, nobody's
55
+ gonna leave Professor Mineshousen's class without understanding cross
56
+ validation. So to set the stage for this, I Want to introduce you to the
57
+ validation problem in computational statistics. So the problem is the
58
+ following: You trained a model on available data. You fitted your model, but
59
+ you know the training data you got could always have been different and some
60
+ data from the environment. Maybe it's a random process. You do not really
61
+ know what it is, but you know that somebody else who gets a different batch
62
+ of data from the same environment they would get slightly different training
63
+ data and you do not care that your method performs as well. On this training
64
+ data. you want to to perform well on other data that you have not seen other
65
+ data from the same environment. So in other words, the validation problem is
66
+ you want to quantify the performance of your model on data that you have not
67
+ seen. So how is this even possible? How could you possibly measure the
68
+ performance on data that you do not know The solution to? This is the
69
+ following realization is that given that you have a bunch of data, you were
70
+ in charge. You get to control how much that your model sees. It works in the
71
+ following way: You can hide data firms model. Let's say you have a training
72
+ data set which is a bunch of doubtless so X eyes are the features those are
73
+ typically hide and national vector. It's got more than one dimension for
74
+ sure. And the why why eyes. Those are the labels for supervised learning. As
75
+ you've seen before, it's the same set up as we have in regression. And so
76
+ you have this training data and now you choose that you only use some of
77
+ those data to fit your model. You're not going to use everything, you only
78
+ use some of it the other part you hide from your model. And then you can use
79
+ this hidden data to do validation from the point of you of your model. This
80
+ hidden data is complete by unseen. In other words, we solve our problem of
81
+ validation.
82
+ example_title: transcribed audio - lecture
83
+ - text: >-
84
+ Transformer-based models have shown to be very useful for many NLP tasks.
85
+ However, a major limitation of transformers-based models is its O(n^2)O(n 2)
86
+ time & memory complexity (where nn is sequence length). Hence, it's
87
+ computationally very expensive to apply transformer-based models on long
88
+ sequences n > 512n>512. Several recent papers, e.g. Longformer, Performer,
89
+ Reformer, Clustered attention try to remedy this problem by approximating
90
+ the full attention matrix. You can checkout 🤗's recent blog post in case
91
+ you are unfamiliar with these models.
92
+
93
+ BigBird (introduced in paper) is one of such recent models to address this
94
+ issue. BigBird relies on block sparse attention instead of normal attention
95
+ (i.e. BERT's attention) and can handle sequences up to a length of 4096 at a
96
+ much lower computational cost compared to BERT. It has achieved SOTA on
97
+ various tasks involving very long sequences such as long documents
98
+ summarization, question-answering with long contexts.
99
+
100
+ BigBird RoBERTa-like model is now available in 🤗Transformers. The goal of
101
+ this post is to give the reader an in-depth understanding of big bird
102
+ implementation & ease one's life in using BigBird with 🤗Transformers. But,
103
+ before going into more depth, it is important to remember that the BigBird's
104
+ attention is an approximation of BERT's full attention and therefore does
105
+ not strive to be better than BERT's full attention, but rather to be more
106
+ efficient. It simply allows to apply transformer-based models to much longer
107
+ sequences since BERT's quadratic memory requirement quickly becomes
108
+ unbearable. Simply put, if we would have ∞ compute & ∞ time, BERT's
109
+ attention would be preferred over block sparse attention (which we are going
110
+ to discuss in this post).
111
+
112
+ If you wonder why we need more compute when working with longer sequences,
113
+ this blog post is just right for you!
114
+
115
+ Some of the main questions one might have when working with standard
116
+ BERT-like attention include:
117
+
118
+ Do all tokens really have to attend to all other tokens? Why not compute
119
+ attention only over important tokens? How to decide what tokens are
120
+ important? How to attend to just a few tokens in a very efficient way? In
121
+ this blog post, we will try to answer those questions.
122
+
123
+ What tokens should be attended to? We will give a practical example of how
124
+ attention works by considering the sentence 'BigBird is now available in
125
+ HuggingFace for extractive question answering'. In BERT-like attention,
126
+ every word would simply attend to all other tokens.
127
+
128
+ Let's think about a sensible choice of key tokens that a queried token
129
+ actually only should attend to by writing some pseudo-code. Will will assume
130
+ that the token available is queried and build a sensible list of key tokens
131
+ to attend to.
132
+
133
+ >>> # let's consider following sentence as an example >>> example =
134
+ ['BigBird', 'is', 'now', 'available', 'in', 'HuggingFace', 'for',
135
+ 'extractive', 'question', 'answering']
136
+
137
+ >>> # further let's assume, we're trying to understand the representation of
138
+ 'available' i.e. >>> query_token = 'available' >>> # We will initialize an
139
+ empty `set` and fill up the tokens of our interest as we proceed in this
140
+ section. >>> key_tokens = [] # => currently 'available' token doesn't have
141
+ anything to attend Nearby tokens should be important because, in a sentence
142
+ (sequence of words), the current word is highly dependent on neighboring
143
+ past & future tokens. This intuition is the idea behind the concept of
144
+ sliding attention.
145
+ example_title: bigbird blog intro
146
+ - text: >-
147
+ To be fair, you have to have a very high IQ to understand Rick and Morty.
148
+ The humour is extremely subtle, and without a solid grasp of theoretical
149
+ physics most of the jokes will go over a typical viewer's head. There's also
150
+ Rick's nihilistic outlook, which is deftly woven into his characterisation-
151
+ his personal philosophy draws heavily from Narodnaya Volya literature, for
152
+ instance. The fans understand this stuff; they have the intellectual
153
+ capacity to truly appreciate the depths of these jokes, to realise that
154
+ they're not just funny- they say something deep about LIFE. As a consequence
155
+ people who dislike Rick & Morty truly ARE idiots- of course they wouldn't
156
+ appreciate, for instance, the humour in Rick's existential catchphrase
157
+ 'Wubba Lubba Dub Dub,' which itself is a cryptic reference to Turgenev's
158
+ Russian epic Fathers and Sons. I'm smirking right now just imagining one of
159
+ those addlepated simpletons scratching their heads in confusion as Dan
160
+ Harmon's genius wit unfolds itself on their television screens. What fools..
161
+ how I pity them. 😂
162
+
163
+ And yes, by the way, i DO have a Rick & Morty tattoo. And no, you cannot see
164
+ it. It's for the ladies' eyes only- and even then they have to demonstrate
165
+ that they're within 5 IQ points of my own (preferably lower) beforehand.
166
+ Nothin personnel kid 😎
167
+ example_title: Richard & Mortimer
168
+ - text: >-
169
+ The tower is 324 metres (1,063 ft) tall, about the same height as an
170
+ 81-storey building, and the tallest structure in Paris. Its base is square,
171
+ measuring 125 metres (410 ft) on each side. During its construction, the
172
+ Eiffel Tower surpassed the Washington Monument to become the tallest
173
+ man-made structure in the world, a title it held for 41 years until the
174
+ Chrysler Building in New York City was finished in 1930. It was the first
175
+ structure to reach a height of 300 metres. Due to the addition of a
176
+ broadcasting aerial at the top of the tower in 1957, it is now taller than
177
+ the Chrysler Building by 5.2 metres (17 ft). Excluding transmitters, the
178
+ Eiffel Tower is the second tallest free-standing structure in France after
179
+ the Millau Viaduct.
180
+ example_title: eiffel
181
+ parameters:
182
+ max_length: 64
183
+ min_length: 4
184
+ no_repeat_ngram_size: 2
185
+ early_stopping: true
186
+ repetition_penalty: 4.5
187
+ length_penalty: 0.8
188
+ num_beams: 4
189
+ datasets:
190
+ - pszemraj/scientific_lay_summarisation-plos-norm
191
+ language:
192
+ - en
193
+ pipeline_tag: text2text-generation
194
  ---
195
+
196
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
197
+ should probably proofread and complete it, then remove this comment. -->
198
+
199
+ # karnold-walmer-base-bio-papers
200
+
201
+ Karnold-Walmer is a text2text model based on [google/long-t5-tglobal-base](https://huggingface.co/google/long-t5-tglobal-base), specifically designed to decode the 'keywords' column of `pszemraj/scientific_lay_summarisation-plos-norm`.
202
+
203
+ Karnold-Walmer focuses on extracting relevant keywords from the input text, making it a powerful tool for keyword identification and text classification.
204
+
205
+ It achieves the following results on the evaluation set:
206
+ - Loss: 0.8844
207
+ - Rouge1: 46.7593
208
+ - Rouge2: 28.3538
209
+ - Rougel: 42.2921
210
+ - Rougelsum: 42.2774
211
+ - Gen Len: 78.1706
212
+
213
+
214
+
215
+ ## Intended Uses & Limitations
216
+
217
+ Karnold-Walmer is intended to be used for keyword extraction and text classification in various domains, such as scientific literature, biomedical research articles, and more. By analyzing the content of an input text, the model generates a list of relevant keywords that describe the topic of the article.
218
+
219
+ It is important to note, however, that Karnold-Walmer is specifically trained to decode the "keywords" column and is not designed for summarization tasks. For accurate keyword extraction and text classification, the model should be used within the limits of its training data and intended purpose.
220
+
221
+ ## Training and Evaluation Data
222
+
223
+ Karnold-Walmer was trained on the PLOS dataset, which contains full biomedical research articles paired with expert-written lay summaries and keyword lists. The model was tuned to decode the "keywords" column in the dataset, focusing on keyword extraction and text classification tasks.
224
+
225
+ ## Training procedure
226
+
227
+ ### Training hyperparameters
228
+
229
+ The following hyperparameters were used during training:
230
+ - learning_rate: 0.0004
231
+ - train_batch_size: 4
232
+ - eval_batch_size: 2
233
+ - seed: 42
234
+ - distributed_type: multi-GPU
235
+ - gradient_accumulation_steps: 8
236
+ - total_train_batch_size: 32
237
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
238
+ - lr_scheduler_type: cosine
239
+ - lr_scheduler_warmup_ratio: 0.01
240
+ - num_epochs: 2.0
241
+
242
+ ### Training results
243
+
244
+ | Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel | Rougelsum | Gen Len |
245
+ |:-------------:|:-----:|:----:|:---------------:|:-------:|:-------:|:-------:|:---------:|:--------:|
246
+ | 2.0471 | 0.15 | 100 | 1.6138 | 12.4374 | 4.1861 | 11.1863 | 11.1833 | 324.6971 |
247
+ | 1.5654 | 0.3 | 200 | 1.3447 | 23.9982 | 11.1431 | 21.4173 | 21.4413 | 176.0294 |
248
+ | 1.3467 | 0.45 | 300 | 1.2038 | 33.8084 | 18.1588 | 30.4748 | 30.4142 | 107.7735 |
249
+ | 1.4398 | 0.6 | 400 | 1.1054 | 37.772 | 20.8967 | 33.859 | 33.8324 | 102.9029 |
250
+ | 1.306 | 0.75 | 500 | 1.0478 | 39.2642 | 22.0388 | 35.6578 | 35.5773 | 91.1235 |
251
+ | 1.1677 | 0.9 | 600 | 0.9994 | 40.5149 | 22.8507 | 36.3888 | 36.3499 | 103.9118 |
252
+ | 1.078 | 1.05 | 700 | 0.9627 | 42.301 | 24.2523 | 38.0739 | 38.0532 | 88.4941 |
253
+ | 1.0942 | 1.2 | 800 | 0.9443 | 44.5907 | 26.2046 | 39.7461 | 39.6763 | 88.7559 |
254
+ | 1.0209 | 1.35 | 900 | 0.9108 | 45.357 | 26.861 | 40.6411 | 40.706 | 90.1206 |
255
+ | 1.1161 | 1.5 | 1000 | 0.9026 | 47.1362 | 28.6605 | 42.6406 | 42.6108 | 79.2412 |
256
+ | 1.1224 | 1.65 | 1100 | 0.8907 | 47.31 | 28.4395 | 42.6658 | 42.6509 | 78.4265 |
257
+ | 0.9857 | 1.8 | 1200 | 0.8862 | 46.7061 | 28.1586 | 42.3181 | 42.3105 | 80.5059 |
258
+ | 1.0011 | 1.95 | 1300 | 0.8844 | 46.7593 | 28.3538 | 42.2921 | 42.2774 | 78.1706 |