Buckets:

HuggingFaceDocBuilder's picture
download
raw
27.1 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;スモールコース&quot;,&quot;local&quot;:&quot;スモールコース&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;コース概要&quot;,&quot;local&quot;:&quot;コース概要&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;なぜ小型言語モデルなのか?&quot;,&quot;local&quot;:&quot;なぜ小型言語モデルなのか&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;前提条件&quot;,&quot;local&quot;:&quot;前提条件&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;インストール&quot;,&quot;local&quot;:&quot;インストール&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;uv を使用する場合&quot;,&quot;local&quot;:&quot;uv-を使用する場合&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;pip を使用する場合&quot;,&quot;local&quot;:&quot;pip-を使用する場合&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Google Colab&quot;,&quot;local&quot;:&quot;google-colab&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2}],&quot;depth&quot;:1}">
<link href="/docs/smol-course/pr_296/ja/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/entry/start.afa23ac6.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/chunks/scheduler.f38f3a0e.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/chunks/singletons.6933622c.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/chunks/paths.2a0c5cb3.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/entry/app.27746c11.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/chunks/preload-helper.c5d58819.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/chunks/index.a03143fc.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/nodes/0.117e80e6.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/chunks/each.e59479a4.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/nodes/2.414351fb.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/chunks/CopyLLMTxtMenu.8710b29c.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/chunks/MermaidChart.svelte_svelte_type_style_lang.4b36369c.js">
<link rel="modulepreload" href="/docs/smol-course/pr_296/ja/_app/immutable/chunks/CodeBlock.a6034da5.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;スモールコース&quot;,&quot;local&quot;:&quot;スモールコース&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;コース概要&quot;,&quot;local&quot;:&quot;コース概要&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;なぜ小型言語モデルなのか?&quot;,&quot;local&quot;:&quot;なぜ小型言語モデルなのか&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;前提条件&quot;,&quot;local&quot;:&quot;前提条件&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;インストール&quot;,&quot;local&quot;:&quot;インストール&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;uv を使用する場合&quot;,&quot;local&quot;:&quot;uv-を使用する場合&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;pip を使用する場合&quot;,&quot;local&quot;:&quot;pip-を使用する場合&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Google Colab&quot;,&quot;local&quot;:&quot;google-colab&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2}],&quot;depth&quot;:1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <p data-svelte-h="svelte-1f2aupr"><img src="../banner.png" alt="smolcourse image"></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 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm 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 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" 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-7 max-sm:h-7 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 sm:size-3.5 size-3 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="スモールコース" 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="#スモールコース"><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-2tiqc0">これは、特定のユースケースに合わせて言語モデルを調整するための実践的なコースです。ほとんどのローカルマシンで実行できるため、言語モデルの調整を始めるのに便利です。GPUの要件は最小限で、有料サービスは必要ありません。このコースは<a href="https://github.com/huggingface/smollm/tree/main" rel="nofollow">SmolLM2</a>シリーズのモデルに基づいていますが、ここで学んだスキルを大規模なモデルや他の小型言語モデルに転用することができます。</p> <a href="http://hf.co/join/discord" data-svelte-h="svelte-yck9g"><img src="https://img.shields.io/badge/Discord-7289DA?&logo=discord&logoColor=white"></a> <div style="background: linear-gradient(to right, #e0f7fa, #e1bee7, orange); padding: 20px; border-radius: 5px; margin-bottom: 20px; color: purple;" data-svelte-h="svelte-1nqgumz"><h2>参加は無料で、今すぐ始められます!</h2> <p>このコースはオープンでピアレビューされています。コースに参加するには、<strong>プルリクエストを開く</strong>ことで、あなたの作業をレビューに提出してください。以下の手順に従ってください:</p> <ol><li>リポジトリをフォークします <a href="https://github.com/huggingface/smol-course/fork">こちら</a></li> <li>資料を読み、変更を加え、演習を行い、自分の例を追加します。</li> <li>december_2024ブランチでプルリクエストを開きます</li> <li>レビューを受けてマージされます</li></ol> <p>これにより、学習を助け、常に改善されるコミュニティ主導のコースを構築することができます。</p></div> <p data-svelte-h="svelte-1rofn7l">このプロセスについては、この<a href="https://github.com/huggingface/smol-course/discussions/2#discussion-7602932" rel="nofollow">ディスカッションスレッド</a>で議論できます。</p> <h2 class="relative group"><a id="コース概要" 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="#コース概要"><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></h2> <p data-svelte-h="svelte-3ndgsg">このコースは、小型言語モデルを使用した実践的なアプローチを提供し、初期のトレーニングから本番展開までをカバーします。</p> <table data-svelte-h="svelte-g81j1o"><thead><tr><th>モジュール</th> <th>説明</th> <th>ステータス</th> <th>リリース日</th></tr></thead> <tbody><tr><td><a href="./1_instruction_tuning">インストラクションチューニング</a></td> <td>教師あり微調整、チャットテンプレート、および基本的な指示に従う方法を学びます</td> <td>✅ 準備完了</td> <td>2024年12月3日</td></tr> <tr><td><a href="./2_preference_alignment">選好整合</a></td> <td>DPOおよびORPO技術を探求し、人間の選好にモデルを整合させる方法を学びます</td> <td>✅ 準備完了</td> <td>2024年12月6日</td></tr> <tr><td><a href="./3_parameter_efficient_finetuning">パラメータ効率の良い微調整</a></td> <td>LoRA、プロンプトチューニング、および効率的な適応方法を学びます</td> <td>✅ 準備完了</td> <td>2024年12月9日</td></tr> <tr><td><a href="./4_evaluation">評価</a></td> <td>自動ベンチマークを使用し、カスタムドメイン評価を作成する方法を学びます</td> <td>✅ 準備完了</td> <td>2024年12月13日</td></tr> <tr><td><a href="./5_vision_language_models">ビジョン言語モデル</a></td> <td>マルチモーダルモデルをビジョン言語タスクに適応させる方法を学びます</td> <td>✅ 準備完了</td> <td>2024年12月16日</td></tr> <tr><td><a href="./6_synthetic_datasets">合成データセット</a></td> <td>トレーニング用の合成データセットを作成し、検証する方法を学びます</td> <td>✅ 準備完了</td> <td>2024年12月20日</td></tr> <tr><td><a href="./7_inference">推論</a></td> <td>モデルを効率的に推論する方法を学びます</td> <td><a href="https://github.com/huggingface/smol-course/pull/150" rel="nofollow">🚧 作業中</a></td> <td>2025年1月8日</td></tr> <tr><td><a href="./8_agents">エージェント</a></td> <td>自分のエージェントAIを構築する方法を学びます</td> <td>✅ 準備完了</td> <td>2025年1月13日</td></tr> <tr><td>キャップストーンプロジェクト</td> <td>学んだことを使ってリーダーボードを登りましょう!</td> <td><a href="https://github.com/huggingface/smol-course/pull/97" rel="nofollow">🚧 作業中</a></td> <td>2025年1月10日</td></tr></tbody></table> <h2 class="relative group"><a id="なぜ小型言語モデルなのか" 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="#なぜ小型言語モデルなのか"><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></h2> <p data-svelte-h="svelte-1klosnr">大規模な言語モデルは印象的な能力を示していますが、しばしば多くの計算リソースを必要とし、特定のアプリケーションには過剰な場合があります。小型言語モデルは、ドメイン固有のアプリケーションに対していくつかの利点を提供します:</p> <ul data-svelte-h="svelte-3trcqt"><li><strong>効率性</strong>:トレーニングと展開に必要な計算リソースが大幅に少ない</li> <li><strong>カスタマイズ</strong>:特定のドメインに簡単に微調整および適応可能</li> <li><strong>制御</strong>:モデルの動作をよりよく理解し、制御できる</li> <li><strong>コスト</strong>:トレーニングと推論の運用コストが低い</li> <li><strong>プライバシー</strong>:データを外部APIに送信せずにローカルで実行可能</li> <li><strong>グリーンテクノロジー</strong>:リソースの効率的な使用を推進し、炭素排出量を削減</li> <li><strong>学術研究の容易さ</strong>:最先端のLLMを使用した学術研究のための簡単なスターターを提供し、物流の制約を減らす</li></ul> <h2 class="relative group"><a id="前提条件" 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="#前提条件"><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></h2> <p data-svelte-h="svelte-186shkf">開始する前に、以下を確認してください:</p> <ul data-svelte-h="svelte-fno3fj"><li>機械学習と自然言語処理の基本的な理解</li> <li>Python、PyTorch、および<code>transformers</code>ライブラリに精通していること</li> <li>事前学習された言語モデルとラベル付きデータセットへのアクセス</li></ul> <h2 class="relative group"><a id="インストール" 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="#インストール"><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></h2> <p data-svelte-h="svelte-1seycfh">コースをパッケージとして維持しているため、パッケージマネージャーを使用して依存関係を簡単にインストールできます。<code>uv</code>をお勧めしますが、<code>pip</code><code>pdm</code>などの代替手段も使用できます。</p> <h3 class="relative group"><a id="uv-を使用する場合" 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="#uv-を使用する場合"><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>uv を使用する場合</span></h3> <p data-svelte-h="svelte-1d1tknj"><code>uv</code>がインストールされている場合、次のようにしてコースをインストールできます:</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 -->uv venv --python 3.11.0
uv <span class="hljs-built_in">sync</span><!-- HTML_TAG_END --></pre></div> <h3 class="relative group"><a id="pip-を使用する場合" 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="#pip-を使用する場合"><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>pip を使用する場合</span></h3> <p data-svelte-h="svelte-lbomyt">すべての例は<strong>python 3.11</strong>環境で実行されるため、次のように環境を作成し、依存関係をインストールします:</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"># python -m venv .venv</span>
<span class="hljs-comment"># source .venv/bin/activate</span>
pip install -r requirements.txt<!-- HTML_TAG_END --></pre></div> <h3 class="relative group"><a id="google-colab" 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="#google-colab"><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</span></h3> <p data-svelte-h="svelte-whz978"><strong>Google Colabから</strong>は、使用するハードウェアに基づいて柔軟に依存関係をインストールする必要があります。次のようにします:</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 install transformers trl datasets huggingface_hub<!-- HTML_TAG_END --></pre></div> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/smol-course/blob/main/units/ja/README.md" 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_1lq7jru = {
assets: "/docs/smol-course/pr_296/ja",
base: "/docs/smol-course/pr_296/ja",
env: {}
};
const element = document.currentScript.parentElement;
const data = [null,null];
Promise.all([
import("/docs/smol-course/pr_296/ja/_app/immutable/entry/start.afa23ac6.js"),
import("/docs/smol-course/pr_296/ja/_app/immutable/entry/app.27746c11.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 2],
data,
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
27.1 kB
·
Xet hash:
5bd0e59c63c90bf182c80fa6a1a4b786eb683bd3fc3665d64271f8d2c4d4ef0c

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