🎯 Advanced · पाठ 1

उदाहरणों से सिखाना

Supervised Learning — जब मशीन लाखों उदाहरणों से नियम खुद बनाती है।

क्या मशीन सिर्फ़ उदाहरण देखकर सीख सकती है?

2012 में, University of Toronto के Geoffrey Hinton की टीम ने ImageNet प्रतियोगिता में AlexNet नाम का एक neural network उतारा। उस समय तक कंप्यूटर विज़न में सबसे अच्छी त्रुटि दर लगभग 26% थी। AlexNet ने वह दर 15.3% तक गिरा दी — एक झटके में दस प्रतिशत अंकों का सुधार। यह तब संभव हुआ जब टीम ने 1.2 मिलियन लेबल की गई तस्वीरें, GPU hardware, और Dropout regularization को एक साथ उपयोग किया। ImageNet के organizers ने बाद में स्वीकार किया कि उन्होंने इस परिणाम की उम्मीद नहीं की थी। उस एक प्रयोग ने पूरे AI field की दिशा बदल दी।

Supervised Learning क्या है?

जब हम किसी बच्चे को बिल्ली और कुत्ते की तस्वीरें दिखाकर फ़र्क बताते हैं, तो वह सीखता है। Supervised Learning ठीक इसी तरह काम करता है — लेकिन यहाँ "बच्चा" एक algorithm है और "उदाहरण" करोड़ों की संख्या में होते हैं।

इस प्रक्रिया में हर training example के दो हिस्से होते हैं: input (जैसे कि तस्वीर का pixel data) और label (जैसे "यह बिल्ली है")। Model इन जोड़ियों को देखकर एक mapping सीखता है — input से label तक पहुँचने का रास्ता।

मुख्य अवधारणा

Supervised Learning में human annotators पहले डेटा को label करते हैं। यह labeling ही वह "supervision" है जो algorithm को सही दिशा देती है। बिना सही labels के, model गलत patterns सीख सकता है।

AlexNet की सफलता का रहस्य सिर्फ़ algorithm नहीं था। उसके पीछे थी ImageNet dataset — 14 मिलियन से अधिक हाथ से लेबल की गई तस्वीरें, जिसे Princeton की Fei-Fei Li ने 2007 से बनाना शुरू किया था। बिना इस dataset के AlexNet का जन्म नहीं हो सकता था।

Training का यांत्रिकी

Training के दौरान model एक prediction करता है, फिर उसे actual label से compare किया जाता है। यह अंतर — जिसे loss कहते हैं — model को बताता है कि वह कितना गलत था।

इसके बाद backpropagation algorithm loss को model के through पीछे की ओर propagate करता है और हर parameter को थोड़ा adjust करता है। यह process लाखों-करोड़ों बार दोहराई जाती है। AlexNet के training में 5-6 दिन लगे — दो NVIDIA GTX 580 GPUs पर।

  • Forward Pass: Input → Prediction
  • Loss Calculation: Prediction vs. True Label
  • Backward Pass: Error → Parameter Adjustment
  • Iteration: यह cycle लाखों बार दोहराई जाती है

Generalization — असली परीक्षा

Training data पर अच्छा perform करना काफ़ी नहीं है। असली सवाल यह है: क्या model उन तस्वीरों को पहचान सकता है जो उसने पहले कभी नहीं देखी? इसे generalization कहते हैं।

AlexNet ने ImageNet के test set पर — जो training में use नहीं हुई थी — 84.7% accuracy हासिल की। यह generalization की शक्ति थी। Model ने केवल examples को याद नहीं किया था; उसने underlying patterns को समझा था।

ऐतिहासिक प्रभाव

AlexNet की सफलता के बाद Google, Facebook, और Baidu ने तुरंत deep learning में भारी निवेश शुरू किया। Hinton की कंपनी DNNresearch को 2013 में Google ने $44 मिलियन में खरीदा। एक benchmark competition के नतीजे ने industry को हिला दिया।

📝 क्विज़ · पाठ 1

उदाहरणों से सिखाना

तीन सवाल — अपनी समझ परखें।

1. AlexNet ने 2012 की ImageNet प्रतियोगिता में किस कारण से इतनी बड़ी सफलता हासिल की?
✓ बिल्कुल सही! AlexNet की सफलता तीन चीज़ों के मेल से आई — विशाल labeled dataset, GPU processing, और dropout जैसी regularization technique।
✗ यह सही नहीं है। AlexNet की सफलता किसी एक कारण से नहीं, बल्कि बड़े labeled data, GPU hardware और नई regularization technique के संयोजन से आई।
2. Supervised Learning में "supervision" का अर्थ क्या है?
✓ सही! "Supervision" का मतलब है कि इंसानों ने पहले से डेटा को label किया है — model को बताया है कि सही जवाब क्या है।
✗ नहीं। Supervised Learning में "supervision" का अर्थ है human annotators द्वारा training data को पहले से labels देना।
3. Generalization का क्या अर्थ है?
✓ एकदम सही! Generalization वह क्षमता है जिससे model नए, अनदेखे data पर भी सही prediction करता है — यही असली सीख है।
✗ सही नहीं। Generalization का मतलब training data याद करना नहीं है। यह है नए, अनदेखे examples पर सही काम करने की क्षमता।
🧪 लैब · पाठ 1

Supervised Learning लैब

AI से पूछें — Labels और Training के बारे में गहराई से समझें।

लैब का उद्देश्य

इस लैब में आप AI से Supervised Learning की प्रक्रिया को explore करेंगे। नीचे दिए गए सुझाए गए सवाल पूछें या अपने खुद के सवाल लिखें।

सुझाए गए सवाल: "अगर training data में गलत labels हों तो क्या होगा?" · "Backpropagation को एक सरल उदाहरण से समझाइए" · "AlexNet के बाद के models में क्या बड़े बदलाव आए?"
🤖 AI शिक्षक Supervised Learning
🎯 Advanced · पाठ 2

हर जगह पैटर्न

