This project is a chatbot built using a GPT-based model. The LLM/ directory uses code from the book "Build A Large Language Model (From Scratch)" by Sebastian Raschka.
This project includes code from "Build A Large Language Model (From Scratch)" by Sebastian Raschka.
If you find this book or code useful for your research, please consider citing it:
@book{build-llms-from-scratch-book,
author = {Sebastian Raschka},
title = {Build A Large Language Model (From Scratch)},
publisher = {Manning},
year = {2023},
isbn = {978-1633437166},
url = {https://www.manning.com/books/build-a-large-language-model-from-scratch},
note = {Work in progress},
github = {https://github.com/rasbt/LLMs-from-scratch}
}
-
Clone the Repository:
git clone https://github.com/kwshr/LMS-ChatBot.git cd LMS-ChatBot
-
Navigate to the LLM Directory:
cd LLM
-
Run the Main Script:
python PreTrainMain.py
The script will prompt you to enter a prompt and the maximum number of tokens to generate.
-
Optional Configuration:
-
If you want to manually edit the
top-k
andtemperature
settings to generate more coherent texts, you can do so by editing thePreTrainMain.py
file:# Open PreTrainMain.py nano PreTrainMain.py # Locate the configuration section and adjust the parameters as needed top_k = <desired_value> # Example: top_k = 40 temperature = <desired_value> # Example: temperature = 0.7
-
-
Navigate to the Frontend Directory:
cd frontEnd/chatbot
-
Install Dependencies:
npm install
This command will install all the required packages listed in the
package.json
file. -
Start the Development Server:
npm start
The application should now be running on
http://localhost:3000/
, and you can interact with the chatbot through the web interface. -
Build for Production (Optional):
npm run build
This command will create an optimized build of the app, ready for deployment.