Downloads · 30 days
98
1% of all-time downloads
shorthillsai/flan-t5-large-absa
flan-t5-large-absa is a machine learning model from shorthillsai. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This model is a fine-tuned version of google/flan-t5-large on custom dataset prepared by GPT-4 and verified by human.
Downloads · 30 days
98
1% of all-time downloads
All-time downloads
18.8K
Public
Parameters
783M
9.4 GB on disk
Likes
10
Public
Click a slice to open those files.
.bin3.1 GB · 50%
From the Hugging Face model README
This model is a fine-tuned version of google/flan-t5-large on custom dataset prepared by GPT-4 and verified by human.
Text-to-Text model for aspect based sentiment analysis.
This is not for commercial use since the dataset was prepared using OpenAI with humans in the loop. It must be tested on the required dataset for accuracy before being released to production.
The following hyperparameters were used during training:
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model = AutoModelForSeq2SeqLM.from_pretrained("shorthillsai/flan-t5-large-absa", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("shorthillsai/flan-t5-large-absa", truncation=True)
prompt = """Find the aspect based sentiment for the given review. 'Not present' if the aspect is absent.\n\nReview:I love the screen of this laptop and the battery life is amazing.\n\nAspect:Battery Life\n\nSentiment: """
input_ids = tokenizer(prompt, return_tensors="pt").to("cuda").input_ids
instruct_model_outputs = instruct_model.generate(input_ids=input_ids)
instruct_model_text_output = tokenizer.decode(instruct_model_outputs[0], skip_special_tokens=True)