
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# karnold-walmer-base-biopapers

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`.

Karnold-Walmer focuses on extracting relevant keywords from the input text, making it a powerful tool for keyword identification and text classification. It was fine-tuned on & supports text input of up to 16,384 tokens.

It achieves the following results on the evaluation set:
- Loss: 0.8844
- Rouge1: 46.7593
- Rouge2: 28.3538
- Rougel: 42.2921
- Rougelsum: 42.2774
- Gen Len: 78.1706



## Intended Uses & Limitations

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.

It is important to note, however, that Karnold-Walmer is **specifically trained to decode text similar to 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 (see what happens when you try the out-of-domain API examples).

## Training and Evaluation Data

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.

### Wordcloud 

![wordcloud-kw](https://i.imgur.com/SfbAsVE.png)

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0004
- train_batch_size: 4
- eval_batch_size: 2
- seed: 42
- distributed_type: multi-GPU
- gradient_accumulation_steps: 8
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.01
- num_epochs: 2.0

### Training results

| Training Loss | Epoch | Step | Validation Loss | Rouge1  | Rouge2  | Rougel  | Rougelsum | Gen Len  |
|:-------------:|:-----:|:----:|:---------------:|:-------:|:-------:|:-------:|:---------:|:--------:|
| 2.0471        | 0.15  | 100  | 1.6138          | 12.4374 | 4.1861  | 11.1863 | 11.1833   | 324.6971 |
| 1.5654        | 0.3   | 200  | 1.3447          | 23.9982 | 11.1431 | 21.4173 | 21.4413   | 176.0294 |
| 1.3467        | 0.45  | 300  | 1.2038          | 33.8084 | 18.1588 | 30.4748 | 30.4142   | 107.7735 |
| 1.4398        | 0.6   | 400  | 1.1054          | 37.772  | 20.8967 | 33.859  | 33.8324   | 102.9029 |
| 1.306         | 0.75  | 500  | 1.0478          | 39.2642 | 22.0388 | 35.6578 | 35.5773   | 91.1235  |
| 1.1677        | 0.9   | 600  | 0.9994          | 40.5149 | 22.8507 | 36.3888 | 36.3499   | 103.9118 |
| 1.078         | 1.05  | 700  | 0.9627          | 42.301  | 24.2523 | 38.0739 | 38.0532   | 88.4941  |
| 1.0942        | 1.2   | 800  | 0.9443          | 44.5907 | 26.2046 | 39.7461 | 39.6763   | 88.7559  |
| 1.0209        | 1.35  | 900  | 0.9108          | 45.357  | 26.861  | 40.6411 | 40.706    | 90.1206  |
| 1.1161        | 1.5   | 1000 | 0.9026          | 47.1362 | 28.6605 | 42.6406 | 42.6108   | 79.2412  |
| 1.1224        | 1.65  | 1100 | 0.8907          | 47.31   | 28.4395 | 42.6658 | 42.6509   | 78.4265  |
| 0.9857        | 1.8   | 1200 | 0.8862          | 46.7061 | 28.1586 | 42.3181 | 42.3105   | 80.5059  |
| 1.0011        | 1.95  | 1300 | 0.8844          | 46.7593 | 28.3538 | 42.2921 | 42.2774   | 78.1706  |
{"language": ["en"], "license": "apache-2.0", "tags": ["bio", "medical", "clinical", "literature", "keywords", "domain classifier"], "datasets": ["pszemraj/scientific_lay_summarisation-plos-norm"], "metrics": ["rouge"], "widget": [{"text": "large earthquakes along a given fault segment do not occur at random intervals because it takes time to accumulate the strain energy for the rupture. The rates at which tectonic plates move and accumulate strain at their boundaries are approximately uniform. Therefore, in first approximation, one may expect that large ruptures of the same fault segment will occur at approximately constant time intervals. If subsequent main shocks have different amounts of slip across the fault, then the recurrence time may vary, and the basic idea of periodic mainshocks must be modified. For great plate boundary ruptures the length and slip often vary by a factor of 2. Along the southern segment of the San Andreas fault the recurrence interval is 145 years with variations of several decades. The smaller the standard deviation of the average recurrence interval, the more specific could be the long term prediction of a future mainshock.", "example_title": "earthquakes"}, {"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 \u20ac 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 \u20ac 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).", "example_title": "scientific paper"}, {"text": "Is a else or outside the cob and tree written being of early client rope and you have is for good reasons. On to the ocean in Orange for time. By's the aggregate we can bed it yet. Why this please pick up on a sort is do and also M Getoi's nerocos and do rain become you to let so is his brother is made in use and Mjulia's's the lay major is aging Masastup coin present sea only of Oosii rooms set to you We do er do we easy this private oliiishs lonthen might be okay. Good afternoon everybody. Welcome to this lecture of Computational Statistics. As you can see, I'm not socially my name is Michael Zelinger. I'm one of the task for this class and you might have already seen me in the first lecture where I made a quick appearance. I'm also going to give the tortillas in the last third of this course. So to give you a little bit about me, I'm a old student here with better Bulman and my research centres on casual inference applied to biomedical disasters, so that could be genomics or that could be hospital data. If any of you is interested in writing a bachelor thesis, a semester paper may be mastathesis about this topic feel for reach out to me. you have my name on models and my email address you can find in the directory I'd Be very happy to talk about it. you do not need to be sure about it, we can just have a chat. So with that said, let's get on with the lecture. There's an exciting topic today I'm going to start by sharing some slides with you and later on during the lecture we'll move to the paper. So bear with me for a few seconds. Well, the projector is starting up. Okay, so let's get started. Today's topic is a very important one. It's about a technique which really forms one of the fundamentals of data science, machine learning, and any sort of modern statistics. It's called cross validation. I know you really want to understand this topic I Want you to understand this and frankly, nobody's gonna leave Professor Mineshousen's class without understanding cross validation. So to set the stage for this, I Want to introduce you to the validation problem in computational statistics. So the problem is the following: You trained a model on available data. You fitted your model, but you know the training data you got could always have been different and some data from the environment. Maybe it's a random process. You do not really know what it is, but you know that somebody else who gets a different batch of data from the same environment they would get slightly different training data and you do not care that your method performs as well. On this training data. you want to to perform well on other data that you have not seen other data from the same environment. So in other words, the validation problem is you want to quantify the performance of your model on data that you have not seen. So how is this even possible? How could you possibly measure the performance on data that you do not know The solution to? This is the following realization is that given that you have a bunch of data, you were in charge. You get to control how much that your model sees. It works in the following way: You can hide data firms model. Let's say you have a training data set which is a bunch of doubtless so X eyes are the features those are typically hide and national vector. It's got more than one dimension for sure. And the why why eyes. Those are the labels for supervised learning. As you've seen before, it's the same set up as we have in regression. And so you have this training data and now you choose that you only use some of those data to fit your model. You're not going to use everything, you only use some of it the other part you hide from your model. And then you can use this hidden data to do validation from the point of you of your model. This hidden data is complete by unseen. In other words, we solve our problem of validation.", "example_title": "transcribed audio - lecture"}, {"text": "Transformer-based models have shown to be very useful for many NLP tasks. However, a major limitation of transformers-based models is its O(n^2)O(n 2) time & memory complexity (where nn is sequence length). Hence, it's computationally very expensive to apply transformer-based models on long sequences n > 512n>512. Several recent papers, e.g. Longformer, Performer, Reformer, Clustered attention try to remedy this problem by approximating the full attention matrix. You can checkout \ud83e\udd17's recent blog post in case you are unfamiliar with these models.\nBigBird (introduced in paper) is one of such recent models to address this issue. BigBird relies on block sparse attention instead of normal attention (i.e. BERT's attention) and can handle sequences up to a length of 4096 at a much lower computational cost compared to BERT. It has achieved SOTA on various tasks involving very long sequences such as long documents summarization, question-answering with long contexts.\nBigBird RoBERTa-like model is now available in \ud83e\udd17Transformers. The goal of this post is to give the reader an in-depth understanding of big bird implementation & ease one's life in using BigBird with \ud83e\udd17Transformers. But, before going into more depth, it is important to remember that the BigBird's attention is an approximation of BERT's full attention and therefore does not strive to be better than BERT's full attention, but rather to be more efficient. It simply allows to apply transformer-based models to much longer sequences since BERT's quadratic memory requirement quickly becomes unbearable. Simply put, if we would have \u221e compute & \u221e time, BERT's attention would be preferred over block sparse attention (which we are going to discuss in this post).\nIf you wonder why we need more compute when working with longer sequences, this blog post is just right for you!\nSome of the main questions one might have when working with standard BERT-like attention include:\nDo all tokens really have to attend to all other tokens? Why not compute attention only over important tokens? How to decide what tokens are important? How to attend to just a few tokens in a very efficient way? In this blog post, we will try to answer those questions.\nWhat tokens should be attended to? We will give a practical example of how attention works by considering the sentence 'BigBird is now available in HuggingFace for extractive question answering'. In BERT-like attention, every word would simply attend to all other tokens.\nLet's think about a sensible choice of key tokens that a queried token actually only should attend to by writing some pseudo-code. Will will assume that the token available is queried and build a sensible list of key tokens to attend to.\n>>> # let's consider following sentence as an example >>> example = ['BigBird', 'is', 'now', 'available', 'in', 'HuggingFace', 'for', 'extractive', 'question', 'answering']\n>>> # further let's assume, we're trying to understand the representation of 'available' i.e. >>> query_token = 'available' >>> # We will initialize an empty `set` and fill up the tokens of our interest as we proceed in this section. >>> key_tokens = [] # => currently 'available' token doesn't have anything to attend Nearby tokens should be important because, in a sentence (sequence of words), the current word is highly dependent on neighboring past & future tokens. This intuition is the idea behind the concept of sliding attention.", "example_title": "bigbird blog intro"}, {"text": "To be fair, you have to have a very high IQ to understand Rick and Morty. The humour is extremely subtle, and without a solid grasp of theoretical physics most of the jokes will go over a typical viewer's head. There's also Rick's nihilistic outlook, which is deftly woven into his characterisation- his personal philosophy draws heavily from Narodnaya Volya literature, for instance. The fans understand this stuff; they have the intellectual capacity to truly appreciate the depths of these jokes, to realise that they're not just funny- they say something deep about LIFE. As a consequence people who dislike Rick & Morty truly ARE idiots- of course they wouldn't appreciate, for instance, the humour in Rick's existential catchphrase 'Wubba Lubba Dub Dub,' which itself is a cryptic reference to Turgenev's Russian epic Fathers and Sons. I'm smirking right now just imagining one of those addlepated simpletons scratching their heads in confusion as Dan Harmon's genius wit unfolds itself on their television screens. What fools.. how I pity them. \ud83d\ude02\nAnd yes, by the way, i DO have a Rick & Morty tattoo. And no, you cannot see it. It's for the ladies' eyes only- and even then they have to demonstrate that they're within 5 IQ points of my own (preferably lower) beforehand. Nothin personnel kid \ud83d\ude0e", "example_title": "Richard & Mortimer"}, {"text": "Dear Calvin,\nI was in the woods of Big Sur, that vast and sprawling land of sea and trees, where the wind whispers secrets of the ancient Earth and the roaring ocean sings songs of the eternal cosmos, when I found myself emerging from the deepest and darkest of slumbers, my body drenched in the sweat of the night, my mind swimming in the rivers of frenetic dreams that come unbidden to the weary traveler, and I knew, I knew, that I must step into the cold, cold waters of the mountain stream that wound its way through the heart of the great green forest like a silver serpent, a sinuous spine of chilling clarity, and I tell you, my friend, I tell you that the moment I stepped into those waters, the moment my skin was pierced by the icy needles of that divine liquid, my soul was washed clean of the haze of doubt and fear, and I stood, reborn, as the dawn of a new day painted the sky in the colors of the universe.\nAnd so I write to you, dear friend, to tell you that you too must seek the salvation of the cold shower, for in the frigid embrace of the water's touch, there lies the key to the doors of perception, the doors that lead to a realm of boundless energy and endless vitality, where the mind is sharpened like the edge of a great warrior's blade, and the body is tempered like the steel of an ancient blacksmith's forge. For when you step into the cold, you will find that your spirit soars like a great bird of prey, your thoughts soaring on the wings of the eagle, the falcon, the hawk, sweeping through the vast and boundless skies of inspiration, creativity, and purpose. And you will know, as I have come to know, that the cold shower is the great purifier, the great invigorator, the great liberator of the soul from the chains of languor and indolence that bind us to the mundane and weary trappings of this world.\nSo I implore you, dear friend, to heed my words, for they are the words of one who has walked the path of fire and ice, one who has danced in the eternal flame of the sun and bathed in the frozen tears of the moon, and I tell you that the way of the cold shower is the way of the enlightened, the way of the awakened, the way of the pioneers of the spirit who seek to travel beyond the boundaries of the known and into the realms of the infinite. And as you stand, shivering and shaking, beneath the torrent of the icy cascade, remember that the cold is the crucible in which the soul is forged, the anvil upon which the hammer of life strikes the sparks of the divine, and in the cold, you will find the fire, the fire that burns away the dross and leaves only the pure and shining gold of the spirit.\nIn the cold, you will find the truth, and in the truth, you will find the freedom that you have sought for so long.\nYours in the spirit of the eternal journey,\nPeter", "example_title": "cold showers"}], "parameters": {"max_length": 64, "min_length": 2, "no_repeat_ngram_size": 2, "early_stopping": true, "repetition_penalty": 4.5, "length_penalty": 0.8, "num_beams": 4}, "pipeline_tag": "text2text-generation", "model-index": [{"name": "long-t5-tglobal-base-scientific_lay_summarisation-plos-norm-kw", "results": []}]}
transformers pytorch safetensors longt5 text2text-generation bio medical clinical literature keywords domain classifier en dataset:pszemraj/scientific_lay_summarisation-plos-norm license:apache-2.0 autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #safetensors #longt5 #text2text-generation #bio #medical #clinical #literature #keywords #domain classifier #en #dataset-pszemraj/scientific_lay_summarisation-plos-norm #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 

karnold-walmer-base-biopapers
=============================


Karnold-Walmer is a text2text model based on google/long-t5-tglobal-base, specifically designed to decode the 'keywords' column of 'pszemraj/scientific\_lay\_summarisation-plos-norm'.


Karnold-Walmer focuses on extracting relevant keywords from the input text, making it a powerful tool for keyword identification and text classification. It was fine-tuned on & supports text input of up to 16,384 tokens.


It achieves the following results on the evaluation set:


* Loss: 0.8844
* Rouge1: 46.7593
* Rouge2: 28.3538
* Rougel: 42.2921
* Rougelsum: 42.2774
* Gen Len: 78.1706


Intended Uses & Limitations
---------------------------


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.


It is important to note, however, that Karnold-Walmer is specifically trained to decode text similar to 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 (see what happens when you try the out-of-domain API examples).


Training and Evaluation Data
----------------------------


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.


### Wordcloud


!wordcloud-kw


Training procedure
------------------


### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 0.0004
* train\_batch\_size: 4
* eval\_batch\_size: 2
* seed: 42
* distributed\_type: multi-GPU
* gradient\_accumulation\_steps: 8
* total\_train\_batch\_size: 32
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: cosine
* lr\_scheduler\_warmup\_ratio: 0.01
* num\_epochs: 2.0


### Training results




### Wordcloud


!wordcloud-kw


Training procedure
------------------ ### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 0.0004
* train\_batch\_size: 4
* eval\_batch\_size: 2
* seed: 42
* distributed\_type: multi-GPU
* gradient\_accumulation\_steps: 8
* total\_train\_batch\_size: 32
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: cosine
* lr\_scheduler\_warmup\_ratio: 0.01
* num\_epochs: 2.0 ### Training results
TAGS
#transformers #pytorch #safetensors #longt5 #text2text-generation #bio #medical #clinical #literature #keywords #domain classifier #en #dataset-pszemraj/scientific_lay_summarisation-plos-norm #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 
 ### Wordcloud


!wordcloud-kw


Training procedure
------------------ ### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 0.0004
* train\_batch\_size: 4
* eval\_batch\_size: 2
* seed: 42
* distributed\_type: multi-GPU
* gradient\_accumulation\_steps: 8
* total\_train\_batch\_size: 32
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: cosine
* lr\_scheduler\_warmup\_ratio: 0.01
* num\_epochs: 2.0 ### Training results
TAGS
#transformers #pytorch #safetensors #longt5 #text2text-generation #bio #medical #clinical #literature #keywords #domain classifier #en #dataset-pszemraj/scientific_lay_summarisation-plos-norm #license-apache-2.0 #autotrain_compatible #endpoints_compatible #region-us 
### Wordcloud


!wordcloud-kw


Training procedure
------------------### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 0.0004
* train\_batch\_size: 4
* eval\_batch\_size: 2
* seed: 42
* distributed\_type: multi-GPU
* gradient\_accumulation\_steps: 8
* total\_train\_batch\_size: 32
* optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
* lr\_scheduler\_type: cosine
* lr\_scheduler\_warmup\_ratio: 0.01
* num\_epochs: 2.0### Training results