Git Product home page Git Product logo

bmanobel / indian-lawyergpt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nisaaragharia/indian-lawyergpt

0.0 0.0 0.0 3.64 MB

Fine-Tuning Falcon-7B with QLoRA is a pioneering initiative that leverages cutting-edge NLP techniques to create an advanced AI model with a profound understanding of the Indian legal context.

Home Page: https://huggingface.co/nisaar/falcon7b-Indian_Lawyer

Python 0.26% Jupyter Notebook 99.74%

indian-lawyergpt's Introduction

Fine-Tuning Falcon-7B With QLoRA for Indian Law

This repository contains code and resources for fine-tuning the Falcon-7B model on Indian legal questions and answers dataset leveraging the PEFT library from the Hugging Face ecosystem and QLoRA for more memory-efficient fine-tuning.

Overview

Falcon-7B, a causal decoder-only model trained on a causal language modeling task, serves as the core of this project. It incorporates design elements from the GPT-3 model, augmented with several performance and memory efficiency enhancements.

The main aim of this project is to fine-tune this large language model to understand and generate texts related to Indian law. A specially curated dataset of 150 Q&As on diverse aspects of Indian law, such as constitutional law, civil rights, criminal justice, property law, etc., is used for this purpose.

We employ PEFT, a library developed by Hugging Face, which enables highly efficient fine-tuning of large language models like Falcon-7B.

To minimize the memory footprint of transformer models during fine-tuning, we utilize QLoRA - an innovative technique for memory-efficient model training.

Thus, the project unifies these advanced technologies to efficiently and effectively fine-tune the Falcon-7B model on a specialized dataset.

In this project, we combine these technologies to fine-tune the Falcon-7B model on a specialized dataset in a memory-friendly and efficient way.

Training

Screenshot 2023-06-16 004036

Results

You can visualize the training progress using TensorBoard. After starting the training process, launch TensorBoard and navigate to the localhost link it provides:

tensorboard --logdir=./runs

You will be able to see various metrics such as training loss, validation loss, etc.

Contributing

Contributions are welcome! Please read the contributing guide to learn how you can contribute to this project.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Acknowledgements

We would like to thank OpenAI for releasing the Falcon-7B model, Hugging Face for providing the infrastructure and libraries necessary for fine-tuning large transformer models, and the Hugging Face Datasets community for providing the legal Q&A dataset.

Contact

For questions or feedback about this project, please open an issue on this repository.

indian-lawyergpt's People

Contributors

nisaaragharia avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.