• Stars
    star
    106
  • Rank 325,871 (Top 7 %)
  • Language
    Python
  • Created over 1 year ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Flacuna was developed by fine-tuning Vicuna on Flan-mini, a comprehensive instruction collection encompassing various tasks. Vicuna is already an excellent writing assistant, and the intention behind Flacuna was to enhance Vicuna's problem-solving capabilities. To achieve this, we curated a dedicated instruction dataset called Flan-mini.

Flacuna: A Vicuna made of Flan

Paper | Model | Dataset

πŸ“£ We still have numerous experiments awaiting completion (details are here), requiring additional computing resources in our lab. If any industry professionals reading this are willing to provide assistance, please feel free to reach out to us at [email protected].

Image

Flacuna was developed by fine-tuning Vicuna on Flan-mini, a comprehensive instruction collection encompassing various tasks. Vicuna is already an excellent writing assistant, and the intention behind Flacuna was to enhance Vicuna's problem-solving capabilities. To achieve this, we curated a dedicated instruction dataset called Flan-mini.

Dataset Name Source Dataset Size
Flan2021 Flan 388K
Public Pool of Prompts Flan 320K
Natural instructions v2 Flan 200K
CoT Flan 100K
Code Search HF/code_search_net 100K
Code Contest HF/deepmind/code_contests 50K
Apps HF/codeparrot/apps 50K
GPT4-Alpaca GPT-4 52K
Code-Alpaca ChatGPT 20K
ShareGPT ChatGPT 60K
Total - 1.34M

Quickstart Guide

from flacuna import FLACUNA
model = FLACUNA("declare-lab/flacuna-13b-v1.0")

prompt = (
  "A chat between a curious user and an artificial intelligence assistant. "
  "The assistant gives helpful, detailed, and polite answers to the user's questions. "
  "USER: You are tasked to demonstrate your writing skills in professional or work settings for the following question.\n"
  "Can you help me write a speech for a graduation ceremony, inspiring and motivating the graduates to pursue their dreams and make a positive impact on the world?\n"
  "Output: ASSISTANT: "
)
decoded = model.generate(prompt)
print (decoded)

The output is the following:

A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: You are tasked to demonstrate your writing skills in professional or work settings for the following question.
Can you help me write a speech for a graduation ceremony, inspiring and motivating the graduates to pursue their dreams and make a positive impact on the world?
Output: ASSISTANT: ​​Dear Graduates,

It is my honor to stand before you here today, to celebrate your achievements and to acknowledge your hard work and dedication that you have shown here at the University. I am proud of each one of you, for all that you have accomplished thus far, and for the potential that lies within each of you.

As you move on from this stage, I want to remind you that your journey has just begun. The real world awaits you, and with it, comes a myriad of opportunities and challenges. But I believe in each one of you, and I know that you are more than capable of facing whatever lies ahead.

You are the future of this world, and I have no doubt that you will make a positive impact on it, in whatever field you choose to pursue. Whether it is in science, technology, education, healthcare, or any other field, your contributions will be valuable and meaningful, and will make a difference in the lives of others.

So, as you move forward, I urge you to stay true to your passions, to pursue your dreams, and to never give up on what you believe in. Remember, it is not the obstacles that define us, but how we overcome them that truly matters.

You have the power to change the world, and I have no doubt that you will. So, go out there, and make the most of every opportunity that comes your way. Make a difference, and leave your mark on this world.

Congratulations once again, and best of luck in all that lies ahead.

Thank you.

Problem Solving Ability

As a result of this fine-tuning process, Flacuna exhibited notable performance improvements in problem-solving across multiple benchmark datasets, both in few-shot and zero-shot settings.

Model Size MMLU (5-shot) BBH (3-shot) DROP (3-shot) CRASS (3-shot) HumanEval (0-shot) Avg.
StableVicuna 13B 49.2 (+3.0) 37.5 (+0.4) 34.3 (-1.0) 67.5 (+8.7) 15.9 (+2.5) 40.9 (+2.7)
Vicuna 13B 50.6 (+4.5) 37.6 (+0.5) 32.6 (-3.0) 60.9 (+2.1) 11.6 (-1.8) 38.7 (+0.6)
Flacuna 13B 51.1 (+5.0) 39.3 (+2.2) 43.6 (+8.0) 74.1 (+15.3) 11.0 (-2.4) 43.8 (+5.6)
Model Size MMLU (0-shot) BBH (0-shot) CRASS (0-shot)
StableVicuna 13B 47.5 18.5 64.2
Vicuna 13B 48.3 28.3 65.7
Flacuna 13B 49.4 32.5 67.9

During training, Flacuna is a 13B checkpoint of LLaMA and employed a maximum input sequence length of 1280. We utilized LoRA for parameter-efficient fine-tuning.

Chatbot / Writing Assistant

While Flacuna primarily excels in problem-solving tasks, we made efforts to maintain the impressive writing and chatting ability of Vicuna. To achieve this, we incorporated conversational datasets generated by GPT-4, such as GPT-4-Alpaca and ShareGPT, into the Flan-mini collection. To use Flacuna as a chatbot or writing assistant, we recommend you use the following template:

