Files
Varuna Jayasiri ef7268e89c si
2023-02-27 14:18:36 +05:30

172 lines
15 KiB
HTML

<!DOCTYPE html>
<html lang="si">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content="මෙය PyTorch ක්රියාත්මක කිරීම/ට්රාන්ස්ෆෝමර් සහ අදාළ ශිල්පීය ක්රම පිළිබඳ නිබන්ධන එකතුවකි."/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:image:src" content="https://avatars1.githubusercontent.com/u/64068543?s=400&amp;v=4"/>
<meta name="twitter:title" content="ට්රාන්ස්ෆෝමර්"/>
<meta name="twitter:description" content="මෙය PyTorch ක්රියාත්මක කිරීම/ට්රාන්ස්ෆෝමර් සහ අදාළ ශිල්පීය ක්රම පිළිබඳ නිබන්ධන එකතුවකි."/>
<meta name="twitter:site" content="@labmlai"/>
<meta name="twitter:creator" content="@labmlai"/>
<meta property="og:url" content="https://nn.labml.ai/transformers/index.html"/>
<meta property="og:title" content="ට්රාන්ස්ෆෝමර්"/>
<meta property="og:image" content="https://avatars1.githubusercontent.com/u/64068543?s=400&amp;v=4"/>
<meta property="og:site_name" content="ට්රාන්ස්ෆෝමර්"/>
<meta property="og:type" content="object"/>
<meta property="og:title" content="ට්රාන්ස්ෆෝමර්"/>
<meta property="og:description" content="මෙය PyTorch ක්රියාත්මක කිරීම/ට්රාන්ස්ෆෝමර් සහ අදාළ ශිල්පීය ක්රම පිළිබඳ නිබන්ධන එකතුවකි."/>
<title>ට්රාන්ස්ෆෝමර්</title>
<link rel="shortcut icon" href="/icon.png"/>
<link rel="stylesheet" href="../pylit.css?v=1">
<link rel="canonical" href="https://nn.labml.ai/transformers/index.html"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.18/dist/katex.min.css" integrity="sha384-zTROYFVGOfTw7JV7KUu8udsvW2fx4lWOsCEDqhBreBwlHI4ioVRtmIvEThzJHGET" crossorigin="anonymous">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4V3HC8HBLH"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-4V3HC8HBLH');
</script>
</head>
<body>
<div id='container'>
<div id="background"></div>
<div class='section'>
<div class='docs'>
<p>
<a class="parent" href="/">home</a>
<a class="parent" href="index.html">transformers</a>
</p>
<p>
<a href="https://github.com/labmlai/annotated_deep_learning_paper_implementations" target="_blank">
<img alt="Github"
src="https://img.shields.io/github/stars/labmlai/annotated_deep_learning_paper_implementations?style=social"
style="max-width:100%;"/></a>
<a href="https://twitter.com/labmlai" rel="nofollow" target="_blank">
<img alt="Twitter"
src="https://img.shields.io/twitter/follow/labmlai?style=social"
style="max-width:100%;"/></a>
</p>
<p>
<a href="https://github.com/labmlai/annotated_deep_learning_paper_implementations/tree/master/labml_nn/transformers/__init__.py" target="_blank">
View code on Github</a>
</p>
</div>
</div>
<div class='section' id='section-0'>
<div class='docs doc-strings'>
<div class='section-link'>
<a href='#section-0'>#</a>
</div>
<h1>ට්රාන්ස්ෆෝමර්</h1>
</a> <p>මෙමමොඩියුලයේ <a href="https://pytorch.org/">PyTorch ක්රියාත්මක කිරීම් සහ කඩදාසි වලින් මුල් ට්රාන්ස්ෆෝමර් පැහැදිලි කිරීම් අඩංගු <a href="https://papers.labml.ai/paper/1706.03762">වේ අවධානය ඔබට අවශ්ය සියල්ල</a> සහ එහි ව්යුත්පන්නයන් සහ වැඩි දියුණු කිරීම්. </p>
<ul><li><a href="mha.html">බහු-හිස අවධානය</a> </li>
<li><a href="models.html">ට්රාන්ස්ෆෝමර් එන්කෝඩර් සහ විකේතක ආකෘති</a> </li>
<li><a href="feed_forward.html">ස්ථාන-නැණවත් පෝෂක ඉදිරි ජාලය (FFN)</a> </li>
<li><a href="positional_encoding.html">ස්ථාවර ස්ථානීය කේතීකරණය</a></li></ul>
<h2><a href="xl/index.html">ට්රාන්ස්ෆෝමර් 40</a></h2>
<p>මෙය <a href="xl/relative_mha.html">සාපේක්ෂ බහු-හිස අවධානය</a>භාවිතා කරමින් ට්රාන්ස්ෆෝමර් එක්ස්එල් ආකෘතිය ක්රියාත්මක කරයි</p>
<h2><a href="rope/index.html">රොටරි ස්ථානීය කාවැද්දීම්</a></h2>
<p>මෙයරොටරි ස්ථානීය කාවැද්දීම් (කඹය) ක්රියාත්මක කරයි</p>
<h2><a href="alibi/index.html">රේඛීය නැඹුරුව සමඟ අවධානය යොමු කරන්න</a></h2>
<p>මෙයරේඛීය අගතීන් (අලිබී) සමඟ අවධානය යොමු කරයි. </p>
<h2><a href="retro/index.html">රෙට්රො</a></h2>
<p>මෙයනැවත ලබා ගත හැකි වැඩිදියුණු කළ ට්රාන්ස්ෆෝමරය (RETRO) ක්රියාත්මක කරයි. </p>
<h2><a href="compressive/index.html">සම්පීඩ්යතා ට්රාන්ස්ෆෝමර්</a></h2>
<p>මෙයට්රාන්ස්ෆෝමර් <a href="xl/index.html">එක්ස්එල් මත විහිදෙන සම්පීඩ්යතා ට්රාන්ස්ෆෝමර්</a> ක්රියාත්මක කිරීමක් වන අතර පැරණිතම මතකයන් සම්පීඩනය කිරීමෙන් දිගු අවධානයක් ලබා දේ. </p>
<h2><a href="gpt/index.html">Gpt ගෘහ නිර්මාණ ශිල්පය</a></h2>
<p>මෙයGPT-2 ගෘහ නිර්මාණ ශිල්පය ක්රියාත්මක කිරීමයි. </p>
<h2><a href="glu_variants/simple.html">GLU ප්රභේද</a></h2>
<p>මෙයකඩදාසි ක්රියාත්මක කිරීමයි <a href="https://papers.labml.ai/paper/2002.05202">GLU ප්රභේද ට්රාන්ස්ෆෝමර් වැඩි දියුණු කරන්න</a>. </p>
<h2><a href="knn/index.html">KN-එල් එම්</a></h2>
<p>මෙයකඩදාසි ක්රියාත්මක කිරීමකි <a href="https://papers.labml.ai/paper/1911.00172">සාමාන්යකරණය කටපාඩම් කිරීම: ළඟම අසල්වැසි භාෂා ආකෘති</a>. </p>
<h2><a href="feedback/index.html">ප්රතිපෝෂණ ට්රාන්ස්ෆෝමර්</a></h2>
<p>මෙය <a href="https://papers.labml.ai/paper/2002.09402">ප්රතිපෝෂණ මතකය සමඟ අනුක්රමික ට්රාන්ස්ෆෝමර්වල ඉහළ මට්ටමේ නිරූපණයන් වෙත ප්රවේශ</a>වන කඩදාසි ක්රියාත්මක කිරීමයි. </p>
<h2><a href="switch/index.html">ට්රාන්ස්ෆෝමර් ස්විචය</a></h2>
<p>මෙයකඩදාසි <a href="https://papers.labml.ai/paper/2101.03961">ස්විච් ට්රාන්ස්ෆෝමර් කුඩා ක්රියාත්මක කිරීමකි: සරල හා කාර්යක්ෂම ස්පාර්ශිකමකින් යුත් ට්රිලියන පරාමිති ආකෘති දක්වා පරිමාණය</a>කිරීම. අපගේ ක්රියාත්මක කිරීම සඳහා ඇත්තේ පරාමිතීන් මිලියන කිහිපයක් පමණක් වන අතර සමාන්තරව බෙදා හරින ලද පුහුණුව ආදර්ශයට නොගනී. එය තනි GPU පුහුණු කරන්නේ නමුත් අපි කඩදාසි විස්තර කර ඇති පරිදි මාරු සංකල්පය ක්රියාත්මක. </p>
<h2><a href="fast_weights/index.html">වේගවත් බර ට්රාන්ස්ෆෝමර්</a></h2>
<p>මෙයකඩදාසි ක්රියාත්මක කිරීමකි <a href="https://papers.labml.ai/paper/2102.11174">රේඛීය ට්රාන්ස්ෆෝමර් පයිටෝර්ච් හි රහසින් වේගවත් බර මතක පද්ධති</a>වේ. </p>
<h2><a href="fnet/index.html">FNet: ෆූරියර් පරිණාමනය සමඟ ටෝකන මිශ්ර කිරීම</a></h2>
<p>මෙයකඩදාසි ක්රියාත්මක කිරීමයි <a href="https://papers.labml.ai/paper/2105.03824">FNet: ෆූරියර් ට්රාන්ස්පෝර්ම් සමඟ ටෝකන මිශ්ර</a>කිරීම. </p>
<h2><a href="aft/index.html">අවධානය නිදහස් ට්රාන්ස්ෆෝමර්</a></h2>
<p>මෙයකඩදාසි ක්රියාත්මක කිරීමකි <a href="https://papers.labml.ai/paper/2105.14103">අවධානය රහිත ට්රාන්ස්ෆෝමරයක්</a>. </p>
<h2><a href="mlm/index.html">වෙස් භාෂා ආකෘතිය</a></h2>
<p>මෙයකඩදාසි වල පෙර පුහුණුව සඳහා භාවිතා කරන ලද මාස්ඩ් භාෂා ආකෘතිය ක්රියාත්මක කිරීම <a href="https://papers.labml.ai/paper/1810.04805">BERT: භාෂා අවබෝධය සඳහා ගැඹුරු ද්විපාර්ශ්වික පරිවර්තක පූර්ව පුහුණුව</a>. </p>
<h2><a href="mlp_mixer/index.html">එම්එල්පී-මික්සර්: දැක්ම සඳහා සර්ව එම්එල්පී ගෘහ නිර්මාණ ශිල්පයක්</a></h2>
<p>මෙයකඩදාසි <a href="https://papers.labml.ai/paper/2105.01601">එම්එල්පී-මික්සර් ක්රියාත්මක කිරීමකි: දැක්ම සඳහා සර්ව එම්එල්පී ගෘහ නිර්මාණ ශිල්පය</a>. </p>
<h2><a href="gmlp/index.html">MLPs (GMLP) වෙත අවධානය යොමු කරන්න</a></h2>
<p>මෙයකඩදාසි ක්රියාත්මක කිරීමකි <a href="https://papers.labml.ai/paper/2105.08050">MLPs වෙත අවධානය යොමු කරන්න</a>. </p>
<h2><a href="vit/index.html">දර්ශන ට්රාන්ස්ෆෝමර් (VIT)</a></h2>
<p>මෙමකඩදාසි ක්රියාත්මක කිරීම <a href="https://papers.labml.ai/paper/2010.11929">රූපයක් වර්ත් 16x16 වචන: පරිමාණ දී රූප පිළිගැනීම සඳහා ට්රාන්ස්ෆෝමර්</a>. </p>
<h2><a href="primer_ez/index.html">ප්රයිමර් EZ</a></h2>
<p>මෙයකඩදාසි ක්රියාත්මක කිරීමකි <a href="https://papers.labml.ai/paper/2109.08668">ප්රයිමර්: භාෂා ආකෘති නිර්මාණය සඳහා කාර්යක්ෂම ට්රාන්ස්ෆෝමර් සෙවීම</a>. </p>
<h2><a href="hour_glass/index.html">Hourglass</a></h2>
<p>මෙයකඩදාසි ක්රියාත්මක කිරීමකි <a href="https://papers.labml.ai/paper/2110.13711">ධූරාවලි ට්රාන්ස්ෆෝමර් වඩාත් කාර්යක්ෂම භාෂා ආකෘති</a></p>
</div>
<div class='code'>
<div class="highlight"><pre><span class="lineno">112</span><span></span><span class="kn">from</span> <span class="nn">.configs</span> <span class="kn">import</span> <span class="n">TransformerConfigs</span>
<span class="lineno">113</span><span class="kn">from</span> <span class="nn">.models</span> <span class="kn">import</span> <span class="n">TransformerLayer</span><span class="p">,</span> <span class="n">Encoder</span><span class="p">,</span> <span class="n">Decoder</span><span class="p">,</span> <span class="n">Generator</span><span class="p">,</span> <span class="n">EncoderDecoder</span>
<span class="lineno">114</span><span class="kn">from</span> <span class="nn">.mha</span> <span class="kn">import</span> <span class="n">MultiHeadAttention</span>
<span class="lineno">115</span><span class="kn">from</span> <span class="nn">labml_nn.transformers.xl.relative_mha</span> <span class="kn">import</span> <span class="n">RelativeMultiHeadAttention</span></pre></div>
</div>
</div>
<div class='footer'>
<a href="https://papers.labml.ai">Trending Research Papers</a>
<a href="https://labml.ai">labml.ai</a>
</div>
</div>
<script src=../interactive.js?v=1"></script>
<script>
function handleImages() {
var images = document.querySelectorAll('p>img')
for (var i = 0; i < images.length; ++i) {
handleImage(images[i])
}
}
function handleImage(img) {
img.parentElement.style.textAlign = 'center'
var modal = document.createElement('div')
modal.id = 'modal'
var modalContent = document.createElement('div')
modal.appendChild(modalContent)
var modalImage = document.createElement('img')
modalContent.appendChild(modalImage)
var span = document.createElement('span')
span.classList.add('close')
span.textContent = 'x'
modal.appendChild(span)
img.onclick = function () {
console.log('clicked')
document.body.appendChild(modal)
modalImage.src = img.src
}
span.onclick = function () {
document.body.removeChild(modal)
}
}
handleImages()
</script>
</body>
</html>