Skip to content

Commit

Permalink
build based on fe41df5
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Jun 27, 2024
1 parent cbb2529 commit 0d53b2d
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-27T17:56:36","documenter_version":"1.5.0"}}
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-06-27T19:09:04","documenter_version":"1.5.0"}}
12 changes: 6 additions & 6 deletions dev/api_ref/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/changelog/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/datasets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

task = GLUE.QNLI()
datas = dataset(Train, task)
get_batch(datas, 4)</code></pre><h2 id="API-reference"><a class="docs-heading-anchor" href="#API-reference">API reference</a><a id="API-reference-1"></a><a class="docs-heading-anchor-permalink" href="#API-reference" title="Permalink"></a></h2></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Thursday 27 June 2024 17:56">Thursday 27 June 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
get_batch(datas, 4)</code></pre><h2 id="API-reference"><a class="docs-heading-anchor" href="#API-reference">API reference</a><a id="API-reference-1"></a><a class="docs-heading-anchor-permalink" href="#API-reference" title="Permalink"></a></h2></article><nav class="docs-footer"><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Thursday 27 June 2024 19:09">Thursday 27 June 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion dev/getstarted/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@

julia&gt; bert_model(encode(bertenc, &quot;Peter Piper picked a peck of pickled peppers&quot;))
(hidden_state = [0.54055643 -0.3517502 … 0.2955708 1.601667; 0.05538677 -0.1114391 … -0.2139448 0.3692414; … ; 0.34500372 0.38523915 … 0.2224255 0.7384993; -0.18260899 -0.05137573 … -0.2833455 -0.23427412;;;], attention_mask = NeuralAttentionlib.LengthMask{1, Vector{Int32}}(Int32[13]), pooled = Float32[-0.6727301; 0.42062035; … ; -0.902852; 0.99214816;;])
</code></pre><h2 id="GPU"><a class="docs-heading-anchor" href="#GPU">GPU</a><a id="GPU-1"></a><a class="docs-heading-anchor-permalink" href="#GPU" title="Permalink"></a></h2><p>Transformers relies on <code>CUDA.jl</code> (or <code>AMDGPU.jl</code>/<code>Metal.jl</code>) for the GPU stuffs. In <code>Flux</code> we normally use <code>Flux.gpu</code> to convert model or data to the device. In Transformers, we provide another 2 api (<code>enable_gpu</code> and <code>todevice</code>) for this. If <code>enable_gpu(true)</code> is set, <code>todevice</code> will be moving data to GPU device, otherwise it is copying data on CPU. The backend is selected by <code>Flux.gpu_backend!</code>. When calling <code>enable_gpu()</code>, corresponding GPU package (e.g. <code>CUDA.jl</code>) will be loaded (equivalent to <code>using CUDA</code> in REPL), which requires GPU packages to be installed in the environment. <em>notice</em>: <code>enable_gpu</code> should only be called in script, it cannot be used during precompilation.</p><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Transformers.enable_gpu" href="#Transformers.enable_gpu"><code>Transformers.enable_gpu</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">enable_gpu(t=true)</code></pre><p>Enable gpu for <code>todevice</code>, disable with <code>enable_gpu(false)</code>. The backend is selected by <code>Flux.gpu_backend!</code>. Should only be used in user scripts.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/chengchingwen/Transformers.jl/blob/f2b47053eece3e4f3731b6b8c0283437e877e0de/src/device.jl#L7-L12">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Transformers.todevice" href="#Transformers.todevice"><code>Transformers.todevice</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">todevice(x)</code></pre><p>Move data to device, only when gpu is enable with <code>enable_gpu</code>, basically equal <code>Flux.gpu</code>. Otherwise just <code>Flux.cpu</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/chengchingwen/Transformers.jl/blob/f2b47053eece3e4f3731b6b8c0283437e877e0de/src/device.jl#L46-L50">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Transformers.togpudevice" href="#Transformers.togpudevice"><code>Transformers.togpudevice</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">togpudevice(x)</code></pre><p>Move data to gpu device, backend selected by <code>Flux.gpu_backend!</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/chengchingwen/Transformers.jl/blob/f2b47053eece3e4f3731b6b8c0283437e877e0de/src/device.jl#L53-L57">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../tutorial/">Tutorial »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Thursday 27 June 2024 17:56">Thursday 27 June 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
</code></pre><h2 id="GPU"><a class="docs-heading-anchor" href="#GPU">GPU</a><a id="GPU-1"></a><a class="docs-heading-anchor-permalink" href="#GPU" title="Permalink"></a></h2><p>Transformers relies on <code>CUDA.jl</code> (or <code>AMDGPU.jl</code>/<code>Metal.jl</code>) for the GPU stuffs. In <code>Flux</code> we normally use <code>Flux.gpu</code> to convert model or data to the device. In Transformers, we provide another 2 api (<code>enable_gpu</code> and <code>todevice</code>) for this. If <code>enable_gpu(true)</code> is set, <code>todevice</code> will be moving data to GPU device, otherwise it is copying data on CPU. The backend is selected by <code>Flux.gpu_backend!</code>. When calling <code>enable_gpu()</code>, corresponding GPU package (e.g. <code>CUDA.jl</code>) will be loaded (equivalent to <code>using CUDA</code> in REPL), which requires GPU packages to be installed in the environment. <em>notice</em>: <code>enable_gpu</code> should only be called in script, it cannot be used during precompilation.</p><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Transformers.enable_gpu" href="#Transformers.enable_gpu"><code>Transformers.enable_gpu</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">enable_gpu(t=true)</code></pre><p>Enable gpu for <code>todevice</code>, disable with <code>enable_gpu(false)</code>. The backend is selected by <code>Flux.gpu_backend!</code>. Should only be used in user scripts.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/chengchingwen/Transformers.jl/blob/fe41df525c7da5839d1078ef1524f4503ce59d9e/src/device.jl#L7-L12">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Transformers.todevice" href="#Transformers.todevice"><code>Transformers.todevice</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">todevice(x)</code></pre><p>Move data to device, only when gpu is enable with <code>enable_gpu</code>, basically equal <code>Flux.gpu</code>. Otherwise just <code>Flux.cpu</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/chengchingwen/Transformers.jl/blob/fe41df525c7da5839d1078ef1524f4503ce59d9e/src/device.jl#L46-L50">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Transformers.togpudevice" href="#Transformers.togpudevice"><code>Transformers.togpudevice</code></a><span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">togpudevice(x)</code></pre><p>Move data to gpu device, backend selected by <code>Flux.gpu_backend!</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/chengchingwen/Transformers.jl/blob/fe41df525c7da5839d1078ef1524f4503ce59d9e/src/device.jl#L53-L57">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../tutorial/">Tutorial »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Thursday 27 June 2024 19:09">Thursday 27 June 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 0d53b2d

Please sign in to comment.