This project focuses on developing and enhancing a large language model (LLM) using state-of-the-art techniques. The project involves data preprocessing, model training, and creating a web interface for interaction with the model.
my_llm_project/
├── data/
│ ├── raw/
│ ├── processed/
│ └── datasets/
├── notebooks/
│ ├── data_preprocessing.ipynb
│ ├── model_training.ipynb
│ ├── evaluation.ipynb
│ └── inference.ipynb
├── models/
│ ├── gpt2/
│ ├── gpt3/
│ ├── gpt_neo/
│ └── fine_tuned_models/
├── scripts/
│ ├── preprocess.py
│ ├── train.py
│ ├── evaluate.py
│ └── inference.py
├── utils/
│ ├── data_utils.py
│ ├── model_utils.py
│ └── train_utils.py
├── web/
│ ├── app.py
│ ├── templates/
│ └── static/
├── requirements.txt
├── README.md
└── .gitignore
-
Clone the Repository:
git clone https://github.com/bayrameker/my_llm_projects.git cd my_llm_projects -
Create a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
Use the preprocess.py script to preprocess your dataset.
python scripts/preprocess.py --input_file data/raw/dataset.csv --output_dir data/processed --text_column textYou can also use the data_preprocessing.ipynb notebook for an interactive approach.
Train your model using the train.py script.
python scripts/train.py --model_name gpt2 --train_file data/processed/train.csv --output_dir models/gpt2 --epochs 3 --batch_size 4Run the web interface using Flask.
cd web
python app.py- Data Preprocessing:
notebooks/data_preprocessing.ipynb - Model Training:
notebooks/model_training.ipynb - Evaluation:
notebooks/evaluation.ipynb - Inference:
notebooks/inference.ipynb
Contributions are welcome! Please open an issue or submit a pull request for any improvements or suggestions.
This project is licensed under the MIT License. See the LICENSE file for details.
face.