Skip to content

Commit

Permalink
DouglasOrr published a site update
Browse files Browse the repository at this point in the history
  • Loading branch information
DouglasOrr committed Jul 25, 2024
1 parent 056ffde commit 5dc7a0d
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 56 deletions.
39 changes: 39 additions & 0 deletions _sources/development.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Development

For users who wish to develop using this codebase, the following setup is required:

**First-time setup**:

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt # Or requirements-dev-ipu.txt for the ipu
```

**Subsequent setup**:

```bash
source .venv/bin/activate
```

**Run pre-flight checks** (or run `./dev --help` to see supported commands):

```bash
./dev
```

**IDE recommendations**:

- Python intepreter is set to `.venv/bin/python`
- Format-on-save enabled
- Consider a `.env` file for setting `PYTHONPATH`, for example `echo "PYTHONPATH=$(pwd)" > .env`
(note that this will be a different path if using devcontainers)

**Docs development**:

```bash
cd docs/
make html
```

then view `docs/_build/html/index.html` in your browser.
2 changes: 0 additions & 2 deletions _sources/development.rst.txt

This file was deleted.

48 changes: 6 additions & 42 deletions development.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>2. Unit-Scaled Maximal Update Parameterization (u-μP) &mdash; unit-scaling documentation</title>
<title>2. Development &mdash; unit-scaling documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="_static/scales.png"/>
Expand Down Expand Up @@ -47,13 +47,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="user_guide.html">1. User guide</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Developer guide</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#installation">2.1. Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#what-is-unit-scaling">2.2. What is unit scaling?</a></li>
<li class="toctree-l2"><a class="reference internal" href="#development">2.3. Development</a></li>
<li class="toctree-l2"><a class="reference internal" href="#license">2.4. License</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Developer guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="limitations.html">3. Limitations</a></li>
<li class="toctree-l1"><a class="reference internal" href="blog.html">4. Blog</a></li>
<li class="toctree-l1"><a class="reference internal" href="api_reference.html">5. API reference</a></li>
Expand All @@ -73,42 +67,18 @@
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active"><span class="section-number">2. </span>Unit-Scaled Maximal Update Parameterization (u-μP)</li>
<li class="breadcrumb-item active"><span class="section-number">2. </span>Development</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/development.rst.txt" rel="nofollow"> View page source</a>
<a href="_sources/development.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<section id="unit-scaled-maximal-update-parameterization-u-p">
<h1><span class="section-number">2. </span>Unit-Scaled Maximal Update Parameterization (u-μP)<a class="headerlink" href="#unit-scaled-maximal-update-parameterization-u-p" title="Permalink to this heading"></a></h1>
<p>A library for unit scaling in PyTorch, based on the paper <a class="reference external" href="https://openreview.net/forum?id=44NKKzz1n5">Unit-Scaled Maximal Update Parametrization</a> and previous work <a class="reference external" href="https://arxiv.org/abs/2303.11257">Unit Scaling: Out-of-the-Box Low-Precision Training</a>.</p>
<p>Documentation can be found at
<a class="reference external" href="https://graphcore-research.github.io/unit-scaling">https://graphcore-research.github.io/unit-scaling</a> and an example notebook at <a class="reference internal" href="#examples/demo.ipynb"><span class="xref myst">examples/demo.ipynb</span></a>.</p>
<p><strong>Note:</strong> The library is currently in its <em>beta</em> release.
Some features have yet to be implemented and occasional bugs may be present.
We’re keen to help users with any problems they encounter.</p>
<section id="installation">
<h2><span class="section-number">2.1. </span>Installation<a class="headerlink" href="#installation" title="Permalink to this heading"></a></h2>
<p>To install the <code class="docutils literal notranslate"><span class="pre">unit-scaling</span></code> library, run:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">git</span><span class="o">+</span><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">graphcore</span><span class="o">-</span><span class="n">research</span><span class="o">/</span><span class="n">unit</span><span class="o">-</span><span class="n">scaling</span><span class="o">.</span><span class="n">git</span>
</pre></div>
</div>
</section>
<section id="what-is-unit-scaling">
<h2><span class="section-number">2.2. </span>What is unit scaling?<a class="headerlink" href="#what-is-unit-scaling" title="Permalink to this heading"></a></h2>
<p>For a demonstration of the library and an overview of how it works, see
<a class="reference external" href="https://github.com/graphcore-research/out-of-the-box-fp8-training/blob/main/out_of_the_box_fp8_training.ipynb">Out-of-the-Box FP8 Training</a>
(a notebook showing how to unit-scale the nanoGPT model).</p>
<p>For a more in-depth explanation, consult our paper
<a class="reference external" href="https://arxiv.org/abs/2303.11257">Unit Scaling: Out-of-the-Box Low-Precision Training</a>.</p>
<p>And for a practical introduction to using the library, see our <a class="reference external" href="https://graphcore-research.github.io/unit-scaling/user_guide.html">User Guide</a>.</p>
</section>
<section id="development">
<h2><span class="section-number">2.3. </span>Development<a class="headerlink" href="#development" title="Permalink to this heading"></a></h2>
<section id="development">
<h1><span class="section-number">2. </span>Development<a class="headerlink" href="#development" title="Permalink to this heading"></a></h1>
<p>For users who wish to develop using this codebase, the following setup is required:</p>
<p><strong>First-time setup</strong>:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python3<span class="w"> </span>-m<span class="w"> </span>venv<span class="w"> </span>.venv
Expand Down Expand Up @@ -137,12 +107,6 @@ <h2><span class="section-number">2.3. </span>Development<a class="headerlink" hr
</pre></div>
</div>
<p>then view <code class="docutils literal notranslate"><span class="pre">docs/_build/html/index.html</span></code> in your browser.</p>
</section>
<section id="license">
<h2><span class="section-number">2.4. </span>License<a class="headerlink" href="#license" title="Permalink to this heading"></a></h2>
<p>Copyright (c) 2023 Graphcore Ltd. Licensed under the Apache 2.0 License.</p>
<p>See <a class="reference internal" href="#NOTICE.md"><span class="xref myst">NOTICE.md</span></a> for further details.</p>
</section>
</section>


Expand Down
8 changes: 1 addition & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,7 @@ <h2>Development<a class="headerlink" href="#development" title="Permalink to thi
<li class="toctree-l2"><a class="reference internal" href="user_guide.html#optimising-unit-scaled-models">1.5. Optimising unit-scaled models</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="development.html">2. Developer guide</a><ul>
<li class="toctree-l2"><a class="reference internal" href="development.html#installation">2.1. Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="development.html#what-is-unit-scaling">2.2. What is unit scaling?</a></li>
<li class="toctree-l2"><a class="reference internal" href="development.html#development">2.3. Development</a></li>
<li class="toctree-l2"><a class="reference internal" href="development.html#license">2.4. License</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="development.html">2. Developer guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="limitations.html">3. Limitations</a></li>
<li class="toctree-l1"><a class="reference internal" href="blog.html">4. Blog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="blog.html#almost-scaled-dot-product-self-attention">4.1. <span class="xref std std-doc">Almost scaled dot-product self attention</span></a></li>
Expand Down
4 changes: 2 additions & 2 deletions limitations.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="4. Unit Scaling blog" href="blog.html" />
<link rel="prev" title="2. Unit-Scaled Maximal Update Parameterization (u-μP)" href="development.html" />
<link rel="prev" title="2. Development" href="development.html" />
</head>

<body class="wy-body-for-nav">
Expand Down Expand Up @@ -96,7 +96,7 @@ <h1><span class="section-number">3. </span>Limitations<a class="headerlink" href
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="development.html" class="btn btn-neutral float-left" title="2. Unit-Scaled Maximal Update Parameterization (u-μP)" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="development.html" class="btn btn-neutral float-left" title="2. Development" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="blog.html" class="btn btn-neutral float-right" title="4. Unit Scaling blog" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions user_guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="2. Unit-Scaled Maximal Update Parameterization (u-μP)" href="development.html" />
<link rel="next" title="2. Development" href="development.html" />
<link rel="prev" title="Unit Scaling" href="index.html" />
</head>

Expand Down Expand Up @@ -433,7 +433,7 @@ <h2><span class="section-number">1.5. </span>Optimising unit-scaled models<a cla
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Unit Scaling" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="development.html" class="btn btn-neutral float-right" title="2. Unit-Scaled Maximal Update Parameterization (u-μP)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="development.html" class="btn btn-neutral float-right" title="2. Development" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

<hr/>
Expand Down

0 comments on commit 5dc7a0d

Please sign in to comment.