Skip to content

mmshress/INLP-WS23

Repository files navigation

LLM Legal Assistant - A assistant that gives opinion on the questions that falls under EU law

Natural Language Processing using Transformers
asmaM1 - Asma Motmem 3769398
KushalGaywala - Kushal Gaywala 3769104
mmshress - Mohit Shrestha 3769398
sid-code14 - Siddhant Tripathi 3768501

Software requirements

  • python >= 3.11
  • pip >= 21.3

Installation

Clone the repository

git clone https://github.com/mmshress/INLP-WS23.git
cd INLP-WS23

Clone the data

Eval dataset

Unprocessed data and relevant data

git clone https://huggingface.co/datasets/LLMLegalAssistant/datasets
Final dataset

Final 511 corpus Indexed, with evaluation small (20 documents) corpus Indexed.

https://heibox.uni-heidelberg.de/d/91fd4895a03c436f9507/

Check python version

python --version
  • if not 3.11 then install python 3.11, from here
  • once installed

Setup virtual environment

  • Now, use that path to create a virtual environment
/path/to/python3.11 -m venv .env
# on windows,
## in powershell
.env/Scripts/Activate.ps1
## in cmd
.env/Scripts/activate.bat
# on linux
source .env/bin/activate

Setup package

python -m pip install .

For development

 python -m pip install -e '.[dev]'
 pre-commit install

Usage

Using the CLI

llmlegalassistant answer -q <query>
or
llmlegalassistant answer --query <query>
  • If you want to use OpenAI model for inference then provide a key with --openapi flag
  • If you want to use LLaMA from HuggingFace then provide your key with --huggingface flag
  • we use meta-llama/Llama-2-7b-chat-hf which is Quantized with 4-bit Medium, Q4_K_M
llmlegalassistant [commands] [options]
llmlegalassistant --help

Citation

@software{llmlegalassistant-hd-24,
    author = {Asma Motmem and Siddthant Tripathi and Kushal Gaywala and Mohit Shrestha},
    title = {LLMLegalAssistant: A question answering for EU law},
    month = mar,
    year = 2024,
    publisher = {GitHub},
    version = {0.1},
    url = {https://github.com/mmshress/INLP-WS23}
}

About

Group project for the INLP course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •