Downloads · 30 days
16
24% of all-time downloads
EuriskoMobility/Flan-T5-Large-LoRA-Rephraser-Merged
Flan-T5-Large-LoRA-Rephraser-Merged is a text generation model from EuriskoMobility. Use it when you need the model to write or continue text. It is set up for transformers.
The model is a LoRA trained Flan-T5-Large. The shift in performace came from the LoRA Adapter Layer that was introduced to the model. It helped in training the model using cheaper hardware while not losing any of the…
Downloads · 30 days
16
24% of all-time downloads
All-time downloads
66
Public
Parameters
783M
3.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.1 GB · 100%
From the Hugging Face model README
The model is a LoRA trained Flan-T5-Large. The shift in performace came from the LoRA Adapter Layer that was introduced to the model. It helped in training the model using cheaper hardware while not losing any of the accuracy, on the contrary it increased the accuracy. The takes as input 3 elements: Previous_Question, Previous_Answer and Current_Question. It will rephrase the Current_Question based on all the previouses.
The primary use of the model is to generate a rephrased version of a follow-up question. The rephrased sentence will be a standalone sentence, that can be understood independantaly from the previous context. The output is supposed to be a sentence that has the same meaning/context as the combination of (Previous_Question, Previous_Answer, Current_Question)
The model is not intended to be used in fixing grammar or rephrasing using a format not similar to the one the model was trained on.
The data used for rephrasing was mainly data that roams around the context that can be seen when dealing with the HR Chatbot for Azadea or the News Chatbot for AL Qabas.
It is always recommended to follow the input format that the model was trained on. The format is the following:
text = """
Question:
What about Mondays?
History:
ASSISTANT: No it is not allowed to work remotely on Fridays per company policy.
HUMAN: Can we work remotely on Fridays?
"""
Use the code below to get started with the model.
from transformers import pipeline
pipe = pipeline("text2text-generation", model="EuriskoMobility/Flan-T5-Large-LoRA-Rephraser-Merged", max_new_tokens=64)
The data used will be provided shortly.
Using a LoRA adapter while still using 32-bit precision, the model managed to generalize better. With a mix of dropout and weight decay, overfitting was reduced. Using both approaches the model reached performances never reached previously.
The model needs to be tested using pipeline for single input and batched input as well as deployment on Triton and TGI.
The model was tested on both a test set and a list of key examples to tackle that were gathered around by the team. While "rougel" was taken into consideration, the aim of course was also to decrease training and validation loss as much as possible. Then the model was tested on the 63 examples gathered aside where he only rephrased incorrerctly 6 sentences. Some of them also being in a condition acceptable for the retriever system. as in the retriever would return the desired chunk.
The data used for testing was augmented data generated mainly from GPT-4 based on a few examples gathered by the team. It is a mix of HR related inputs as well as News related input. It has some conversational examples as well with the goal of generalizing more. Then there is a 63 input list that were manually tested by the team to judge the performance of the model.
During training the following metrics were mainly taken into consideration:
The best performing checkpoint that we got during training had the followng results:
The model still has room for improvement, but it would require an extensive amount of data that is much more diversified.
The model uses Flan-T5-Large architecture as a base but adds to it a LoRA Adapter to help in generalization.
1 x A100 GPU