Проект нацелен на создание, обучение и использование языковой модели, адаптированной для работы с лекционными материалами в формате PDF. Он включает полный цикл обработки данных – от извлечения текста до дообучения модели с применением современных методов, таких как LoRA, и подготовку к семантическому поиску. Скорость и качество обучения напрямую зависят от мощности Вашего ПК! У меня, например, gtx 1070 и 32 gb RAM, не самое мощное железо, не так ли? Единственная проблема, с которой я столкнулся, это очень медленные обучение и генерация ответа.
extract_text.py
pdfminer
и сохранение его в текстовом формате. Это позволяет подготовить данные для последующих этапов обработки.split_text.py
augment_text.py
nlpaug
. Скрипт создает несколько вариантов каждого текстового файла путём случайного обмена слов.create_dataset.py
train_test_split
из scikit-learn. Это позволяет структурировать данные для эффективного обучения модели.train_llama.py
Trainer
из Hugging Face Transformers;create_faiss_index.py
data/
Содержит:
train
, val
и test
)scripts/
Здесь расположены все скрипты для обработки данных и обучения модели:
extract_text.py
– извлечение текста из PDFsplit_text.py
– разбиение текста на фрагментыaugment_text.py
– аугментация текстовcreate_dataset.py
– создание и разделение датасетаtrain_llama.py
– дообучение языковой моделиchat_interface_web.py
– общение с ИИ в браузере(локально)models/
Содержит сохранённые модели, логи обучения и результаты дообучения.
Дополнительные сведения и инструкции по установке и запуску проекта приведены в файле README.md
.
Проект представляет собой комплексное решение для создания языковой модели, способной работать с лекционными материалами. Он автоматизирует подготовку данных – от извлечения текста из PDF до разделения, аугментации и структурирования датасета, а затем использует современные методы дообучения (с применением LoRA) для адаптации модели LLaMA. Возможная интеграция с FAISS открывает перспективы для реализации семантического поиска и интерактивных систем, что делает проект полезным инструментом для образовательных и исследовательских целей.\
The project is aimed at creating, training, and using a language model tailored for working with lecture materials in PDF format. It encompasses a complete data processing pipeline – from text extraction to model fine-tuning using modern techniques such as LoRA, as well as preparation for semantic search. The speed and quality of learning directly depend on the power of your PC! For example, I have a gtx 1070 and 32 gb of RAM, which is not the most powerful hardware, is it? The only problem I've encountered is very slow learning and response generation.
extract_text.py
pdfminer
library, and saving it in a text format. This process prepares the data for subsequent processing stages.split_text.py
augment_text.py
nlpaug
library. The script generates several variants of each text file by randomly swapping words.create_dataset.py
train_test_split
function from scikit-learn. This structuring facilitates efficient model training.train_llama.py
Trainer
from Hugging Face Transformers;create_faiss_index.py
data/
Contains:
train
, val
, and test
)scripts/
This directory contains all scripts for data processing and model training:
extract_text.py
– text extraction from PDFssplit_text.py
– splitting text into chunksaugment_text.py
– text augmentationcreate_dataset.py
– dataset creation and splittingtrain_llama.py
– language model fine-tuningchat_interface_web.py
– interacting with the AI in a web browser (locally)models/
Contains saved models, training logs, and fine-tuning results.
Additional details and installation instructions are provided in the README.md
file.
The project represents a comprehensive solution for building a language model capable of processing lecture materials. It automates data preparation—from extracting text from PDFs to splitting, augmenting, and structuring the dataset—and then employs modern fine-tuning techniques (such as LoRA) to adapt the LLaMA model. Potential integration with FAISS opens up prospects for implementing semantic search and interactive systems, making the project a valuable tool for educational and research purposes.
There are no datasets linked
There are no datasets linked