This commit is contained in:
CircleCI Docs
2025-10-17 19:16:27 +00:00
parent e492c1dcd9
commit 7cfd0da856
535 changed files with 3196 additions and 3155 deletions

View File

@@ -8,7 +8,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Saving and Loading Arrays &#8212; MLX 0.29.2 documentation</title>
<title>Saving and Loading Arrays &#8212; MLX 0.29.3 documentation</title>
@@ -37,7 +37,7 @@
<link rel="preload" as="script" href="../_static/scripts/pydata-sphinx-theme.js?digest=dfe6caa3a7d634c4db9b" />
<script src="../_static/vendor/fontawesome/6.5.2/js/all.min.js?digest=dfe6caa3a7d634c4db9b"></script>
<script src="../_static/documentation_options.js?v=30d04a71"></script>
<script src="../_static/documentation_options.js?v=8b2cc86c"></script>
<script src="../_static/doctools.js?v=9a2dae69"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../_static/clipboard.min.js?v=a7894cd8"></script>
@@ -140,8 +140,8 @@
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.29.2 documentation - Home"/>
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.29.2 documentation - Home"/>`);</script>
<img src="../_static/mlx_logo.png" class="logo__image only-light" alt="MLX 0.29.3 documentation - Home"/>
<script>document.write(`<img src="../_static/mlx_logo_dark.png" class="logo__image only-dark" alt="MLX 0.29.3 documentation - Home"/>`);</script>
</a></div>
@@ -990,7 +990,7 @@ provided. This can be loaded with:</p>
</div>
<p>In this case <a class="reference internal" href="../python/_autosummary/mlx.core.load.html#mlx.core.load" title="mlx.core.load"><code class="xref py py-func docutils literal notranslate"><span class="pre">load()</span></code></a> returns a dictionary of names to arrays.</p>
<p>The functions <a class="reference internal" href="../python/_autosummary/mlx.core.save_safetensors.html#mlx.core.save_safetensors" title="mlx.core.save_safetensors"><code class="xref py py-func docutils literal notranslate"><span class="pre">save_safetensors()</span></code></a> and <a class="reference internal" href="../python/_autosummary/mlx.core.save_gguf.html#mlx.core.save_gguf" title="mlx.core.save_gguf"><code class="xref py py-func docutils literal notranslate"><span class="pre">save_gguf()</span></code></a> are similar to
<a class="reference internal" href="../python/_autosummary/mlx.core.savez.html#mlx.core.savez" title="mlx.core.savez"><code class="xref py py-func docutils literal notranslate"><span class="pre">savez()</span></code></a>, but they take as input a <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.13)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dict</span></code></a> of string names to arrays:</p>
<a class="reference internal" href="../python/_autosummary/mlx.core.savez.html#mlx.core.savez" title="mlx.core.savez"><code class="xref py py-func docutils literal notranslate"><span class="pre">savez()</span></code></a>, but they take as input a <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.14)"><code class="xref py py-obj docutils literal notranslate"><span class="pre">dict</span></code></a> of string names to arrays:</p>
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>&gt;&gt;&gt;<span class="w"> </span><span class="nv">a</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>mx.array<span class="o">([</span><span class="m">1</span>.0<span class="o">])</span>
&gt;&gt;&gt;<span class="w"> </span><span class="nv">b</span><span class="w"> </span><span class="o">=</span><span class="w"> </span>mx.array<span class="o">([</span><span class="m">2</span>.0<span class="o">])</span>
&gt;&gt;&gt;<span class="w"> </span>mx.save_safetensors<span class="o">(</span><span class="s2">&quot;arrays&quot;</span>,<span class="w"> </span><span class="o">{</span><span class="s2">&quot;a&quot;</span>:<span class="w"> </span>a,<span class="w"> </span><span class="s2">&quot;b&quot;</span>:<span class="w"> </span>b<span class="o">})</span>