- LoRA-based Fine-tuning for optimizing language models.
- RAG (Retrieval-Augmented Generation) System for efficient text-to-SQL conversion using vector stores and NeonDB.
This module utilizes LoRA (Low-Rank Adaptation) to fine-tune the Phi-2 model efficiently. Key features include:
- Uses LoRAConfig for lightweight fine-tuning with optimal performance.
- Fine-tunes the microsoft/phi-2 model with quantization enabled for CPU efficiency.
- LoRA configuration settings ensure control over trainable parameters, scaling factor, and dropout rate for effective adaptation.
This module extracts text from document files to generate SQL queries using vector stores and a conversational AI system.

- Supports
.pdf,.docx, and.txtdocument types for schema extraction. - Utilizes PGVector for efficient vector storage and retrieval of schema details and sample queries.
- Uses the Groq API to generate SQL queries based on provided schemas and example queries.
- Implements retry logic to handle API failures and ensure stability.
gradio(for UI)pdfplumber,docx,json(for text extraction)langchain_postgres(for PGVector storage)
- Clone the repository:
git clone <repository-url>
cd finetunee
- Install dependencies:
pip install -r requirements.txt
- Ensure your Groq API Key and NeonDB Connection String are correctly set in the environment variables for secure access.