Neural Networks कैसे features खोजते हैं — और क्यों deep layers ज़रूरी हैं।

AI अस्त-व्यस्त डेटा में पैटर्न कैसे ढूँढता है?

2013 में, Google Brain के शोधकर्ता Andrew Ng और Jeff Dean ने एक प्रयोग किया जो "Google Cat" के नाम से प्रसिद्ध हुआ। उन्होंने 16,000 computer processors को YouTube के 10 मिलियन unlabeled वीडियो frames दिखाए। किसी ने model को नहीं बताया कि "यह बिल्ली है।" फिर भी, network ने खुद-ब-खुद एक neuron विकसित किया जो बिल्लियों की तस्वीरों पर strongly activate होता था। यह experiment दिखाता है कि neural networks raw data से अपने आप patterns खोज सकते हैं — बशर्ते data और computing power पर्याप्त हो।

Feature Hierarchy — परत दर परत सीखना

एक deep neural network में हर layer एक अलग स्तर की complexity पर काम करती है। Image recognition में:

  • पहली परतें: Simple edges और gradients पहचानती हैं
  • मध्य परतें: Textures, shapes और object parts पहचानती हैं
  • अंतिम परतें: पूरी objects और complex concepts पहचानती हैं

यह hierarchy automatic है। किसी engineer ने नहीं तय किया कि "पहली layer edges सीखे।" Model ने यह खुद discover किया — लाखों images देखकर, और gradient descent के through अपने weights adjust करके।

क्यों महत्वपूर्ण है

Google Cat experiment ने prove किया कि sufficient scale पर, neural networks बिना human guidance के भी meaningful representations सीख सकते हैं। यही insight आगे चलकर modern foundation models की नींव बनी।

Convolutional Neural Networks — Images के लिए

CNN (Convolutional Neural Network) एक विशेष architecture है जो images के spatial structure का फ़ायदा उठाती है। इसमें filters (या kernels) पूरी image पर slide करते हैं और local patterns detect करते हैं।

एक trained CNN का filter कभी-कभी किसी human-recognizable pattern जैसा दिखता है — जैसे कि diagonal edge detector या color blob detector। यह visualization दिखाता है कि network ने वाकई कुछ "समझा" है, न कि सिर्फ़ data याद किया है।

2015 में Microsoft Research के Kaiming He ने ResNet architecture बनाई जिसमें 152 layers थीं। ImageNet पर ResNet की error rate 3.57% थी — human-level performance (5%) से भी बेहतर। Patterns ढूँढने की यह क्षमता अब human को पीछे छोड़ चुकी थी।

Language में Patterns

Images तक सीमित नहीं है यह pattern-finding क्षमता। Language में भी patterns होते हैं — grammar के, semantics के, और context के।

Word2Vec (Google, 2013) ने दिखाया कि words को ऐसे vectors में represent किया जा सकता है जहाँ: "King − Man + Woman ≈ Queen।" यह कोई human-coded relationship नहीं थी। Model ने text corpus से यह geometric relationship खुद खोजी।

Pattern Recognition की सीमा

जो patterns training data में नहीं हैं, वे model नहीं सीख सकता। यह limitation — training distribution से बाहर जाने में model की कमज़ोरी — आज भी AI research का एक central challenge है।

📝 क्विज़ · पाठ 2

हर जगह पैटर्न

तीन सवाल — neural networks और patterns।

1. Google Cat experiment में क्या मुख्य खोज हुई?
✓ बिल्कुल सही! Google Cat experiment ने दिखाया कि पर्याप्त data और computing पर neural networks बिना labels के भी meaningful features सीख सकते हैं।
✗ सही नहीं। मुख्य खोज यह थी कि network ने बिना किसी label के, सिर्फ़ unlabeled YouTube frames देखकर, खुद एक cat-detecting neuron विकसित किया।
2. Deep neural network में layers की hierarchy का क्या मतलब है?
✓ सही! Deep networks में पहली layers low-level features (edges, gradients) सीखती हैं, और deeper layers increasingly complex features (textures, shapes, complete objects) सीखती हैं।
✗ नहीं। Hierarchy का मतलब है कि पहली layers simple patterns (जैसे edges) और बाद की layers complex patterns (जैसे पूरे objects) सीखती हैं।
3. Word2Vec के "King − Man + Woman ≈ Queen" result का क्या महत्व है?
✓ बिल्कुल सही! Word2Vec ने दिखाया कि neural networks text से semantic relationships automatically सीख सकते हैं — यह human-coded नहीं था।
✗ सही नहीं। यह result इसलिए महत्वपूर्ण था क्योंकि model ने यह geometric relationship text corpus से खुद discover की — किसी ने explicitly program नहीं किया था।
🧪 लैब · पाठ 2

Pattern Recognition लैब

Neural Networks के feature learning को explore करें।

लैब का उद्देश्य

इस लैब में आप AI के साथ deep learning के pattern detection mechanism को समझेंगे।

सुझाए गए सवाल: "CNN filters को visually कैसे समझा जा सकता है?" · "ResNet ने 152 layers क्यों use कीं — क्या समस्या solve की?" · "Word2Vec के बाद language models में क्या बड़ा बदलाव आया?"
🤖 AI शिक्षक Pattern Recognition
🎯 Advanced · पाठ 3

मॉडल क्या होता है?

Parameters, weights, और वह mathematical structure जो AI को "AI" बनाती है।

मॉडल क्या है और यह वास्तविकता को सरल क्यों बनाता है?

जब OpenAI ने 2020 में GPT-3 release किया, तो उसमें 175 अरब parameters थे। इतने parameters को store करने के लिए 700 GB से अधिक memory चाहिए। Microsoft ने उसी साल GPT-3 का exclusive license $1 बिलियन में खरीदा। लेकिन parameter count अकेले performance नहीं तय करता — 2022 में DeepMind का Chinchilla model GPT-3 से छोटा था (70 बिलियन parameters) लेकिन training data के बेहतर अनुपात के कारण कई benchmarks पर उससे बेहतर था। यह case दिखाता है कि "model" सिर्फ़ एक संख्या नहीं — architecture, data, और training methodology सब मिलकर एक model बनाते हैं।

