Buckets:

rtrm's picture
download
raw
49.7 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;နိဒါန်း&quot;,&quot;local&quot;:&quot;introduction&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Google Colab notebook ကို အသုံးပြုခြင်း&quot;,&quot;local&quot;:&quot;using-a-google-colab-notebook&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Python virtual environment ကို အသုံးပြုခြင်း&quot;,&quot;local&quot;:&quot;using-a-python-virtual-environment&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Dependencies တွေကို Install လုပ်ခြင်း&quot;,&quot;local&quot;:&quot;installing-dependencies&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;ဝေါဟာရ ရှင်းလင်းချက် (Glossary)&quot;,&quot;local&quot;:&quot;ဝဟရ-ရငလငခက-glossary&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}">
<link href="/docs/course/pr_1114/my/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/entry/start.14794ee9.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/chunks/scheduler.893fe8c9.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/chunks/singletons.10fda3ce.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/chunks/index.bce52c8a.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/chunks/paths.89c82153.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/entry/app.a133f5c6.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/chunks/preload-helper.b1a719fd.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/chunks/index.b1df2166.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/nodes/0.510afdc1.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/chunks/each.e59479a4.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/nodes/2.b500bfee.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/chunks/MermaidChart.svelte_svelte_type_style_lang.762ed9cc.js">
<link rel="modulepreload" href="/docs/course/pr_1114/my/_app/immutable/chunks/CodeBlock.6cef0479.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;နိဒါန်း&quot;,&quot;local&quot;:&quot;introduction&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Google Colab notebook ကို အသုံးပြုခြင်း&quot;,&quot;local&quot;:&quot;using-a-google-colab-notebook&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;Python virtual environment ကို အသုံးပြုခြင်း&quot;,&quot;local&quot;:&quot;using-a-python-virtual-environment&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Dependencies တွေကို Install လုပ်ခြင်း&quot;,&quot;local&quot;:&quot;installing-dependencies&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;ဝေါဟာရ ရှင်းလင်းချက် (Glossary)&quot;,&quot;local&quot;:&quot;ဝဟရ-ရငလငခက-glossary&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"><div class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 max-sm:gap-0.5 h-6 max-sm:h-5 px-2 max-sm:px-1.5 text-[11px] max-sm:text-[9px] font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0"><svg class="w-3 h-3 max-sm:w-2.5 max-sm:h-2.5" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg></span> <span>Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-6 max-sm:h-5 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible w-3 h-3 max-sm:w-2.5 max-sm:h-2.5 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg></button></div> </div> <h1 class="relative group"><a id="introduction" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#introduction"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>နိဒါန်း</span></h1> <p data-svelte-h="svelte-1exlagp">Hugging Face သင်တန်းမှ ကြိုဆိုပါတယ်။ ဒီနိဒါန်းက သင် အလုပ်လုပ်ရန် ပတ်ဝန်းကျင် (working environment) ကို တည်ဆောက်ရာမှာ လမ်းညွှန်ပေးမှာပါ။ သင်တန်းကို အခုမှ စတင်သူများအတွက်၊ <a href="/course/chapter1">Chapter 1</a> ကို အရင်ဆုံး လေ့လာပြီးမှ၊ သင်ကိုယ်တိုင် code တွေကို စမ်းသပ်နိုင်ဖို့ သင့်ပတ်ဝန်းကျင်ကို ပြန်လည်တည်ဆောက်ဖို့ ကျွန်တော်တို့ အကြံပြုလိုပါတယ်။</p> <p data-svelte-h="svelte-1m41l5e">ဒီသင်တန်းမှာ ကျွန်တော်တို့ အသုံးပြုမယ့် library တွေအားလုံးဟာ Python packages တွေအဖြစ် ရရှိနိုင်ပါတယ်။ ဒါကြောင့် ဒီနေရာမှာ သင်လိုအပ်တဲ့ Python ပတ်ဝန်းကျင်ကို ဘယ်လိုတည်ဆောက်ရမလဲ၊ သီးခြား library တွေကို ဘယ်လို install လုပ်ရမလဲဆိုတာကို ပြသသွားမှာပါ။</p> <p data-svelte-h="svelte-168olw2">သင့်ရဲ့ အလုပ်လုပ်ရန် ပတ်ဝန်းကျင်ကို တည်ဆောက်ဖို့ နည်းလမ်းနှစ်ခုကို ကျွန်တော်တို့ ဖော်ပြပေးပါမယ်- Colab notebook ကို အသုံးပြုခြင်း ဒါမှမဟုတ် Python virtual environment ကို အသုံးပြုခြင်းတို့ ဖြစ်ပါတယ်။ သင်နဲ့ အသင့်တော်ဆုံးနည်းလမ်းကို လွတ်လပ်စွာ ရွေးချယ်နိုင်ပါတယ်။ စတင်သူများအတွက်ကတော့ Colab notebook ကို အသုံးပြုပြီး စတင်ဖို့ ကျွန်တော်တို့ အထူးအကြံပြုပါတယ်။</p> <p data-svelte-h="svelte-45ack3">ကျွန်တော်တို့ဟာ Windows system အကြောင်းကို ဖော်ပြသွားမှာ မဟုတ်ပါဘူး။ သင် Windows ကို အသုံးပြုနေတယ်ဆိုရင် Colab notebook ကို အသုံးပြုပြီး လိုက်လုပ်ဖို့ ကျွန်တော်တို့ အကြံပြုပါတယ်။ သင် Linux distribution ဒါမှမဟုတ် macOS ကို အသုံးပြုနေတယ်ဆိုရင်တော့ ဒီနေရာမှာ ဖော်ပြထားတဲ့ နည်းလမ်းနှစ်ခုလုံးကို အသုံးပြုနိုင်ပါတယ်။</p> <p data-svelte-h="svelte-1rlzknl">သင်တန်းရဲ့ အများစုကတော့ Hugging Face account ရှိဖို့ လိုအပ်ပါတယ်။ အခုပဲ account တစ်ခု ဖန်တီးဖို့ ကျွန်တော်တို့ အကြံပြုပါတယ်- <a href="https://huggingface.co/join" rel="nofollow">account တစ်ခု ဖန်တီးပါ</a></p> <h2 class="relative group"><a id="using-a-google-colab-notebook" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#using-a-google-colab-notebook"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Google Colab notebook ကို အသုံးပြုခြင်း</span></h2> <p data-svelte-h="svelte-1a04iz6">Colab notebook ကို အသုံးပြုတာဟာ အလွယ်ကူဆုံး တည်ဆောက်မှုပုံစံ ဖြစ်ပါတယ်၊ သင်ရဲ့ browser ထဲမှာ notebook တစ်ခုကို ဖွင့်လိုက်ရုံနဲ့ တိုက်ရိုက် code ရေးလို့ရပါပြီ။</p> <p data-svelte-h="svelte-1walgij">သင် Colab နဲ့ မရင်းနှီးသေးဘူးဆိုရင် <a href="https://colab.research.google.com/notebooks/intro.ipynb" rel="nofollow">နိဒါန်း</a> ကို အရင်ဆုံး လေ့လာဖို့ ကျွန်တော်တို့ အကြံပြုပါတယ်။ Colab က GPU ဒါမှမဟုတ် TPU လိုမျိုး အရှိန်မြှင့် hardware အချို့ကို အသုံးပြုခွင့်ပေးပြီး၊ အလုပ်ပမာဏ နည်းတဲ့ ကိစ္စတွေအတွက်တော့ အခမဲ့ ဖြစ်ပါတယ်။</p> <p data-svelte-h="svelte-gnxeha">Colab ထဲမှာ ကျွမ်းကျင်စွာ သွားလာနိုင်ပြီဆိုတာနဲ့၊ notebook အသစ်တစ်ခု ဖန်တီးပြီး စနစ်တကျ စတင်လိုက်ပါ။</p> <div class="flex justify-center" data-svelte-h="svelte-1mpe2rl"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter0/new_colab.png" alt="An empty colab notebook" width="80%"></div> <p data-svelte-h="svelte-1fl6bdh">နောက်တစ်ဆင့်ကတော့ ဒီသင်တန်းမှာ ကျွန်တော်တို့ အသုံးပြုမယ့် library တွေကို install လုပ်ဖို့ ဖြစ်ပါတယ်။ install လုပ်ဖို့အတွက် Python ရဲ့ package manager ဖြစ်တဲ့ <code>pip</code> ကို ကျွန်တော်တို့ အသုံးပြုပါမယ်။ notebooks တွေမှာ <code>!</code> character ကို အရှေ့မှာ ထားခြင်းဖြင့် system commands တွေကို run နိုင်ပါတယ်။ ဒါကြောင့် 🤗 Transformers library ကို အောက်ပါအတိုင်း install လုပ်နိုင်ပါတယ်-</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->!pip <span class="hljs-keyword">install</span> transformers<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-xxatjb">သင့်ရဲ့ Python runtime ထဲမှာ import လုပ်ခြင်းဖြင့် package ကို မှန်ကန်စွာ install လုပ်ထားခြင်းရှိမရှိ စစ်ဆေးနိုင်ပါတယ်-</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-keyword">import</span> transformers<!-- HTML_TAG_END --></pre></div> <div class="flex justify-center" data-svelte-h="svelte-1cj51wg"><img src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter0/install.gif" alt="A gif showing the result of the two commands above: installation and import" width="80%"></div> <p data-svelte-h="svelte-12mcegn">ဒါက 🤗 Transformers ရဲ့ အလွန်ပေါ့ပါးတဲ့ version တစ်ခုကို install လုပ်တာ ဖြစ်ပါတယ်။ အထူးသဖြင့်၊ သီးခြား machine learning frameworks (PyTorch ဒါမှမဟုတ် TensorFlow လိုမျိုး) တွေ install လုပ်ထားတာ မရှိပါဘူး။ ကျွန်တော်တို့ library ရဲ့ မတူညီတဲ့ features များစွာကို အသုံးပြုရမှာဖြစ်တာကြောင့်၊ မော်ဒယ်တိုင်းအတွက် လိုအပ်တဲ့ dependencies အားလုံးပါဝင်တဲ့ development version ကို install လုပ်ဖို့ ကျွန်တော်တို့ အကြံပြုပါတယ်-</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->!pip <span class="hljs-keyword">install</span> transformers[sentencepiece]<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1koqfa9">ဒါက အချိန်အနည်းငယ် ကြာပါလိမ့်မယ်၊ ဒါပေမယ့် ပြီးသွားရင်တော့ သင်တန်းတစ်လျှောက်လုံးအတွက် အဆင်သင့်ဖြစ်ပါပြီ။</p> <h2 class="relative group"><a id="using-a-python-virtual-environment" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#using-a-python-virtual-environment"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Python virtual environment ကို အသုံးပြုခြင်း</span></h2> <p data-svelte-h="svelte-r45v2j">သင် Python virtual environment ကို အသုံးပြုဖို့ ပိုကြိုက်တယ်ဆိုရင်၊ ပထမအဆင့်ကတော့ သင့် system မှာ Python ကို install လုပ်ဖို့ပါပဲ။ စတင်ဖို့အတွက် <a href="https://realpython.com/installing-python/" rel="nofollow">ဒီလမ်းညွှန်</a> ကို လိုက်နာဖို့ ကျွန်တော်တို့ အကြံပြုပါတယ်။</p> <p data-svelte-h="svelte-dgpmeb">Python ကို install လုပ်ပြီးတာနဲ့၊ သင့် terminal မှာ Python commands တွေကို run နိုင်ပါလိမ့်မယ်။ နောက်ထပ်အဆင့်တွေ မဆက်ခင် မှန်ကန်စွာ install လုပ်ထားခြင်းရှိမရှိ သေချာစေဖို့ <code>python --version</code> လို့ရိုက်ပြီး စစ်ဆေးနိုင်ပါတယ်။ ဒါက သင့် system မှာ လက်ရှိရရှိနိုင်တဲ့ Python version ကို ပြသပေးပါလိမ့်မယ်။</p> <p data-svelte-h="svelte-nj2i27">သင့် terminal မှာ <code>python --version</code> လိုမျိုး Python command တစ်ခုကို run တဲ့အခါ၊ သင် command ကို run နေတဲ့ program ကို သင့် system ရဲ့ “အဓိက” Python လို့ တွေးကြည့်သင့်ပါတယ်။ ဒီအဓိက install လုပ်ထားတဲ့ Python မှာ packages တွေ မထည့်ဘဲ ထားပြီး၊ သင်အလုပ်လုပ်တဲ့ application တစ်ခုစီအတွက် သီးခြား environments တွေ ဖန်တီးဖို့ အသုံးပြုဖို့ ကျွန်တော်တို့ အကြံပြုပါတယ်။ ဒီနည်းနဲ့ application တစ်ခုစီမှာ သူ့ဘာသာသူ dependencies တွေနဲ့ packages တွေ ရှိနိုင်ပြီး၊ အခြား application တွေနဲ့ ဖြစ်နိုင်ချေရှိတဲ့ လိုက်ဖက်မှုပြဿနာတွေအတွက် သင်စိုးရိမ်စရာ မလိုပါဘူး။</p> <p data-svelte-h="svelte-1jj2ivq">Python မှာ ဒါကို <a href="https://docs.python.org/3/tutorial/venv.html" rel="nofollow"><em>virtual environments</em></a> တွေနဲ့ လုပ်ဆောင်ပါတယ်။ ဒါတွေဟာ သူ့ဘာသာသူ ပါဝင်တဲ့ directory trees တွေဖြစ်ပြီး တစ်ခုစီမှာ သီးခြား Python version တစ်ခုနဲ့ application လိုအပ်တဲ့ packages အားလုံး ပါဝင်ပါတယ်။ ဒီလို virtual environment တစ်ခု ဖန်တီးခြင်းကို ကိရိယာအမျိုးမျိုးနဲ့ လုပ်ဆောင်နိုင်ပေမယ့်၊ ကျွန်တော်တို့ကတော့ အဲဒီရည်ရွယ်ချက်အတွက် တရားဝင် Python package ဖြစ်တဲ့ <a href="https://docs.python.org/3/library/venv.html#module-venv" rel="nofollow"><code>venv</code></a> ကို အသုံးပြုပါမယ်။</p> <p data-svelte-h="svelte-zvrnxr">ပထမဆုံး၊ သင်ရဲ့ application ကို ထားချင်တဲ့ directory ကို ဖန်တီးပါ - ဥပမာ၊ သင်ရဲ့ home directory ရဲ့ root မှာ <em>transformers-course</em> လို့ခေါ်တဲ့ directory အသစ်တစ်ခု ပြုလုပ်ချင်ပါလိမ့်မယ်-</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-built_in">mkdir</span> ~/transformers-course
<span class="hljs-built_in">cd</span> ~/transformers-course<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-llg9h4">ဒီ directory ထဲကနေ Python ရဲ့ <code>venv</code> module ကို အသုံးပြုပြီး virtual environment တစ်ခု ဖန်တီးပါ။</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-keyword">python</span> -m venv .<span class="hljs-keyword">env</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-ap5til">သင်ရဲ့ ဗလာဖြစ်နေတဲ့ folder ထဲမှာ <em>.env</em> လို့ခေါ်တဲ့ directory တစ်ခုကို အခု သင်တွေ့ရပါလိမ့်မယ်-</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-built_in">ls</span> -a<!-- HTML_TAG_END --></pre></div> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->. <span class="hljs-string">..</span> <span class="hljs-string">.env</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-mxjfoi">ဒီ <code>activate</code> နဲ့ <code>deactivate</code> scripts တွေနဲ့ သင်ရဲ့ virtual environment ထဲကို ဝင်နိုင်ပြီး ပြန်ထွက်နိုင်ပါတယ်-</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-comment"># virtual environment ကို ဖွင့်</span>
<span class="hljs-built_in">source</span> .<span class="hljs-built_in">env</span>/bin/activate
<span class="hljs-comment"># virtual environment ကို ပိတ်</span>
deactivate<!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-14dmhqn"><code>which python</code> command ကို run ခြင်းဖြင့် environment ကို ဖွင့်ထားခြင်းရှိမရှိ သေချာအောင် စစ်ဆေးနိုင်ပါတယ်။ အကယ်၍ ၎င်းက virtual environment ကို ညွှန်ပြနေတယ်ဆိုရင် သင်အောင်မြင်စွာ ဖွင့်ထားတာ ဖြစ်ပါတယ်။</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-built_in">which</span> python<!-- HTML_TAG_END --></pre></div> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START --><span class="hljs-regexp">/home/</span>&lt;user&gt;<span class="hljs-regexp">/transformers-course/</span>.env<span class="hljs-regexp">/bin/</span>python<!-- HTML_TAG_END --></pre></div> <h3 class="relative group"><a id="installing-dependencies" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#installing-dependencies"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>Dependencies တွေကို Install လုပ်ခြင်း</span></h3> <p data-svelte-h="svelte-kx8kj7">Google Colab instances တွေကို အသုံးပြုခြင်းနဲ့ ပတ်သက်တဲ့ ယခင်အပိုင်းမှာလိုပဲ၊ ဆက်လက်လုပ်ဆောင်ဖို့ လိုအပ်တဲ့ packages တွေကို အခု သင် install လုပ်ဖို့ လိုအပ်ပါလိမ့်မယ်။ ထပ်မံပြီးတော့ <code>pip</code> package manager ကို အသုံးပြုပြီး 🤗 Transformers ရဲ့ development version ကို install လုပ်နိုင်ပါတယ်-</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> <div class="absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0"><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent; "></div> Copied</div></button></div> <pre class=""><!-- HTML_TAG_START -->pip <span class="hljs-keyword">install</span> <span class="hljs-string">&quot;transformers[sentencepiece]&quot;</span><!-- HTML_TAG_END --></pre></div> <p data-svelte-h="svelte-1olml6p">အခု သင်အားလုံး အဆင်သင့်ဖြစ်ပြီ၊ စတင်ဖို့ အသင့်ပါပဲ။</p> <h2 class="relative group"><a id="ဝဟရ-ရငလငခက-glossary" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#ဝဟရ-ရငလငခက-glossary"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>ဝေါဟာရ ရှင်းလင်းချက် (Glossary)</span></h2> <ul data-svelte-h="svelte-1xucxa4"><li><strong>Working Environment</strong>: ဆော့ဖ်ဝဲလ် သို့မဟုတ် project တစ်ခုကို ဖန်တီး၊ တည်ဆောက်ပြီး run ရန်အတွက် လိုအပ်သော ကိရိယာများနှင့် ဆော့ဖ်ဝဲလ်များ အားလုံးပါဝင်သော စနစ်ပတ်ဝန်းကျင်။</li> <li><strong>Chapter 1</strong>: သင်တန်း၏ ပထမဆုံး အခန်း။</li> <li><strong>Python Packages</strong>: Python ပရိုဂရမ်များတွင် အသုံးပြုရန်အတွက် စုစည်းထားသော modules နှင့် code များ။</li> <li><strong>Python Environment</strong>: Python code များကို run ရန်အတွက် လိုအပ်သော Python interpreter နှင့် libraries များ အားလုံးပါဝင်သော ပတ်ဝန်းကျင်။</li> <li><strong>Colab Notebook (Google Colab)</strong>: Google မှ ပံ့ပိုးပေးထားသော cloud-based Jupyter Notebook environment တစ်ခုဖြစ်ပြီး Python code များကို web browser မှတစ်ဆင့် run နိုင်စေသည်။ အခမဲ့ GPU/TPU အသုံးပြုခွင့်ပေးသည်။</li> <li><strong>Python Virtual Environment</strong>: အခြား Python environment များမှ သီးခြားစီ ခွဲထုတ်ထားသော Python environment တစ်ခု။ ၎င်းသည် project တစ်ခုစီအတွက် ၎င်း၏ကိုယ်ပိုင် dependencies များကို ထိန်းသိမ်းရန် ကူညီပေးသည်။</li> <li><strong>Linux Distribution</strong>: Linux kernel ပေါ် အခြေခံထားသော operating system (ဥပမာ - Ubuntu, Fedora)။</li> <li><strong>macOS</strong>: Apple Inc. မှ ထုတ်လုပ်ထားသော operating system။</li> <li><strong>Hugging Face Account</strong>: Hugging Face ပလက်ဖောင်းပေါ်ရှိ သုံးစွဲသူအကောင့်။ ၎င်းသည် မော်ဒယ်များ၊ datasets များနှင့် အခြားအရင်းအမြစ်များကို ဝင်ရောက်ကြည့်ရှုရန် ခွင့်ပြုသည်။</li> <li><strong>GPU (Graphics Processing Unit)</strong>: ဂရပ်ဖစ်လုပ်ဆောင်မှုအတွက် အထူးဒီဇိုင်းထုတ်ထားသော processor တစ်မျိုးဖြစ်သော်လည်း AI/ML လုပ်ငန်းများတွင် အရှိန်မြှင့်ရန် အသုံးများသည်။</li> <li><strong>TPU (Tensor Processing Unit)</strong>: Google မှ AI/ML workloads များအတွက် အထူးဒီဇိုင်းထုတ်ထားသော processor တစ်မျိုး။</li> <li><strong><code>pip</code></strong>: Python အတွက် package installer (package manager)။ Python packages များကို install လုပ်ရန်နှင့် စီမံခန့်ခွဲရန် အသုံးပြုသည်။</li> <li><strong><code>!</code> Character</strong>: Jupyter/Colab Notebook များတွင် shell commands များကို run ရန်အတွက် အသုံးပြုသော prefix။</li> <li><strong>🤗 Transformers Library</strong>: Hugging Face က ထုတ်လုပ်ထားတဲ့ library တစ်ခုဖြစ်ပြီး Transformer မော်ဒယ်တွေကို အသုံးပြုပြီး Natural Language Processing (NLP), computer vision, audio processing စတဲ့ နယ်ပယ်တွေမှာ အဆင့်မြင့် AI မော်ဒယ်တွေကို တည်ဆောက်ပြီး အသုံးပြုနိုင်စေပါတယ်။</li> <li><strong>Python Runtime</strong>: Python code ကို လက်ရှိ run နေသော ပတ်ဝန်းကျင်။</li> <li><strong>Machine Learning Frameworks</strong>: Machine learning မော်ဒယ်များကို တည်ဆောက်ရန်၊ လေ့ကျင့်ရန်နှင့် အသုံးပြုရန်အတွက် ကိရိယာများနှင့် library များ စုစည်းမှု (ဥပမာ - PyTorch, TensorFlow)။</li> <li><strong>PyTorch</strong>: Facebook (ယခု Meta) က ဖန်တီးထားတဲ့ open-source machine learning library တစ်ခုဖြစ်ပြီး deep learning မော်ဒယ်တွေ တည်ဆောက်ဖို့အတွက် အသုံးပြုပါတယ်။</li> <li><strong>TensorFlow</strong>: Google က ဖန်တီးထားတဲ့ open-source machine learning library တစ်ခုဖြစ်ပြီး deep learning မော်ဒယ်တွေ တည်ဆောက်ဖို့အတွက် အသုံးပြုပါတယ်။</li> <li><strong>Development Version</strong>: ဆော့ဖ်ဝဲလ်တစ်ခု၏ အပြည့်အစုံသော၊ အင်္ဂါရပ်အားလုံးပါဝင်သည့် ဗားရှင်း (အများအားဖြင့် စမ်းသပ်ခြင်းနှင့် ဖွံ့ဖြိုးတိုးတက်မှုအတွက်)။</li> <li><strong>Dependencies</strong>: ဆော့ဖ်ဝဲလ်တစ်ခု သို့မဟုတ် library တစ်ခု အလုပ်လုပ်ရန် လိုအပ်သော အခြား library များနှင့် modules များ။</li> <li><strong><code>venv</code> Module</strong>: Python ၏ တရားဝင် module တစ်ခုဖြစ်ပြီး virtual environments များကို ဖန်တီးရန် အသုံးပြုသည်။</li> <li><strong><code>mkdir</code></strong>: Command line command တစ်ခုဖြစ်ပြီး directory (folder) အသစ်တစ်ခုကို ဖန်တီးရန် အသုံးပြုသည်။</li> <li><strong><code>cd</code></strong>: Command line command တစ်ခုဖြစ်ပြီး directory တစ်ခုမှ အခြားတစ်ခုသို့ ပြောင်းလဲရန် အသုံးပြုသည်။</li> <li><strong><code>ls -a</code></strong>: Command line command တစ်ခုဖြစ်ပြီး လက်ရှိ directory ရှိ ဖိုင်များနှင့် directory များအားလုံးကို (ဝှက်ထားသောဖိုင်များပါ အပါအဝင်) ပြသရန် အသုံးပြုသည်။</li> <li><strong><code>source</code></strong>: Unix/Linux shell command တစ်ခုဖြစ်ပြီး script တစ်ခုကို လက်ရှိ shell ထဲတွင် run ရန် အသုံးပြုသည်။</li> <li><strong><code>activate</code> / <code>deactivate</code></strong>: virtual environment ကို ဖွင့်ရန် သို့မဟုတ် ပိတ်ရန် အသုံးပြုသော scripts များ။</li> <li><strong><code>which python</code></strong>: လက်ရှိ shell က အသုံးပြုနေသော <code>python</code> executable ၏ လမ်းကြောင်းကို ပြသရန် အသုံးပြုသော command။</li> <li><strong><code>transformers[sentencepiece]</code></strong>: <code>transformers</code> library ကို <code>sentencepiece</code> dependency ပါ အပါအဝင် install လုပ်ရန်အတွက် <code>pip</code> syntax။</li></ul> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/course/blob/main/chapters/my/chapter0/1.mdx" target="_blank"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg> <span data-svelte-h="svelte-zjs2n5"><span class="underline">Update</span> on GitHub</span></a> <p></p>
<script>
{
__sveltekit_tyugt6 = {
assets: "/docs/course/pr_1114/my",
base: "/docs/course/pr_1114/my",
env: {}
};
const element = document.currentScript.parentElement;
const data = [null,null];
Promise.all([
import("/docs/course/pr_1114/my/_app/immutable/entry/start.14794ee9.js"),
import("/docs/course/pr_1114/my/_app/immutable/entry/app.a133f5c6.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 2],
data,
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
49.7 kB
·
Xet hash:
fe482052caf73a960047bb639f74b8d23389b3d776496c779a39a03e168135bb

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.