A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. USER: {definition of the task}.\n\n
{question}\n
Output: ASSISTANT:

Please note that we still recommend using Vicuna as your preferred Chatbot or Writing Assistant, over Flacuna. Flacuna's primary strength lies in problem-solving tasks, making it ideal for such applications.

The following table presents the writing performance of Flacuna on the IMPACT dataset, which is a component of the InstructEval evaluation suite. The generated responses have been evaluated by ChatGPT, and their relevance and coherence have been scored on a scale of 1 to 5.

Model Size Informative Rel. Informative Coh. Professional Rel. Professional Coh. Argumentative Rel. Argumentative Coh. Creative Rel. Creative Coh. Avg. Rel. Avg. Coh.
ChatGPT - 3.34 3.98 3.88 3.96 3.96 3.82 3.92 3.94 3.78 3.93
Flan-Alpaca 11B 3.56 3.46 3.54 3.70 3.22 3.28 3.70 3.40 3.51 3.46
Flan-T5 11B 2.64 3.24 2.62 3.22 2.54 3.40 2.50 2.72 2.58 3.15
Dolly-V2 12B 3.54 3.64 2.96 3.74 3.66 3.20 3.02 3.18 3.30 3.44
StableVicuna 13B 3.54 3.64 2.96 3.74 3.30 3.20 3.02 3.18 3.21 3.44
Vicuna 13B 3.60 3.96 3.74 3.82 3.82 3.56 3.82 3.92 3.75 3.82
Flacuna 13B 3.02 3.42 3.48 3.52 3.38 3.02 3.92 3.80 3.45 3.44

Training Flacuna

Navigate to the data directory and download the Flan-Mini dataset:

cd data
wget https://huggingface.co/datasets/declare-lab/flan-mini/resolve/main/flan_mini.json.zip
unzip flan_mini.json.zip
cd ..

You can then use the train.sh script for fine-tuning Vicuna on the Flan-Mini dataset:

bash train.sh

Citation