Parameters — Model की "यादें"

एक neural network model मूल रूप से numbers का एक विशाल collection है — इन्हें parameters या weights कहते हैं। Training के दौरान ये numbers adjust होते हैं ताकि model सही predictions करे।

GPT-3 के 175 billion parameters का मतलब है 175 अरब individual numbers, हर एक एक floating-point value। ये सभी मिलकर तय करते हैं कि दिए गए input पर model का output क्या होगा।

Analogy

एक model की parameters को एक विशाल recipe book की तरह सोचें जिसमें करोड़ों ingredients के exact proportions लिखे हों। Training वह process है जो इन proportions को धीरे-धीरे सही करती है।

Architecture — Structure का महत्व

Parameters के अलावा, model की architecture भी महत्वपूर्ण है — यानी neurons कैसे connected हैं, कितनी layers हैं, और information कैसे flow करती है।

  • Feedforward Networks: Information एक दिशा में बहती है
  • Convolutional Networks (CNN): Images के लिए, spatial patterns detect करने में कुशल
  • Recurrent Networks (RNN): Sequential data के लिए, past information याद रखती हैं
  • Transformers: Attention mechanism से, text के long-range dependencies capture करती हैं

Transformer architecture (2017, Google) ने GPT, BERT, और modern LLMs की नींव रखी। इसकी "attention" mechanism किसी sentence में हर word को हर दूसरे word से directly connect कर सकती है।

Chinchilla का सबक

2022 में DeepMind के शोधकर्ताओं ने एक महत्वपूर्ण paper publish किया। उन्होंने पाया कि बड़े models को अक्सर पर्याप्त data से train नहीं किया जाता। उनका "scaling law" था: parameters की संख्या और training tokens की संख्या का ratio लगभग 1:20 होना चाहिए।

GPT-3 (175B parameters) को 300B tokens पर train किया गया था — यह under-trained था। Chinchilla (70B parameters) को 1.4 trillion tokens पर train किया गया। नतीजा: Chinchilla ने GPT-3 को कई tasks पर पीछे छोड़ दिया।

निष्कर्ष

एक "model" सिर्फ़ उसके parameter count से define नहीं होता। Architecture का design, training data की quality और quantity, और optimization choices — सब मिलकर एक model की असली क्षमता तय करते हैं।

📝 क्विज़ · पाठ 3

मॉडल क्या होता है?

Parameters, architecture, और Chinchilla का सबक।

1. Chinchilla model ने GPT-3 से बेहतर performance कैसे हासिल की?
✓ सही! Chinchilla ने prove किया कि parameters और training data का सही ratio (लगभग 1:20) performance के लिए critical है।
✗ नहीं। Chinchilla में GPT-3 से कम parameters (70B vs 175B) थे। उसकी बढ़त ज़्यादा training tokens (1.4T vs 300B) से आई।
2. Transformer architecture की "attention" mechanism क्या करती है?
✓ बिल्कुल सही! Attention mechanism ही Transformer की मुख्य innovation थी — यह long-range dependencies को text में capture करने में कुशल है।
✗ सही नहीं। Transformer की attention mechanism किसी sequence में हर element को हर दूसरे element से directly relate करने देती है — यही इसकी शक्ति है।
3. Neural network के "parameters" क्या होते हैं?
✓ सही! Parameters वे numerical values हैं जो network के connections को define करते हैं — training इन्हीं को optimally adjust करने की process है।
✗ नहीं। Parameters वे numbers (weights और biases) हैं जो training के दौरान adjust होते हैं और model के behavior को define करते हैं।
🧪 लैब · पाठ 3

Model Architecture लैब

Parameters और Architecture के बारे में गहराई से जानें।

लैब का उद्देश्य

Model architecture और scaling के बारे में अपनी जिज्ञासाओं को explore करें।

सुझाए गए सवाल: "क्या parameters बढ़ाने से model हमेशा बेहतर होता है?" · "Transformer ने RNN को क्यों replace किया?" · "GPT-3 को train करने में कितना खर्च आया होगा?"
🤖 AI शिक्षक Model Architecture
🎯 Advanced · पाठ 4

Unsupervised और Reinforcement Learning

जब labels नहीं होते — और जब reward ही teacher होता है।

क्या AI बिना जवाब बताए सीख सकता है?

अक्टूबर 2017 में, DeepMind ने AlphaGo Zero announce किया। पिछला AlphaGo (जिसने 2016 में Lee Sedol को हराया था) human Go games से सीखा था। Zero ने केवल game के rules जाने — कोई human game नहीं देखा। यह सिर्फ़ खुद से खेलता रहा, जीत और हार से सीखता रहा। तीन दिन में यह AlphaGo को हराने लगा। 40 दिन में यह Go के पूरे इतिहास में सबसे मज़बूत खिलाड़ी बन गया था। Reinforcement Learning के इस प्रयोग ने दिखाया: जब reward signal स्पष्ट हो, तो human knowledge की ज़रूरत नहीं।

Unsupervised Learning — बिना Labels के

Supervised Learning में हर example के साथ एक label होता है। Unsupervised Learning में कोई label नहीं होता — model को raw data से patterns खुद ढूँढने होते हैं।

  • Clustering: Similar items को एक group में रखना (जैसे customer segmentation)
  • Dimensionality Reduction: High-dimensional data को compress करना (PCA, t-SNE)
  • Generative Models: नया data generate करना जो training data जैसा हो (GANs, VAEs)

Spotify का recommendation system clustering पर आधारित है। यह users को उनके listening patterns के आधार पर groups में रखता है — किसी ने Spotify को नहीं बताया कि "यह user jazz पसंद करता है।" Algorithm ने खुद यह pattern खोजा।

Self-Supervised Learning

Modern LLMs एक hybrid approach use करते हैं जिसे self-supervised learning कहते हैं। Text से labels automatically generate होती हैं: "अगले word को predict करो।" यह technically unsupervised है लेकिन supervision जैसा signal देता है।

Reinforcement Learning — Trial और Error

Reinforcement Learning (RL) में एक agent एक environment में actions लेता है और rewards या penalties प्राप्त करता है। समय के साथ वह उन actions की strategy सीखता है जो maximum cumulative reward देती हैं।

AlphaGo Zero में: Board = environment, Move = action, Winning = reward। Agent ने खुद से खेलकर (self-play) अरबों positions explore कीं और सीखा कि कौन से moves long-term में जीत की ओर ले जाते हैं।

  • Policy: किसी state में कौन सा action लेना है — यही model सीखता है
  • Reward Signal: हर action के बाद feedback (positive या negative)
  • Exploration vs Exploitation: नए moves try करें या proven moves use करें?

RLHF — Language Models में RL

ChatGPT और Claude जैसे modern language models में RL का एक विशेष version use होता है: RLHF (Reinforcement Learning from Human Feedback)।

इसमें human raters model के responses को rank करते हैं। इन rankings से एक "reward model" train होता है, जो फिर language model को better responses की ओर guide करता है। यह वही mechanism था जिसने ChatGPT को raw GPT-3 से qualitatively बेहतर बनाया।

AlphaGo Zero का बड़ा सबक

जब reward signal well-defined हो (Go में जीत/हार स्पष्ट है), तो RL human knowledge से भी बेहतर solutions खोज सकता है। लेकिन जब reward signal ambiguous हो (जैसे "helpful response"), तो human feedback ज़रूरी हो जाता है।

📝 क्विज़ · पाठ 4

Unsupervised और Reinforcement Learning

AlphaGo Zero से RLHF तक।

1. AlphaGo Zero और original AlphaGo में मुख्य अंतर क्या था?
✓ सही! AlphaGo Zero का क्रांतिकारी पहलू यह था कि इसने बिना किसी human game data के, केवल self-play और game rules से सीखा।
✗ नहीं। मुख्य अंतर था कि Zero ने कोई human Go game नहीं देखा — यह सिर्फ़ game rules जानता था और खुद से खेलकर सीखा।
2. RLHF (Reinforcement Learning from Human Feedback) में human feedback का क्या role है?
✓ बिल्कुल सही! RLHF में humans responses rank करते हैं → reward model train होता है → language model उस reward model से learn करता है।
✗ सही नहीं। RLHF में humans responses को rank करते हैं, जिससे एक reward model बनता है जो फिर language model को बेहतर responses की दिशा में train करता है।
3. Unsupervised Learning में "clustering" का क्या उपयोग है?
✓ सही! Clustering unlabeled data में natural groupings ढूँढता है — जैसे Spotify का listening pattern-based user segmentation।
✗ नहीं। Clustering का मतलब है similar data points को बिना predefined labels के groups में रखना — जैसे customer behavior patterns ढूँढना।
🧪 लैब · पाठ 4

RL और Unsupervised Learning लैब

AlphaGo Zero से लेकर RLHF तक — explore करें।

लैब का उद्देश्य

Reinforcement Learning और Unsupervised Learning के real-world applications को AI से discuss करें।

सुझाए गए सवाल: "Reinforcement Learning को real-world robotics में use करना इतना मुश्किल क्यों है?" · "Self-supervised learning और unsupervised learning में क्या फ़र्क है?" · "क्या RLHF में human biases model में आ सकते हैं?"
🤖 AI शिक्षक RL & Unsupervised
🎯 Advanced · पाठ 5

डेटा की समस्या

Bias, quality, और वह सच्चाई जो हर model के पीछे छुपी है।

क्या डेटा AI का सबसे ज़रूरी घटक है?

2015 में, Google Photos ने एक Black couple की photos को "gorillas" label किया। Google ने तुरंत माफ़ी माँगी और feature को disable किया। असली समस्या training data में थी: facial recognition datasets में predominantly lighter-skinned faces थे। MIT Media Lab की Joy Buolamwini ने 2018 में अपने "Gender Shades" study में document किया कि leading commercial face recognition systems की darker-skinned women पर error rate 34.7% तक थी — lighter-skinned men पर वही rate 0.8% थी। यह data bias का documented, measured, consequential example है।

Training Data ही Model है

एक model अपने training data से बेहतर नहीं हो सकता। यह AI का fundamental truth है। अगर training data में कोई pattern underrepresented है, model उसे poorly handle करेगा। अगर training data में systematic errors हैं, model वे errors सीखेगा।

Google Photos की गलती intentional नहीं थी। यह उस data का प्रतिबिंब था जो internet पर available था और जिसे engineers ने collect किया था। Data collection में unconscious choices — कौन सी websites crawl करें, कौन से images include करें — model के behavior को गहराई से shape करते हैं।

Garbage In, Garbage Out

Computer science में यह principle पुराना है: खराब input से खराब output आएगा। लेकिन ML में यह और subtle है — bias अक्सर तुरंत दिखाई नहीं देता। यह edge cases में, specific demographics के लिए, specific conditions में प्रकट होता है।

Data Quality की समस्याएँ

Data problems कई तरह के होते हैं:

  • Representation Bias: कुछ groups underrepresented हैं (जैसे facial recognition में dark skin)
  • Label Noise: Annotators ने गलत labels लगाए
  • Distribution Shift: Training data real-world data से अलग है
  • Temporal Bias: पुराना data नई realities reflect नहीं करता
  • Feedback Loops: Model के predictions खुद नए training data बन जाते हैं

Amazon ने 2014-2017 के बीच एक hiring AI tool बनाया जो resumes को automatically rank करता था। 2018 में पता चला कि tool women candidates को systematically downgrade कर रहा था — क्योंकि past successful employees ज़्यादातर पुरुष थे। Amazon ने tool को बंद कर दिया।

Data Governance — ज़िम्मेदारी

Data की समस्याएँ केवल technical नहीं हैं — वे ethical और legal भी हैं। European Union का GDPR (2018) और उससे पहले India का emerging data protection framework दोनों data collection और use पर restrictions लगाते हैं।

Joy Buolamwini के Gender Shades study के बाद, IBM, Microsoft, और Amazon तीनों ने अपने facial recognition systems में changes किए। एक academic paper ने billion-dollar products को बदलने पर मजबूर किया — क्योंकि data bias को publicly document और measure किया गया था।

समाधान की दिशा

Data diversity, systematic bias testing (जैसे Gender Shades ने किया), third-party audits, और diverse AI teams — ये सब data problems के partial solutions हैं। लेकिन कोई perfect solution नहीं है। Data vigilance एक ongoing process है।

📝 क्विज़ · पाठ 5

डेटा की समस्या

Bias, quality, और data governance।

1. Google Photos की 2015 की "gorilla" गलती का मूल कारण क्या था?
✓ सही! यह representation bias था — training data में predominantly lighter-skinned faces थे, इसलिए model darker-skinned faces को poorly handle करता था।
✗ नहीं। यह intentional racism नहीं था। यह training data में representation bias था — model ने वही सीखा जो data में था।
2. Amazon के hiring AI tool को 2018 में क्यों बंद किया गया?
✓ सही! यह feedback loop bias का classic example है — model ने historical hiring patterns से सीखा जो themselves biased थे।
✗ नहीं। Tool को बंद किया गया क्योंकि यह women को discriminate कर रहा था — historical data में पुरुषों का dominance था जो model ने सीख लिया।
3. "Distribution Shift" data problem क्या होती है?
✓ बिल्कुल सही! Distribution shift तब होती है जब model का training environment और deployment environment अलग हों — model को उन conditions से मिलाना मुश्किल हो जाता है।
✗ सही नहीं। Distribution shift का मतलब है कि real-world deployment data training data से systematically अलग है — model उन नई conditions में poorly perform करता है।
🧪 लैब · पाठ 5

Data Bias लैब

AI bias और data quality के real-world implications explore करें।

लैब का उद्देश्य

Data bias की वास्तविक समस्याओं और उनके solutions को AI के साथ discuss करें।

सुझाए गए सवाल: "भारत में AI bias के क्या specific risks हो सकते हैं?" · "Data bias को detect करने के लिए कौन से systematic methods हैं?" · "क्या fully unbiased AI training data possible है?"
🤖 AI शिक्षक Data Bias
🎯 Advanced · पाठ 6

Pretraining और Fine-Tuning

एक model, अनेक applications — Transfer Learning का युग।

इस्तेमाल से पहले मॉडल को कैसे प्रशिक्षित किया जाता है?

2018 में, Google ने BERT (Bidirectional Encoder Representations from Transformers) release किया। BERT को पूरे Wikipedia और BookCorpus पर pretrain किया गया — billions of words। फिर researchers ने उसी BERT को fine-tune करके 11 different NLP tasks पर state-of-the-art results हासिल किए — question answering, sentiment analysis, named entity recognition, सब एक ही base model से। एक Fortune 500 company ने BERT को अपने customer service emails पर fine-tune किया और 3 हफ़्ते में एक capable model तैयार किया — जिसे scratch से बनाने में 2 साल लगते। Transfer learning ने AI development का democratization शुरू किया।

Transfer Learning का विचार

एक medical student 12 साल पढ़ता है generic science — फिर 2-3 साल specialty में। वह general knowledge को specific application पर transfer करता है। Transfer Learning यही करती है।

Pretraining में एक model massive general corpus पर train होता है। यह expensive और time-consuming है — GPT-4 की training में अनुमानित $100 million+ लगा। लेकिन यह एक बार होता है।

Fine-tuning में उसी pretrained model को एक specific task के लिए relatively small dataset पर further train किया जाता है। यह fast और cheap है — कभी-कभी कुछ घंटों में।

क्यों काम करता है

Pretrained model ने भाषा, तर्क, और दुनिया के बारे में general knowledge compress करके अपने parameters में store किया है। Fine-tuning इस knowledge को reuse करती है — सब कुछ scratch से सीखना नहीं पड़ता।

BERT से GPT तक — Pretraining Strategies

अलग-अलग models अलग-अलग pretraining objectives use करते हैं:

  • BERT (Masked Language Modeling): Random words छुपाए जाते हैं, model उन्हें predict करता है — bidirectional context
  • GPT (Causal Language Modeling): Model अगला word predict करता है — left-to-right generation
  • T5 (Text-to-Text): सभी NLP tasks को text-to-text format में convert करके train

BERT reading comprehension के लिए better है क्योंकि वह दोनों directions से context देखता है। GPT generation के लिए better है। यह pretraining objective का direct consequence है।

Fine-Tuning के Types

Full fine-tuning में model के सभी parameters update होते हैं। लेकिन यह भी expensive हो सकता है। इसलिए lighter approaches develop हुए:

  • LoRA (Low-Rank Adaptation): केवल small adapter layers train होती हैं — 2024 का standard approach
  • Prompt Tuning: Soft prompts (learnable tokens) model के input में add होते हैं
  • Instruction Tuning: Model को specific instruction-following format पर train किया जाता है

LoRA ने fine-tuning को democratize किया — एक researcher अब एक consumer GPU पर large models fine-tune कर सकता है। Stability AI और Hugging Face ने इस approach को open-source community में popularize किया।

Catastrophic Forgetting

Fine-tuning का एक risk है: अगर model को एक narrow task पर over-train किया जाए, तो वह पहले सीखी general knowledge "भूल" सकता है। इसे catastrophic forgetting कहते हैं और यह एक active research area है।

📝 क्विज़ · पाठ 6

Pretraining और Fine-Tuning

BERT, GPT, और Transfer Learning।

