stefanbschneider/led-base-16384-lfqa-ans-len-512
Longformer Encoder-Decoder (LED) Fine-tuned for Generative Q&A
This model uses Allenai's Longformer Encoder-Decoder (LED) as base model, which supports very long contexts. It is trained to generate answers to questions based on given contexts with answers of up to 512 tokens.
This model is a fine-tuned version of allenai/led-base-16384 on the long-form question answering (LFQA) dataset stefanbschneider/lfqa-max-answer-length-512.
I used the script `led-finetune-lfqa-train.py` in this repo to fine-tune the model on a GTX 4070s Ti.
For details, see my blog post: [Fine-Tuning a Pre-Trained LLM](https://stefanbschneider.github.io/blog/posts/llm-fine-tuning/)
Intended uses & limitations
Intended use: Generative/abstractive question answering with potentially very long contexts and multi-sentence answers.
Limitations: Limited training/fine-tuning, i.e., the model tends to ramble and the generated answers do not always make sense.
Training and evaluation data
The model was fine-tuned on stefanbschneider/lfqa-max-answer-length-512. Due to limited resources, I only trained on 50% of the full training set for only one epoch and performed evaluation on a small, fixed subset of the validation set.
It achieves the following results on the subset of the evaluation set:
- Loss: 3.2574
- Rouge2: 0.0416
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- trainbatchsize: 2
- evalbatchsize: 2
- seed: 42
- optimizer: Use adamwtorch with betas=(0.9,0.999) and epsilon=1e-08 and optimizerargs=No additional optimizer arguments
- lrschedulertype: linear
- num_epochs: 1
- mixedprecisiontraining: Native AMP
Training results
Framework versions
- Transformers 4.48.3
- Pytorch 2.5.1+cu121
- Datasets 3.2.0
- Tokenizers 0.21.0
