CrownKira / GEC-with-MoE-CoT-and-Rubrics

An innovative GEC system that harnesses the power of Mixture of Experts, Chain-of-Thought (CoT) and rubric-guided evaluations to enhance correction quality and accuracy. Built on the foundation of advanced reasoning models like GPT-3.5-turbo-1106 and integrating teacher-student model feedback.

Home Page:https://uvents.nus.edu.sg/event/24th-steps/module/CS4248/project/8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GEC-with-MoE-CoT-and-Rubrics

GEC System Architecture

Untitled Diagram7-Page-1 drawio

Overview

Our GEC system architecture employs a novel combination of methodologies to enhance the accuracy and diversity of grammatical error corrections:

  • Mixture of Experts: Utilizes a specialized approach where each "student" model is an expert on one of four datasets—A, B, C, or N—achieved through fine-tuning on each specific dataset.
  • Chain-of-Thought Prompting: Utilizes structured reasoning prompts to guide the model towards more logical and contextually relevant corrections.
  • Rubric-Guided Evaluations: Incorporates specific evaluation criteria, ensuring that corrections adhere to predefined quality standards.
  • In-Context Learning: Leverages the capabilities of models with advanced reasoning abilities, notably GPT-3.5-turbo-1106, for dynamic learning within contextual boundaries.
  • Teacher and Student Model Integration: Combines the insights of teacher models in evaluating student corrections, fostering a rich pool of diverse and insightful corrections.

Installation

Steps

  1. Clone the Repository:

    git clone git@github.com:CrownKira/GEC-with-MoE-CoT-and-Rubrics.git
  2. Navigate to the Project Directory:

    cd GEC-with-MoE-CoT-and-Rubrics
  3. Create and Activate the Virtual Environment:

    python3 -m venv venv
    source venv/bin/activate
  4. Install Required Python Packages:

    pip3 install -r requirements.txt
  5. Download the Necessary spaCy Language Model:

    python3 -m spacy download en_core_web_sm

Usage

  1. Configure Environment Variables: Obtain the .env file from me or set your own environment variables as needed.

  2. Run the Main Script: Replace main.py with the actual name of your script.

    python3 main.py
  3. Check Outputs: Navigate to the outputs directory to access corrected text files and CSV outputs.

About

An innovative GEC system that harnesses the power of Mixture of Experts, Chain-of-Thought (CoT) and rubric-guided evaluations to enhance correction quality and accuracy. Built on the foundation of advanced reasoning models like GPT-3.5-turbo-1106 and integrating teacher-student model feedback.

https://uvents.nus.edu.sg/event/24th-steps/module/CS4248/project/8


Languages

Language:Macaulay2 91.7%Language:Python 8.3%Language:Shell 0.0%