भाग 3 · डिप्लॉय और उपयोग करें अध्याय 9
Multimodal
Vision और language कैसे align होते हैं, और images कैसे बनती हैं: CLIP की contrastive learning, LLaVA की visual instruction tuning, एक image कितने tokens लेती है, और diffusion व flow matching noise से images, robot actions व text कैसे बनाते हैं।
यह अध्याय पूरा करने पर आप
- Visual encoder, projection layer और language model image को tokens में बदलकर text से कैसे align करते हैं, साफ़ बताएँ।
- एक image कितने visual tokens लेती है, और उसका KV Cache व latency पर क्या असर होता है, अनुमान लगाएँ।
- Resolution मॉडल को छोटे अक्षर क्यों नहीं पढ़ने देती, समझाएँ, और उसके आधार पर image preprocessing चुनें।
- Diffusion model और flow matching का training objective व sampling process लिखें, और steps, guidance strength व sample quality के बीच का व्यापार बताएँ।
- "Image पढ़ने" वाले vision-language models और "image बनाने" वाले diffusion व flow matching models में फ़र्क़ करें, और उनके साझा components (ViT, Transformer, text encoder) बताएँ।
Multimodal मॉडलों का मूल विचार: एक visual encoder image को vectors में बदलता है, फिर projection layer उन्हें language model के समझने योग्य tokens में “अनुवाद” करती है। ऐसा होने पर पिछले अध्यायों की attention, KV Cache व inference serving की सारी जानकारी images पर भी वैसे ही लागू होती है — sequence में बस visual tokens का एक अतिरिक्त हिस्सा जुड़ जाता है।
इस अध्याय के दो pages “image पढ़ना” और “image बनाना” के सवाल जवाब देते हैं। पहला page “image देखकर बोलने” वाले vision-language models पर केंद्रित है: image tokens कैसे बनते हैं, कितनी क़ीमत होती है, छोटे अक्षर पढ़े जाते हैं या नहीं — ये engineering सवाल गहराई से। दूसरा page diffusion models व flow matching पढ़ाता है: 2D data पर शून्य से implement करके steps, guidance strength व sample quality का संबंध नापता है, फिर latent space diffusion, DiT, और robot actions व text की generation तक बढ़ाता है। Audio व video बाद में जुड़ेंगे।
संबंधित papers: CLIP, LLaVA, DDPM और Flow Matching for Generative Modeling।
World models और planning representation prediction, planning व feedback के ज़रिए visual समझ को control से जोड़ता है, और grid तुलना से जाँचता है कि replanning कब चाहिए।
अध्याय मार्ग
- 9.1
Multimodal LLM: image kaise token banti hai
Vision-language model image ko patch, visual encoder, merge aur projection se visual tokens banata hai, text ke saath LM mein bhejta hai। CLIP contrastive learning, LLaVA ke do-phase training, dynamic resolution ke tokens aur KV Cache, aur resolution chhote akshar padhne par kya asar - naapi kar।
पूर्वापेक्षाएँ3.2Transformer attention तंत्र की शुरुआत2.5शब्द एम्बेडिंग और Tokenizer का सिद्धांत7.3KV cache aur inference performance optimization
- 9.2
Diffusion aur flow matching
Diffusion model jaane-maane noise process se data ko Gaussian noise banata hai, phir network use kadam-dar-kadam wapas laana seekhta hai; flow matching usi ko velocity field ka regression likhta hai। 2D data par DDPM, DDIM, flow matching aur reflow zero se; steps vs quality, aur CFG ka trade-off।
पूर्वापेक्षाएँ2.3न्यूरल नेटवर्क की मूल बातें3.2Transformer attention तंत्र की शुरुआत9.1Multimodal LLM
- 9.3
World models और planning: state का पूर्वानुमान से closed-loop control तक
World model actions से भविष्य की state का पूर्वानुमान लगाता है; planner उससे actions की तुलना करता है, वास्तविक observation से रास्ता सुधारता है। Pixel prediction, latent representation व dynamics अलग करके, grid प्रयोग से prediction error के बाद की replanning दोहराता है।
पूर्वापेक्षाएँ9.1Multimodal LLM6.4RL fundamentals