Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🔥 Project: Fine-tuning GPT-2 & GraphRAG for Medical Text Processing

This repository includes two Natural Language Processing (NLP) projects designed for medical text analysis and improving information retrieval.


📌 1. Fine-tuning GPT-2 on Skin Cancer Articles

In this section, the GPT-2 model is fine-tuned on specialized skin cancer articles to enhance its ability to understand medical texts.

Features:

✅ Data collection from PubMed and other scientific sources
✅ Preprocessing of medical texts to optimize model learning
✅ Fine-tuning the GPT-2 model using Hugging Face Transformers
✅ Model evaluation and testing for generating medical text responses


🔧 Installation & Requirements

Dependencies

Libraries used in this project:

  • torch
  • transformers
  • numpy
  • pandas
  • matplotlib
  • datasets
  • biopython
  • scikit-learn
  • tqdm

First, install the necessary packages:

pip install torch transformers datasets biopython

Then, run the notebook in Jupyter Notebook.

Run the Notebook

jupyter notebook fine-tuning-gpt-2-on-skin-cancer-articles.ipynb

📌 2. GraphRAG: Combining Graphs and Generative Models for Enhanced Information Retrieval

In this section, the Retrieval-Augmented Generation (RAG) method is combined with a graph-based structure to extract more accurate and relevant information for text generation.

Why is GraphRAG Important?

Intelligent Information Retrieval: Using graphs to optimize knowledge search
Stronger Generative Models: Combining RAG and GPT to improve response accuracy
Processing Complex Data: Suitable for scientific and medical search systems


🔧 Installation & Requirements

Dependencies

Libraries used in this project:

  • torch
  • transformers
  • faiss-cpu
  • networkx
  • numpy
  • scipy
  • pandas
  • matplotlib

First, install the necessary packages. Then, run the notebook in Jupyter Notebook.

Run the Notebook

jupyter notebook graphrag.ipynb

🎯 Applications of These Projects

Medical Applications: Analyzing scientific articles, aiding disease diagnosis
Search Systems: Optimizing scientific and medical search engines
Research Assistance: Gathering more accurate information for medical research
Improving Chatbots: Enhancing medical chatbots for more precise responses


  • If you have suggestions for improving the project, please submit a Pull Request.
  • To report issues, please open an Issue.

About

Fine-tuning GPT-2 on domain-specific articles related to skin cancer, using PubMed data and Hugging Face's Transformers. The model is trained to generate relevant medical responses

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages