Skip to content

dhaval-gamet/Mini-GPT-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Mini-GPT-Model

यह प्रोजेक्ट एक छोटा GPT (Generative Pre-trained Transformer) मॉडल है, जिसे हिंदी और प्रोग्रामिंग भाषा के लिए ट्रेन किया जा सकता हे। इसमें sentiment analysis, वेब scraping, और एक CLI चैटबॉट जैसी सुविधाएँ शामिल हैं।

विशेषताएँ (Features)

  • GPT आधारित Transformer architecture
  • हिंदी और प्रोग्रामिंग text datasets पर ट्रेनिंग
  • Sentiment (mood) detection
  • वेब scraping द्वारा जानकारी प्राप्त करना
  • Conversation history सेव और लोड करना
  • CLI चैटबॉट इंटरफेस

आवश्यकताएँ (Requirements)

  • Python 3.8+
  • torch
  • transformers
  • requests
  • beautifulsoup4
  • sentencepiece
  • (Optional, Google Colab के लिए) google.colab

इंस्टॉल करने के लिए:

pip install torch transformers requests beautifulsoup4 sentencepiece

Installation

  1. इस repository को clone करें:

    git clone https://github.com/dhaval-gamet/Mini-GPT-Model.git
    cd Mini-GPT-Model
  2. ऊपर दिए गए dependencies को install करें।

Dataset

  • ट्रेनिंग के लिए आपको एक text फाइल चाहिए जिसमें हिंदी और प्रोग्रामिंग से जुड़ा content हो।
  • Default path: /content/hindi_programming_text.txt
  • Format: Plain text file (UTF-8 encoded)

मेने इसको उपयोग केसे किया?

  • मेने इस mini GPT को गूगल कोलाब मे रन किया था।
  • और /content/hindi_programming_text.txt फ़ाईल को गूगल ड्राइव मे रखा गया था। or सिर्फ 4MB डाटा पर ट्रेन किया गया था। फिर भी ये ठीक ठाक जवाब दे रहा था।

उपयोग कैसे करें (Usage)

  1. सबसे पहले इस Mini GPT को आपको अपने डाटा पर ट्रेन करना होगा। उसके बाद इस मॉडल को seve कर्ले।
  2. स्क्रिप्ट को चलाएं:
    python "Mini GPT Model.py"
  3. चैटबॉट शुरू होगा। आप CLI में हिंदी या प्रोग्रामिंग से जुड़े सवाल पूछ सकते हैं।
  4. 'exit' टाइप करके चैटबॉट बंद करें।

Model Training और Testing

  • ट्रेनिंग पैरामीटर्स और dataset path को script के अंदर बदल सकते हैं।
  • ट्रेनिंग के बाद मॉडल वेट्स /content/model_weights.pth में सेव हो जाते हैं।

Web Scraping

  • जब मॉडल को जवाब न आए, तब यह वेब से जानकारी लाने की कोशिश करता है।

Sentiment Analysis (Mood Detection)

  • मल्टीलिंगुअल sentiment-analyzer (nlptown/bert-base-multilingual-uncased-sentiment)

फ़ाइल संरचना (File Structure)

  • Mini GPT Model.py — मुख्य कोड (मॉडल, ट्रेनिंग, चैटबॉट आदि)
  • README.md — यह फाइल
  • (Optional) requirements.txt — dependencies की सूची

योगदान (Contributing)

  • Pull requests स्वागत हैं!
  • कोई issue मिले तो Issue टैब में रिपोर्ट करें।

License

MIT License

संपर्क / Author

You are free to use or modify this code with proper credit to the author. Commercial use without permission is not allowed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages