Proper line numbers
Browse files- Accelerate.ipynb +1 -1
- index.html +1 -1
Accelerate.ipynb
CHANGED
@@ -470,7 +470,7 @@
|
|
470 |
"\n",
|
471 |
"We can fix step 1 by loading in an empty model skeleton at first:\n",
|
472 |
"\n",
|
473 |
-
"```{.python code-line-numbers=\"
|
474 |
"from accelerate import init_empty_weights\n",
|
475 |
"\n",
|
476 |
"with init_empty_weights():\n",
|
|
|
470 |
"\n",
|
471 |
"We can fix step 1 by loading in an empty model skeleton at first:\n",
|
472 |
"\n",
|
473 |
+
"```{.python code-line-numbers=\"1,3-4\"}\n",
|
474 |
"from accelerate import init_empty_weights\n",
|
475 |
"\n",
|
476 |
"with init_empty_weights():\n",
|
index.html
CHANGED
@@ -648,7 +648,7 @@ Zachary Mueller
|
|
648 |
<section id="empty-model-weights" class="slide level2">
|
649 |
<h2>Empty Model Weights</h2>
|
650 |
<p>We can fix step 1 by loading in an empty model skeleton at first:</p>
|
651 |
-
<div class="sourceCode" id="cb16" data-code-line-numbers="
|
652 |
<span id="cb16-2"><a href="#cb16-2"></a></span>
|
653 |
<span id="cb16-3"><a href="#cb16-3"></a><span class="cf">with</span> init_empty_weights():</span>
|
654 |
<span id="cb16-4"><a href="#cb16-4"></a> my_model <span class="op">=</span> ModelClass(...)</span>
|
|
|
648 |
<section id="empty-model-weights" class="slide level2">
|
649 |
<h2>Empty Model Weights</h2>
|
650 |
<p>We can fix step 1 by loading in an empty model skeleton at first:</p>
|
651 |
+
<div class="sourceCode" id="cb16" data-code-line-numbers="1,3-4"><pre class="sourceCode numberSource python number-lines code-with-copy"><code class="sourceCode python"><span id="cb16-1"><a href="#cb16-1"></a><span class="im">from</span> accelerate <span class="im">import</span> init_empty_weights</span>
|
652 |
<span id="cb16-2"><a href="#cb16-2"></a></span>
|
653 |
<span id="cb16-3"><a href="#cb16-3"></a><span class="cf">with</span> init_empty_weights():</span>
|
654 |
<span id="cb16-4"><a href="#cb16-4"></a> my_model <span class="op">=</span> ModelClass(...)</span>
|