@misc{ghosal2023flacuna,
      title={Flacuna: Unleashing the Problem Solving Power of Vicuna using FLAN Fine-Tuning}, 
      author={Deepanway Ghosal and Yew Ken Chia and Navonil Majumder and Soujanya Poria},
      year={2023},
      eprint={2307.02053},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

More Repositories

1

conv-emotion

This repo contains implementation of different architectures for emotion recognition in conversations.
Python
1,336
star
2

MELD

MELD: A Multimodal Multi-Party Dataset for Emotion Recognition in Conversation
Python
793
star
3

tango

Codes and Model of the paper "Text-to-Audio Generation using Instruction Tuned LLM and Latent Diffusion Model"
Python
754
star
4

multimodal-deep-learning

This repository contains various models targetting multimodal representation learning, multimodal fusion for downstream tasks such as multimodal sentiment analysis.
OpenEdge ABL
730
star
5

awesome-sentiment-analysis

Reading list for Awesome Sentiment Analysis papers
517
star
6

instruct-eval

This repository contains code to quantitatively evaluate instruction-tuned models such as Alpaca and Flan-T5 on held-out tasks.
Python
500
star
7

flan-alpaca

This repository contains code for extending the Stanford Alpaca synthetic instruction tuning to existing instruction-tuned models such as Flan-T5.
Python
343
star
8

awesome-emotion-recognition-in-conversations

A comprehensive reading list for Emotion Recognition in Conversations
252
star
9

MISA

MISA: Modality-Invariant and -Specific Representations for Multimodal Sentiment Analysis
Python
192
star
10

RECCON

This repository contains the dataset and the PyTorch implementations of the models from the paper Recognizing Emotion Cause in Conversations.
Python
169
star
11

Multimodal-Infomax

This repository contains the official implementation code of the paper Improving Multimodal Fusion with Hierarchical Mutual Information Maximization for Multimodal Sentiment Analysis, accepted at EMNLP 2021.
Python
154
star
12

dialogue-understanding

This repository contains PyTorch implementation for the baseline models from the paper Utterance-level Dialogue Understanding: An Empirical Study
Python
123
star
13

RelationPrompt

This repository implements our ACL Findings 2022 research paper RelationPrompt: Leveraging Prompts to Generate Synthetic Data for Zero-Shot Relation Triplet Extraction. The goal of Zero-Shot Relation Triplet Extraction (ZeroRTE) is to extract relation triplets of the format (head entity, tail entity, relation), despite not having annotated data for the test relation labels.
Python
123
star
14

contextual-utterance-level-multimodal-sentiment-analysis

Context-Dependent Sentiment Analysis in User-Generated Videos
Python
123
star
15

CASCADE

This repo contains code to detect sarcasm from text in discussion forum using deep learning
Python
86
star
16

red-instruct

Codes and datasets of the paper Red-Teaming Large Language Models using Chain of Utterances for Safety-Alignment
Python
75
star
17

BBFN

This repository contains the implementation of the paper -- Bi-Bimodal Modality Fusion for Correlation-Controlled Multimodal Sentiment Analysis
Python
62
star
18

CICERO

The purpose of this repository is to introduce new dialogue-level commonsense inference datasets and tasks. We chose dialogues as the data source because dialogues are known to be complex and rich in commonsense.
Python
60
star
19

dialog-HGAT

Dialogue Relation Extraction with Document-level Heterogeneous Graph Attention Networks
Python
57
star
20

kingdom

Domain Adaptation using External Knowledge for Sentiment Analysis
Python
55
star
21

hfusion

Multimodal sentiment analysis using hierarchical fusion with context modeling
Python
44
star
22

MIME

This repository contains PyTorch implementations of the models from the paper An Empirical Study MIME: MIMicking Emotions for Empathetic Response Generation.
Python
43
star
23

speech-adapters

Codes and datasets for our ICASSP2023 paper, Evaluating parameter-efficient transfer learning approaches on SURE benchmark for speech understanding
Python
40
star
24

LLM-PuzzleTest

This repository is maintained to release dataset and models for multimodal puzzle reasoning.
Python
33
star
25

HyperTTS

Python
33
star
26

MSA-Robustness

NAACL 2022 paper on Analyzing Modality Robustness in Multimodal Sentiment Analysis
Python
31
star
27

CIDER

This repository contains the dataset and the pytorch implementations of the models from the paper CIDER: Commonsense Inference for Dialogue Explanation and Reasoning. CIDER has been accepted to appear at SIGDIAL 2021.
Python
28
star
28

sentence-ordering

This repository contains the PyTorch implementation of the paper STaCK: Sentence Ordering with Temporal Commonsense Knowledge appearing at EMNLP 2021.
Python
28
star
29

resta

Restore safety in fine-tuned language models through task arithmetic
Python
25
star
30

HyperRED

This repository implements our EMNLP 2022 research paper A Dataset for Hyper-Relational Extraction and a Cube-Filling Approach.
Python
25
star
31

MM-InstructEval

This repository contains code to evaluate various multimodal large language models using different instructions across multiple multimodal content comprehension tasks.
Python
24
star
32

MM-Align

[EMNLP 2022] This repository contains the official implementation of the paper "MM-Align: Learning Optimal Transport-based Alignment Dynamics for Fast and Accurate Inference on Missing Modality Sequences"
Python
24
star
33

identifiable-transformers

Python
22
star
34

exemplary-empathy

This repository contains the source codes of the paper -- Exemplars-guided Empathetic Response Generation Controlled by the Elements of Human Communication
Python
22
star
35

della

DELLA-Merging: Reducing Interference in Model Merging through Magnitude-Based Sampling
Python
22
star
36

TEAM

Our EMNLP 2022 paper on MCQA
Python
21
star
37

DoubleMix

Code for the COLING 2022 paper "DoubleMix: Simple Interpolation-Based Data Augmentation for Text Classification"
Python
20
star
38

adapter-mix

Python
15
star
39

M2H2-dataset

This repository contains the dataset and baselines explained in the paper: M2H2: A Multimodal Multiparty Hindi Dataset For HumorRecognition in Conversations
Python
15
star
40

ASTE-RL

This repository contains the source codes for the paper: "Aspect Sentiment Triplet Extraction using Reinforcement Learning" published at CIKM 2021.
Python
14
star
41

SAT

Code for the EMNLP 2022 Findings short paper "SAT: Improving Semi-Supervised Text Classification with Simple Instance-Adaptive Self-Training"
Jupyter Notebook
13
star
42

KNOT

This repository contains the implementation of the paper -- KNOT: Knowledge Distillation using Optimal Transport for Solving NLP Tasks
Python
13
star
43

WikiDes

A Wikipedia-based summarization dataset
Python
13
star
44

Sealing

[NAACL 2024] Official Implementation of paper "Self-Adaptive Sampling for Efficient Video Question Answering on Image--Text Models"
Python
9
star
45

VIP

Our EMNLP 2022 paper on VIP-Based Prompting for Parameter-Efficient Learning
Python
8
star
46

domadapter

Code for EACL'23 paper "Udapter: Efficient Domain Adaptation Using Adapters"
Python
8
star
47

RobustMIFT

[Arxiv 2024] Official Implementation of the paper: "Towards Robust Instruction Tuning on Multimodal Large Language Models"
Jupyter Notebook
8
star
48

ferret

Ferret: Faster and Effective Automated Red Teaming with Reward-Based Scoring Technique
Python
8
star
49

SANCL

[COLING 2022] This repository contains the code of the paper SANCL: Multimodal Review Helpfulness Prediction with Selective Attention and Natural Contrastive Learning.
Python
7
star
50

segue

Codes and Checkpoints of the Interspeech paper "Sentence Embedder Guided Utterance Encoder (SEGUE) for Spoken Language Understanding"
Python
6
star
51

llm_robustness

Python
3
star
52

NLP-OT

1
star