Diffusion LLM
यह क्यों मायने रखता है
गहन अध्ययन
एक ऑटोरिग्रेसिव model वैसे लिखता है जैसे कोई व्यक्ति type करता है: एक के बाद एक token, जिनमें हर token अपने से पहले की हर चीज़ पर conditioned होता है और लिखी जा चुकी चीज़ को revise करने का कोई तरीका नहीं होता। Diffusion LLM पूरे draft वाले editor की तरह अधिक काम करता है। Training उसे ऐसी sequence लेने के लिए सिखाती है जिसमें कुछ या सभी tokens mask किए गए हों और originals को predict करने देती है, इसलिए inference के समय वह इच्छित length के पूरी तरह masked canvas से शुरू करके passes की series में उसे भर सकता है और text के converge होने तक tokens को unmask या correct करता रह सकता है। क्योंकि हर position उसी forward pass में update होती है, model पूरा उत्तर एक साथ plan कर सकता है और हर token के दोनों ओर का context इस्तेमाल कर सकता है। यह idea image डिफ़्यूज़न मॉडल के पीछे की denoising process से सीधे लिया गया है, जिसे continuous pixels के बजाय discrete vocabulary के लिए फिर से बनाया गया है।
Denoising Loop कैसे काम करता है
अधिकतर text diffusion models images में इस्तेमाल होने वाले Gaussian noise के बजाय masked, यानी absorbing-state, formulation अपनाते हैं। Training के दौरान clean sequence के tokens का random हिस्सा special mask token से बदल दिया जाता है और model छिपी हुई चीज़ predict करना सीखता है; corruption rate कुछ percent से पूरी sequence तक बदलती रहती है और यह encoder models को train करने वाले Masked Language Modeling objective का बड़े scale वाला संबंधी है। Generation के समय model पूरी तरह masked canvas से शुरू होता है, हर masked position के लिए candidate टोकन parallel रूप से predict करता है, फिर केवल उन्हीं tokens को commit करता है जिन पर उसे सबसे अधिक confidence है और बाकी को अगले step के लिए फिर mask कर देता है। ऐसे कुछ दर्जन steps के बाद sequence पूरी हो जाती है। एक आम practical variant semi-autoregressive decoding है: canvas को blocks में बाँटा जाता है जो बाएँ से दाएँ generate होते हैं, लेकिन हर block parallel denoising से भरा जाता है, जिससे diffusion का parallelism classic generation की कुछ ordering guarantees के साथ मिल जाता है।
Speed का गणित अलग क्यों है
Autoregressive model को हर output token के लिए एक forward pass चाहिए, इसलिए 1,000-token answer का अर्थ 1,000 sequential steps है जिन्हें parallelize नहीं किया जा सकता; KV Cache हर step को सस्ता रखता है, लेकिन steps फिर भी एक के बाद एक होते हैं। Diffusion LLM को हर refinement step के लिए एक forward pass चाहिए और step count ऐसा tunable dial है जो output length के साथ नहीं बढ़ता, इसलिए सिद्धांततः छोटे तथा लंबे answer की लेटेंसी लगभग समान होती है। Mercury models के पीछे की startup Inception Labs standard GPUs पर प्रति second 1,000 से अधिक tokens की generation speed का दावा करती है — यह संख्या exotic hardware से नहीं बल्कि इसी parallelism से आती है। Tradeoff यह है कि हर pass पूरे canvas पर attention फिर compute करता है और caching से बहुत कम लाभ पाता है, इसलिए प्रति pass compute अधिक है और real-world advantage सबसे साफ़ Throughput-oriented serving में दिखाई देता है, जहाँ कई sequences को एक batch में refine किया जा सकता है।
Bidirectional Context और Infilling
क्योंकि architecture में बाएँ से दाएँ जाने वाला arrow नहीं है, Diffusion LLM हर token को उसके आसपास, पहले और बाद की हर चीज़ पर condition करता है। इससे infilling special mode के बजाय first-class operation बन जाता है: आप model को बीच का हिस्सा masked-out वाला document देकर केवल वही span regenerate करने, आसपास का text स्थिर रखने या अपने draft को iteratively revise करने को कह सकते हैं। यह lineage BERT जैसे encoder models तक जाती है, जिन्होंने दिखाया था कि masked prediction मज़बूत bidirectional representations सीखती है लेकिन open-ended generation के लिए उसका इस्तेमाल कभी नहीं हुआ; कई मायनों में Diffusion LLMs उसी idea का छूटा हुआ generative आधा हिस्सा हैं। यही property उन tasks में मदद करती है जहाँ शुरुआत और अंत बीच के हिस्से को constrain करते हैं, जैसे function body complete करना या fixed template में fit होने के लिए sentence rewrite करना।
यह अभी Autoregressive Models की जगह नहीं लेगा
Demo numbers वास्तविक हैं, लेकिन frontier autoregressive models से gap बंद नहीं हुआ है। Standard मूल्यांकन पर सर्वोत्तम diffusion models leaderboard के शीर्ष पर पहुँचने के बजाय समान size के मज़बूत open models के आसपास रहते हैं, और quality बढ़ाने वाली tricks — अधिक refinement steps और अधिक भारी re-masking schedules — speed advantage को सीधे कम करती हैं। अधिक कठिन structural problem length है: answer क्या है यह जानने से पहले model canvas size तय करता है, इसलिए उसे response की length का अनुमान लगाना, छोटे answers को pad करना या generation के बीच canvas को shrink और regrow करना पड़ता है, और ये सभी solved engineering के बजाय active research areas हैं। Tooling gap भी मायने रखता है: vLLM से लेकर major inference APIs तक serving stack key-value cache वाली left-to-right decoding के लिए बना है, इसलिए diffusion models अभी bespoke infrastructure पर चलते हैं जिसे अधिकतर teams सीधे नहीं अपना सकतीं।
इन्हें कौन बना रहा है
तीन नाम इस field के केंद्र में हैं। Academic researchers के LLaDA ने दिखाया कि multi-billion-parameter scale पर शुरुआत से train किया गया masked diffusion model instruction-following benchmarks पर comparable autoregressive models के सामने टिक सकता है, और open weights के रूप में उसकी release ने community को experiments के लिए base दिया। Inception Labs का Mercury commercial flag-bearer है: code और general chat पर केंद्रित API-served models का family जो speed की कहानी पर बहुत ज़ोर देता है। Gemini Diffusion Google की experimental entry है, जिसे उसके mainline models के साथ fast-sampling mode के रूप में रखा गया है। अंदरूनी architecture work का बड़ा हिस्सा image generation को modernize करने वाली Diffusion Transformer research पर आधारित है, और इस space की अधिकतर teams diffusion को autoregressive modeling का replacement नहीं बल्कि toolbox में रखने वाला दूसरा decoding paradigm मानती हैं।