1. BERT और GPT के pretraining में मुख्य अंतर क्या है?
✓ सही! यह pretraining objective का फ़र्क है: BERT का masked LM bidirectional context देता है (reading के लिए better), GPT का causal LM generation के लिए बेहतर है।
✗ नहीं। मुख्य अंतर training objective में है: BERT masked language modeling use करता है (दोनों directions से context), GPT left-to-right next-word prediction use करता है।
2. "Catastrophic Forgetting" fine-tuning में क्या होता है?
✓ सही! Catastrophic forgetting तब होता है जब narrow fine-tuning model की pretrained general capabilities को overwrite कर देती है।
✗ नहीं। Catastrophic forgetting तब होता है जब fine-tuning model को एक specific task पर over-specialize कर देती है और वह पहले की general knowledge खो देता है।
3. LoRA (Low-Rank Adaptation) ने fine-tuning को कैसे democratize किया?
✓ बिल्कुल सही! LoRA ने compute cost dramatically reduce की — अब researchers बड़े models को consumer hardware पर fine-tune कर सकते हैं।
✗ नहीं। LoRA ने full model retraining के बजाय small adapter layers train करके fine-tuning को computationally feasible बनाया — consumer GPUs पर भी।
🧪 लैब · पाठ 6

Pretraining और Fine-Tuning लैब

Transfer Learning की practical applications को explore करें।

लैब का उद्देश्य

Pretraining और fine-tuning के practical aspects को AI के साथ discuss करें।

सुझाए गए सवाल: "Hindi language के लिए fine-tuning में क्या specific challenges होंगी?" · "एक startup किसी open-source model को fine-tune करके product कैसे बना सकता है?" · "Instruction tuning ने chatbots को कैसे बेहतर बनाया?"
🤖 AI शिक्षक Transfer Learning
🎯 Advanced · पाठ 7

मूल्यांकन और Benchmarks

हम कैसे जानते हैं कि एक model "अच्छा" है? — और जब benchmarks झूठ बोलते हैं।

हमें कैसे पता कि मॉडल ने अच्छे से सीखा?

2023 में, कई AI companies अपने models को MMLU (Massive Multitask Language Understanding) benchmark पर near-human या superhuman performance claim कर रहे थीं। MMLU में 57 subjects पर multiple-choice questions हैं — medical, legal, math, history। लेकिन UC Berkeley के शोधकर्ताओं ने 2024 में पाया कि models ने MMLU के questions को training data में देखा था — "benchmark contamination।" जब उन्होंने नए, unseen questions से test किया तो performance significantly drop हुई। यह "Goodhart's Law" का AI version था: जब एक measure target बन जाता है, वह अच्छा measure नहीं रहता।

Benchmark क्या है और क्यों ज़रूरी है

AI research में progress को मापने के लिए standardized tests ज़रूरी हैं। Benchmarks ऐसे datasets और tasks होते हैं जिन पर models को evaluate किया जाता है।

  • MMLU: General knowledge, reasoning, multiple disciplines
  • HumanEval: Code generation — functional correct programs write करना
  • TruthfulQA: Factual accuracy — model कितना truthful है
  • GLUE/SuperGLUE: NLP tasks का suite — reading comprehension, inference
  • HellaSwag: Common sense reasoning

Benchmarks researchers को यह compare करने देते हैं कि Model A बेहतर है या Model B। बिना standardized tests के, हर company अपने metric पर "best" claim कर सकती है।

Benchmark का इतिहास

ImageNet ने deep learning को accelerate किया। लेकिन जब ResNet ने 2015 में human-level ImageNet performance achieve की, तो AI researchers ने realize किया कि ImageNet "solved" हो गया — और नए, harder benchmarks ज़रूरी थे।

Goodhart's Law और Benchmark Gaming

जब companies अपने models को specific benchmarks पर optimize करती हैं — चाहे वह training data में benchmark questions शामिल करके हो, या hyperparameters को specifically उस benchmark के लिए tune करके — तो benchmark score real-world performance को represent नहीं करती।

MMLU contamination के अलावा, 2023 में यह भी पाया गया कि कुछ models HellaSwag पर multiple-choice format की specifics exploit करके अच्छा score कर रहे थे — actual common sense से नहीं।

Overfitting to Benchmarks

यह training data overfitting का एक broader version है। जैसे model training data को memorize कर सकता है, उसी तरह AI field पूरे benchmarks को "overfit" कर सकता है — numbers improve होते हैं लेकिन actual capabilities नहीं।

Better Evaluation की ओर

इस समस्या के जवाब में नए evaluation approaches develop हो रहे हैं:

  • LMSYS Chatbot Arena: Anonymous human preference voting — real users real tasks पर judge करते हैं
  • BIG-Bench Hard: Challenging tasks जो current models को genuinely struggle करवाती हैं
  • HELM (Holistic Evaluation): Multiple dimensions — accuracy के साथ fairness, robustness, efficiency
  • Dynamic Benchmarks: Regularly नए questions add होते हैं जिन्हें training में include होने का मौका नहीं मिला

Evaluation एक ongoing arms race है: जैसे ही एक benchmark "solved" हो जाता है, researchers नए बनाते हैं। यह process ही AI progress को honest रखती है।

📝 क्विज़ · पाठ 7

मूल्यांकन और Benchmarks

Goodhart's Law, contamination, और honest evaluation।

1. "Benchmark Contamination" क्या होती है?
✓ सही! Contamination तब होती है जब model ने training में benchmark questions देखे हों — यह memorization है, genuine capability नहीं।
✗ नहीं। Benchmark contamination तब होती है जब model के training data में वे exact questions या answers होते हैं जो benchmark में use किए गए हैं।
2. LMSYS Chatbot Arena किस तरह traditional benchmarks से अलग है?
✓ बिल्कुल सही! Chatbot Arena का approach contamination-proof है क्योंकि real users real-time में अपनी असली ज़रूरतों पर models को judge करते हैं।
✗ नहीं। LMSYS Chatbot Arena में real users anonymous model pairs को अपने actual tasks पर rate करते हैं — यह human preference-based evaluation है।
3. "Goodhart's Law" AI benchmarks पर कैसे apply होती है?
✓ सही! Goodhart's Law कहती है: "When a measure becomes a target, it ceases to be a good measure." AI में यह benchmark gaming और contamination के रूप में दिखता है।
✗ नहीं। Goodhart's Law कहती है कि जब कोई metric target बन जाती है, तो लोग उस metric को optimize करते हैं — underlying thing को नहीं। AI में benchmark scores इसी तरह misleading हो सकते हैं।
🧪 लैब · पाठ 7

