Skip to content

flaat/llm_kd

Repository files navigation

Overview

This project explores two narrative generation pipelines for Narrative Explainable AI:

  1. Direct pipeline – a Small Language Model (SLM) is fine-tuned to generate narratives directly from counterfactuals.
  2. Multi-Narrative Refinement pipeline – two SLMs are trained for two stages: first to produce multiple draft narratives (from the direct pipeline), then to refine them into a coherent explanation (refinement step).

Pipelines

The datasets were synthetically generated with a Large Language Model (LLM) and then distilled into SLMs through fine-tuning.

Requirements

  • Python 3.11.10
  • Install Required Python packages using pip install -r requirements.txt

Usage

To fine tune the models you must run

bash finetune.sh

To generate the test results you must run

bash test.sh

or

bash test_refiner.sh

To evaluate the results type:

python src/evaluate.py

or

python src/evaluate_with_refiner.py

Data Folder

To download the datasets please use this link: https://huggingface.co/datasets/Anon30241/model_kd_llm

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •