fine-tuned-bart-xsum

Overview

fine-tuned-bart-xsum is a fine-tuned version of the facebook/bart-large-xsum model specifically tailored for narrative text generation from given prompts. This model was trained on the xsum dataset, focusing on generating coherent and contextually appropriate text.

Model Details

  • Model Type: facebook/bart-large-xsum
  • Training Dataset: XSum (news summary dataset)
  • Training Process:
    • Optimized for efficiency with batch processing, mixed precision training, and dynamic padding.
    • Trained over 3 epochs with learning rate adjustments and evaluation every 500 steps.

Usage

import torch

Check if a GPU is available

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

Move the model to the device

model.to(device) input_text = "tell me joke with bbc" input_ids = tokenizer(input_text, return_tensors="pt").input_ids input_ids = input_ids.to(device)

Generate summary

output = model.generate(input_ids, max_length=50, num_beams=4, early_stopping=True)

generated_summary = tokenizer.decode(output[0], skip_special_tokens=True)

print(generated_summary)

To use this model for text generation:

Downloads last month
13
Safetensors
Model size
406M params
Tensor type
F32
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no library tag.

Model tree for pragatheeswaran/fine-tuned-bart-xsum

Finetuned
(51)
this model

Dataset used to train pragatheeswaran/fine-tuned-bart-xsum