Evaluation लैब

AI evaluation methods और उनकी limitations को explore करें।

लैब का उद्देश्य

Benchmarks, evaluation strategies, और उनकी real-world limitations पर AI से discussion करें।

सुझाए गए सवाल: "एक company अपने AI product को honestly evaluate करने के लिए क्या करे?" · "क्या AI कभी 100% accurate benchmark score achieve कर सकता है?" · "Hindi language models को कैसे evaluate किया जाए?"
🤖 AI शिक्षक Evaluation
🎯 Advanced · पाठ 8

सीमा: AI क्या नहीं सीख सकता?

Frontier पर खड़े होकर — वह जो अभी भी impossible है।

आज का AI कौन-सी चीज़ें नहीं सीख सकता?

2022 में, Meta AI ने Galactica — एक scientific knowledge model — release किया। तीन दिन में उसे withdraw कर लिया गया। Galactica confidently गलत scientific facts generate कर रहा था, fake citations invent कर रहा था, और racial biases को वैज्ञानिक language में package कर रहा था। Model को 48 million scientific papers पर train किया गया था। फिर भी वह यह नहीं जानता था कि "मुझे नहीं पता।" Large language models एक fundamental limitation share करते हैं: वे अपनी uncertainty को calibrate नहीं कर सकते। वे pattern-matching machines हैं — और patterns हमेशा truth नहीं होते।

Hallucination — जब AI झूठ बोलता है आत्मविश्वास से

Hallucination वह phenomenon है जिसमें language models confident, fluent, और plausible-sounding text generate करते हैं जो factually गलत होता है। Galactica इसका extreme example था।

Hallucination क्यों होती है? क्योंकि LLMs को "truth predict करने" के लिए train नहीं किया जाता — उन्हें "अगला probable token predict करने" के लिए train किया जाता है। इन दोनों में fundamental difference है।

Stochastic Parrot Problem

2021 में Emily Bender, Timnit Gebru और colleagues ने "On the Dangers of Stochastic Parrots" paper में argue किया कि LLMs statistical patterns को fluently reproduce करते हैं — meaning नहीं समझते। यह hallucination की deeper philosophical explanation है।

Reasoning की सीमाएँ

Modern LLMs impressive reasoning capabilities दिखाते हैं — लेकिन systematic failures भी हैं:

  • Compositional Generalization: नई concepts को नए ways में combine करना मुश्किल है
  • Causal Reasoning: "A से B होता है" को "अगर A न हो तो B न होता?" में convert करना कठिन
  • Systematic Counting: Large numbers count करना या precise mathematical operations unreliable हैं
  • Spatial Reasoning: 3D space में objects की positions track करना कमज़ोर है

2023 में Stanford के researchers ने दिखाया कि GPT-4 simple logic puzzles में systematic errors करता है जो 8-year-old child नहीं करता। Performance impressive थी लेकिन human-like reasoning से fundamentally अलग थी।

जो AI अभी नहीं सीख सका

Research frontier पर कुछ challenges हैं जो अभी solved नहीं हुईं:

  • Continual Learning: नई information सीखते हुए पुरानी knowledge retain करना
  • True Causal Understanding: Correlation नहीं, causation — "क्यों" का जवाब देना
  • Long-horizon Planning: Dozens of steps ahead plan करना, dependencies track करते हुए
  • Physical World Understanding: Gravity, fluid dynamics, human emotions का intuitive model
  • Self-awareness of Limitations: Model खुद नहीं जानता कि वह क्या नहीं जानता
Galactica का असली सबक

Galactica की failure ने remind किया: knowledge को compress करना और knowledge को understand करना अलग-अलग हैं। 48 million papers का pattern-compression ≠ scientific understanding। यह frontier वह जगह है जहाँ आज के सबसे बड़े researchers काम कर रहे हैं।

इन limitations को समझना उतना ही ज़रूरी है जितना capabilities को। जो AI researcher, policy-maker, या user इन boundaries को जानता है, वही AI को effectively और responsibly use कर सकता है।

📝 क्विज़ · पाठ 8

AI की सीमाएँ

Hallucination, reasoning failures, और frontier challenges।

1. Galactica को तीन दिन में withdraw क्यों किया गया?
✓ सही! Galactica hallucination का एक stark example था — high confidence + incorrect information, एक dangerous combination।
✗ नहीं। Galactica को हटाया गया क्योंकि वह confidently गलत scientific information generate कर रहा था और अपनी uncertainty नहीं जानता था।
2. LLMs में hallucination का मूल कारण क्या है?
✓ बिल्कुल सही! यही hallucination का core reason है — "probable next token" और "factual truth" अलग-अलग optimization targets हैं।
✗ नहीं। Hallucination का मूल कारण यह है कि LLMs को next-token probability maximize करने के लिए train किया जाता है, truth के लिए नहीं।
3. "Continual Learning" AI research में क्या challenge है?
✓ सही! Continual learning का challenge यही है: current models नई चीज़ें सीखते वक्त पुरानी knowledge को overwrite कर देते हैं — यह unsolved problem है।
✗ नहीं। Continual learning का मतलब है कि model समय के साथ नया सीखे लेकिन पुराना न भूले — यह catastrophic forgetting problem को overcome करना है।
🧪 लैब · पाठ 8

AI की सीमाएँ — लैब

Hallucination और frontier challenges को AI के साथ explore करें।

लैब का उद्देश्य

AI की वर्तमान limitations को practically समझें — directly AI से पूछकर।

सुझाए गए सवाल: "आप (AI) खुद कैसे जानते हैं कि आप कुछ नहीं जानते?" · "Hallucination को reduce करने के लिए कौन से practical techniques use होती हैं?" · "AGI (Artificial General Intelligence) को इन limitations को overcome करने के लिए क्या चाहिए होगा?"
🤖 AI शिक्षक AI की सीमाएँ

