alakxender / flan-t5-news-articles

huggingface.co
Total runs: 10
24-hour runs: 0
7-day runs: 0
30-day runs: 7
Model's Last Updated: May 29 2025
text-generation

Introduction of flan-t5-news-articles

Model Details of flan-t5-news-articles

Flan-T5 News Article Generator

This project fine-tunes a Flan-T5 model to generate news articles in Dhivehi language based on titles.

Evaluation

The model was evaluated using ROUGE metrics on a validation set. Here are the final evaluation results:

  • Loss: 0.154
  • ROUGE-1: 0.170
  • ROUGE-2: 0.135
  • ROUGE-L: 0.169
  • ROUGE-Lsum: 0.169

The training metrics at epoch 4.35:

  • Training loss: 0.857
  • Gradient norm: 0.202
  • Learning rate: 0.000287

The model shows reasonable performance on the validation set with ROUGE scores indicating decent overlap between generated and reference texts. The relatively low validation loss of 0.154 compared to training loss suggests the model is generalizing well without overfitting.

Usage


from transformers import T5ForConditionalGeneration, T5Tokenizer

# Load your finetuned model
model = T5ForConditionalGeneration.from_pretrained("alakxender/flan-t5-news-articles")
tokenizer = T5Tokenizer.from_pretrained("alakxender/flan-t5-news-articles")

def generate_text(prompt, max_new_tokens=150, num_beams=1, repetition_penalty=1.2, no_repeat_ngram_size=1, do_sample=True):
    inputs = tokenizer(prompt, return_tensors="pt")
    outputs = model.generate(
        **inputs,
        max_new_tokens=max_new_tokens,
        num_beams=num_beams,
        repetition_penalty=repetition_penalty,
        no_repeat_ngram_size=no_repeat_ngram_size,
        do_sample=do_sample,
        early_stopping=True # this flag is only used in beam-based generation modes. You should set `num_beams>1` or unset `early_stopping`
    )
    return tokenizer.decode(outputs[0], skip_special_tokens=True)

prompt = "ބައެއް ފިހާރަތަކުގައި އަދިވެސް ބިދޭސީ ސޭޓުން!"
output = generate_text(f"Create an article about: {prompt}")
print(output)

Runs of alakxender flan-t5-news-articles on huggingface.co

10
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
7
30-day runs

More Information About flan-t5-news-articles huggingface.co Model

More flan-t5-news-articles license Visit here:

https://choosealicense.com/licenses/mit

flan-t5-news-articles huggingface.co

flan-t5-news-articles huggingface.co is an AI model on huggingface.co that provides flan-t5-news-articles's model effect (), which can be used instantly with this alakxender flan-t5-news-articles model. huggingface.co supports a free trial of the flan-t5-news-articles model, and also provides paid use of the flan-t5-news-articles. Support call flan-t5-news-articles model through api, including Node.js, Python, http.

flan-t5-news-articles huggingface.co Url

https://huggingface.co/alakxender/flan-t5-news-articles

alakxender flan-t5-news-articles online free

flan-t5-news-articles huggingface.co is an online trial and call api platform, which integrates flan-t5-news-articles's modeling effects, including api services, and provides a free online trial of flan-t5-news-articles, you can try flan-t5-news-articles online for free by clicking the link below.

alakxender flan-t5-news-articles online free url in huggingface.co:

https://huggingface.co/alakxender/flan-t5-news-articles

flan-t5-news-articles install

flan-t5-news-articles is an open source model from GitHub that offers a free installation service, and any user can find flan-t5-news-articles on GitHub to install. At the same time, huggingface.co provides the effect of flan-t5-news-articles install, users can directly use flan-t5-news-articles installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

flan-t5-news-articles install url in huggingface.co:

https://huggingface.co/alakxender/flan-t5-news-articles

Url of flan-t5-news-articles

flan-t5-news-articles huggingface.co Url

Provider of flan-t5-news-articles huggingface.co

alakxender
ORGANIZATIONS

Other API from alakxender

huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:August 16 2024