Downloads · 30 days
24
5% of all-time downloads
kargaranamir/T5R-base
T5R-base is a text generation model from kargaranamir. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This model can generate prompts (instructions) for any text!
Downloads · 30 days
24
5% of all-time downloads
All-time downloads
526
Public
Parameters
248M
2.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin990 MB · 50%
From the Hugging Face model README
This model can generate prompts (instructions) for any text!
This model is an instruction-tuned version of google/flan-t5-base on alpaca dataset but in reverse format!
You can use the transformers library to load and utilize the T5-Reverse (T5R) model for generating prompts based on text. Here's an example of how to do it:
>>> # Import required libraries
>>> import torch
>>> from transformers import pipeline
>>> # Load the model and tokenizer using the pipeline from Hugging Face Hub
>>> inference = pipeline("text2text-generation", model="kargaranamir/T5R-base")
>>> # Example instruction and prompt
>>> sample = '''
>>> Instruction: X
>>> Output: 1- Base your meals on higher fibre starchy carbohydrates. 2- Eat lots of fruit and veg. 3- Eat more fish, including a portion of oily fish.
>>> What kind of instruction could this be the answer to?
>>> X:
>>> '''
>>> # Generate a response using the model
>>> res = inference(sample)
>>> # Print the generated response
>>> print(res)
[{'generated_text': 'Instruction: Generate three recommendations for a healthy diet.'}]
If you find this model/approach useful, make a link to the huggingface model.