📋 मॉड्यूल टेस्ट

Module 6: How AI Learns — 15 प्रश्न · सभी पाठों से

प्रश्न 1 / 15
Supervised Learning में training data में क्या होना अनिवार्य है?
✓ सही! Supervised Learning में हर training example के साथ एक label होना ज़रूरी है — यही "supervision" है।
✗ नहीं। Supervised Learning की defining characteristic यह है कि training data में inputs के साथ human-provided labels होते हैं।
प्रश्न 2 / 15
AlexNet ने 2012 ImageNet में पिछले best result की error rate को कितने से कम किया?
✓ सही! AlexNet ने error rate को ~26% से 15.3% तक — लगभग 10 points — घटाया। यह एक unprecedented leap था।
✗ नहीं। AlexNet ने error rate को लगभग 26% से 15.3% तक — 10+ percentage points — reduce किया, जो उस समय unprecedented था।
प्रश्न 3 / 15
Google Cat experiment (2013) में क्या सीखा गया?
✓ बिल्कुल सही! यह unsupervised feature learning का landmark proof था।
✗ नहीं। Google Cat experiment ने दिखाया कि large-scale unsupervised learning से neural networks meaningful features automatically discover करते हैं।
प्रश्न 4 / 15
Deep neural network की "feature hierarchy" का क्या अर्थ है?
✓ सही! यह automatic hierarchy deep learning की defining property है — explicitly programmed नहीं, बल्कि training से emerge होती है।
✗ नहीं। Feature hierarchy का मतलब है early layers low-level (edges, gradients) और deeper layers high-level (textures, objects, concepts) features सीखती हैं।
प्रश्न 5 / 15
GPT-3 vs Chinchilla comparison से क्या सीख मिली?
✓ सही! Chinchilla paper ने scaling laws को redefine किया — model size और data size दोनों को balance करना ज़रूरी है।
✗ नहीं। Chinchilla ने दिखाया कि optimal training के लिए parameters और training data का अनुपात matter करता है — बस parameter count नहीं।
प्रश्न 6 / 15
AlphaGo Zero ने किस learning paradigm का use किया?
✓ बिल्कुल सही! AlphaGo Zero pure RL था — environment: Go board, reward: win/loss, training: self-play।
✗ नहीं। AlphaGo Zero ने Reinforcement Learning use किया — केवल game rules और self-play से, बिना किसी human game data के।
प्रश्न 7 / 15
Joy Buolamwini के "Gender Shades" study ने क्या document किया?
✓ सही! यह representation bias का measurable, documented proof था जिसने IBM, Microsoft, Amazon को changes करने पर मजबूर किया।
✗ नहीं। Gender Shades ने specifically measure किया कि darker-skinned women पर error rate 34.7% तक था — lighter-skinned men की तुलना में 43 गुना ज़्यादा।
प्रश्न 8 / 15
Transfer Learning में "pretraining" और "fine-tuning" का क्या संबंध है?
✓ सही! यही transfer learning का core insight है — expensive general learning एक बार करो, फिर specific needs के लिए cheaply adapt करो।
✗ नहीं। Pretraining = massive data पर expensive general training (once)। Fine-tuning = specific task के लिए छोटे data से fast, cheap adaptation।
प्रश्न 9 / 15
BERT का pretraining objective क्या था?
✓ सही! BERT की Masked LM ने bidirectional understanding enable किया — यही इसे reading comprehension tasks के लिए particularly effective बनाता है।
✗ नहीं। BERT ने Masked Language Modeling use किया — text में random words छुपाए जाते हैं और model को उन्हें left और right दोनों context से predict करना होता है।
प्रश्न 10 / 15
MMLU benchmark contamination problem क्या थी?
✓ सही! यही Goodhart's Law का AI version है — benchmark target बन गया और measure नहीं रहा।
✗ नहीं। MMLU contamination का मतलब था कि models ने training में वे exact questions देखे थे जो benchmark में थे — यह genuine capability नहीं, memorization था।
प्रश्न 11 / 15
LoRA (Low-Rank Adaptation) technique का मुख्य advantage क्या है?
✓ सही! LoRA ने fine-tuning को democratize किया — expensive full model retraining की ज़रूरत नहीं।
✗ नहीं। LoRA का advantage यह है कि यह केवल small adapter layers train करती है, पूरे model को नहीं — इससे compute cost dramatically कम हो जाती है।
प्रश्न 12 / 15
Amazon का hiring AI tool 2018 में क्यों बंद किया गया?
✓ सही! यह historical data bias का direct consequence था — past biased data → biased model → biased decisions।
✗ नहीं। Amazon के hiring tool को बंद किया गया क्योंकि इसने women को discriminate किया — पुराने biased hiring patterns को training में सीखकर।
प्रश्न 13 / 15
Reinforcement Learning में "reward signal" का क्या role है?
✓ सही! Reward signal ही RL में teacher का काम करता है — agent इसे maximize करने के लिए अपनी policy optimize करता है।
✗ नहीं। Reward signal वह feedback है जो agent को हर action के बाद मिलता है — agent ऐसी policy सीखता है जो maximum cumulative reward दे।
प्रश्न 14 / 15
LLMs में hallucination को fundamentally reduce करने में क्या challenge है?
✓ सही! यह fundamental misalignment है — probability ≠ truth। इसीलिए hallucination एक active research challenge बना हुआ है।
✗ नहीं। Hallucination का root cause यह है कि LLMs को next-token prediction के लिए optimize किया जाता है — factual correctness के लिए नहीं। ये different goals हैं।
प्रश्न 15 / 15
Transformer architecture (2017) की सबसे important innovation क्या थी?
✓ सही! Attention mechanism ही Transformer की core innovation थी — यही GPT, BERT, और modern LLMs का foundation बना।
✗ नहीं। Transformer की defining innovation self-attention mechanism थी जो long-range dependencies को efficiently capture करती है — यही modern LLMs की नींव है।