import{s as Ls,o as Hs,n as B}from"../chunks/scheduler.25b97de1.js";import{S as Ys,i as Ps,g as y,s as o,r as b,A as As,h as $,f as r,c as h,j as Xs,u as i,x as _,k as Gs,y as qs,a as p,v as j,d as f,t as g,w as d}from"../chunks/index.d9030fc9.js";import{T as Vs}from"../chunks/Tip.baa67368.js";import{C as N}from"../chunks/CodeBlock.e6cd0d95.js";import{D as Ds}from"../chunks/DocNotebookDropdown.5ea6cb78.js";import{F as Ts,M as A}from"../chunks/Markdown.7217f838.js";import{H as ws,E as Os}from"../chunks/EditOnGithub.91d95064.js";function Ks(u){let a,n=`Hugging Face’s Benchmarking tools are deprecated and it is advised to use external Benchmarking libraries to measure the speed
and memory complexity of Transformer models.`;return{c(){a=y("p"),a.textContent=n},l(e){a=$(e,"P",{"data-svelte-h":!0}),_(a)!=="svelte-ef5x4f"&&(a.textContent=n)},m(e,t){p(e,a,t)},p:B,d(e){e&&r(a)}}}function se(u){let a,n=`Here, <em>inference</em> is defined by a single forward pass, and <em>training</em> is defined by a single forward pass and
backward pass.`;return{c(){a=y("p"),a.innerHTML=n},l(e){a=$(e,"P",{"data-svelte-h":!0}),_(a)!=="svelte-1cagnud"&&(a.innerHTML=n)},m(e,t){p(e,a,t)},p:B,d(e){e&&r(a)}}}function ee(u){let a,n;return a=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFB5VG9yY2hCZW5jaG1hcmslMkMlMjBQeVRvcmNoQmVuY2htYXJrQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFB5VG9yY2hCZW5jaG1hcmtBcmd1bWVudHMobW9kZWxzJTNEJTVCJTIyZ29vZ2xlLWJlcnQlMkZiZXJ0LWJhc2UtdW5jYXNlZCUyMiU1RCUyQyUyMGJhdGNoX3NpemVzJTNEJTVCOCU1RCUyQyUyMHNlcXVlbmNlX2xlbmd0aHMlM0QlNUI4JTJDJTIwMzIlMkMlMjAxMjglMkMlMjA1MTIlNUQpJTBBYmVuY2htYXJrJTIwJTNEJTIwUHlUb3JjaEJlbmNobWFyayhhcmdzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PyTorchBenchmark, PyTorchBenchmarkArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>args = PyTorchBenchmarkArguments(models=[<span class="hljs-string">&quot;google-bert/bert-base-uncased&quot;</span>], batch_sizes=[<span class="hljs-number">8</span>], sequence_lengths=[<span class="hljs-number">8</span>, <span class="hljs-number">32</span>, <span class="hljs-number">128</span>, <span class="hljs-number">512</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>benchmark = PyTorchBenchmark(args)`,wrap:!1}}),{c(){b(a.$$.fragment)},l(e){i(a.$$.fragment,e)},m(e,t){j(a,e,t),n=!0},p:B,i(e){n||(f(a.$$.fragment,e),n=!0)},o(e){g(a.$$.fragment,e),n=!1},d(e){d(a,e)}}}function ae(u){let a,n;return a=new A({props:{$$slots:{default:[ee]},$$scope:{ctx:u}}}),{c(){b(a.$$.fragment)},l(e){i(a.$$.fragment,e)},m(e,t){j(a,e,t),n=!0},p(e,t){const c={};t&2&&(c.$$scope={dirty:t,ctx:e}),a.$set(c)},i(e){n||(f(a.$$.fragment,e),n=!0)},o(e){g(a.$$.fragment,e),n=!1},d(e){d(a,e)}}}function ne(u){let a,n;return a=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRlbnNvckZsb3dCZW5jaG1hcmslMkMlMjBUZW5zb3JGbG93QmVuY2htYXJrQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFRlbnNvckZsb3dCZW5jaG1hcmtBcmd1bWVudHMoJTBBJTIwJTIwJTIwJTIwbW9kZWxzJTNEJTVCJTIyZ29vZ2xlLWJlcnQlMkZiZXJ0LWJhc2UtdW5jYXNlZCUyMiU1RCUyQyUyMGJhdGNoX3NpemVzJTNEJTVCOCU1RCUyQyUyMHNlcXVlbmNlX2xlbmd0aHMlM0QlNUI4JTJDJTIwMzIlMkMlMjAxMjglMkMlMjA1MTIlNUQlMEEpJTBBYmVuY2htYXJrJTIwJTNEJTIwVGVuc29yRmxvd0JlbmNobWFyayhhcmdzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TensorFlowBenchmark, TensorFlowBenchmarkArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>args = TensorFlowBenchmarkArguments(
<span class="hljs-meta">... </span>    models=[<span class="hljs-string">&quot;google-bert/bert-base-uncased&quot;</span>], batch_sizes=[<span class="hljs-number">8</span>], sequence_lengths=[<span class="hljs-number">8</span>, <span class="hljs-number">32</span>, <span class="hljs-number">128</span>, <span class="hljs-number">512</span>]
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>benchmark = TensorFlowBenchmark(args)`,wrap:!1}}),{c(){b(a.$$.fragment)},l(e){i(a.$$.fragment,e)},m(e,t){j(a,e,t),n=!0},p:B,i(e){n||(f(a.$$.fragment,e),n=!0)},o(e){g(a.$$.fragment,e),n=!1},d(e){d(a,e)}}}function le(u){let a,n;return a=new A({props:{$$slots:{default:[ne]},$$scope:{ctx:u}}}),{c(){b(a.$$.fragment)},l(e){i(a.$$.fragment,e)},m(e,t){j(a,e,t),n=!0},p(e,t){const c={};t&2&&(c.$$scope={dirty:t,ctx:e}),a.$set(c)},i(e){n||(f(a.$$.fragment,e),n=!0)},o(e){g(a.$$.fragment,e),n=!1},d(e){d(a,e)}}}function re(u){let a,n,e,t="An instantiated benchmark object can then simply be run by calling <code>benchmark.run()</code>.",c,w,M;return a=new N({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGYmVuY2htYXJraW5nJTJGcnVuX2JlbmNobWFyay5weSUyMC0taGVscA==",highlighted:'python examples/pytorch/benchmarking/run_benchmark.py --<span class="hljs-built_in">help</span>',wrap:!1}}),w=new N({props:{code:"cmVzdWx0cyUyMCUzRCUyMGJlbmNobWFyay5ydW4oKSUwQXByaW50KHJlc3VsdHMpJTBBJTBBJTBB",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>results = benchmark.run()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(results)
====================       INFERENCE - SPEED - RESULT       ====================
--------------------------------------------------------------------------------
Model Name             Batch Size     Seq Length     Time <span class="hljs-keyword">in</span> s                  
--------------------------------------------------------------------------------
google-bert/bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">0.006</span>     
google-bert/bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">0.006</span>     
google-bert/bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">0.018</span>     
google-bert/bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">0.088</span>     
--------------------------------------------------------------------------------

====================      INFERENCE - MEMORY - RESULT       ====================
--------------------------------------------------------------------------------
Model Name             Batch Size     Seq Length    Memory <span class="hljs-keyword">in</span> MB 
--------------------------------------------------------------------------------
google-bert/bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">1227</span>
google-bert/bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">1281</span>
google-bert/bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">1307</span>
google-bert/bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">1539</span>
--------------------------------------------------------------------------------

====================        ENVIRONMENT INFORMATION         ====================

- transformers_version: <span class="hljs-number">2.11</span><span class="hljs-number">.0</span>
- framework: PyTorch
- use_torchscript: <span class="hljs-literal">False</span>
- framework_version: <span class="hljs-number">1.4</span><span class="hljs-number">.0</span>
- python_version: <span class="hljs-number">3.6</span><span class="hljs-number">.10</span>
- system: Linux
- cpu: x86_64
- architecture: 64bit
- date: <span class="hljs-number">2020</span>-06-<span class="hljs-number">29</span>
- time: 08:<span class="hljs-number">58</span>:<span class="hljs-number">43.371351</span>
- fp16: <span class="hljs-literal">False</span>
- use_multiprocessing: <span class="hljs-literal">True</span>
- only_pretrain_model: <span class="hljs-literal">False</span>
- cpu_ram_mb: <span class="hljs-number">32088</span>
- use_gpu: <span class="hljs-literal">True</span>
- num_gpus: <span class="hljs-number">1</span>
- gpu: TITAN RTX
- gpu_ram_mb: <span class="hljs-number">24217</span>
- gpu_power_watts: <span class="hljs-number">280.0</span>
- gpu_performance_state: <span class="hljs-number">2</span>
- use_tpu: <span class="hljs-literal">False</span>`,wrap:!1}}),{c(){b(a.$$.fragment),n=o(),e=y("p"),e.innerHTML=t,c=o(),b(w.$$.fragment)},l(m){i(a.$$.fragment,m),n=h(m),e=$(m,"P",{"data-svelte-h":!0}),_(e)!=="svelte-ersiz3"&&(e.innerHTML=t),c=h(m),i(w.$$.fragment,m)},m(m,T){j(a,m,T),p(m,n,T),p(m,e,T),p(m,c,T),j(w,m,T),M=!0},p:B,i(m){M||(f(a.$$.fragment,m),f(w.$$.fragment,m),M=!0)},o(m){g(a.$$.fragment,m),g(w.$$.fragment,m),M=!1},d(m){m&&(r(n),r(e),r(c)),d(a,m),d(w,m)}}}function te(u){let a,n;return a=new A({props:{$$slots:{default:[re]},$$scope:{ctx:u}}}),{c(){b(a.$$.fragment)},l(e){i(a.$$.fragment,e)},m(e,t){j(a,e,t),n=!0},p(e,t){const c={};t&2&&(c.$$scope={dirty:t,ctx:e}),a.$set(c)},i(e){n||(f(a.$$.fragment,e),n=!0)},o(e){g(a.$$.fragment,e),n=!1},d(e){d(a,e)}}}function pe(u){let a,n,e,t="An instantiated benchmark object can then simply be run by calling <code>benchmark.run()</code>.",c,w,M;return a=new N({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZ0ZW5zb3JmbG93JTJGYmVuY2htYXJraW5nJTJGcnVuX2JlbmNobWFya190Zi5weSUyMC0taGVscA==",highlighted:'python examples/tensorflow/benchmarking/run_benchmark_tf.py --<span class="hljs-built_in">help</span>',wrap:!1}}),w=new N({props:{code:"cmVzdWx0cyUyMCUzRCUyMGJlbmNobWFyay5ydW4oKSUwQXByaW50KHJlc3VsdHMpJTBBcmVzdWx0cyUyMCUzRCUyMGJlbmNobWFyay5ydW4oKSUwQXByaW50KHJlc3VsdHMpJTBBJTBBJTBB",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>results = benchmark.run()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(results)
<span class="hljs-meta">&gt;&gt;&gt; </span>results = benchmark.run()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(results)
====================       INFERENCE - SPEED - RESULT       ====================
--------------------------------------------------------------------------------
Model Name             Batch Size     Seq Length     Time <span class="hljs-keyword">in</span> s                  
--------------------------------------------------------------------------------
google-bert/bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">0.005</span>
google-bert/bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">0.008</span>
google-bert/bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">0.022</span>
google-bert/bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">0.105</span>
--------------------------------------------------------------------------------

====================      INFERENCE - MEMORY - RESULT       ====================
--------------------------------------------------------------------------------
Model Name             Batch Size     Seq Length    Memory <span class="hljs-keyword">in</span> MB 
--------------------------------------------------------------------------------
google-bert/bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">1330</span>
google-bert/bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">1330</span>
google-bert/bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">1330</span>
google-bert/bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">1770</span>
--------------------------------------------------------------------------------

====================        ENVIRONMENT INFORMATION         ====================

- transformers_version: <span class="hljs-number">2.11</span><span class="hljs-number">.0</span>
- framework: Tensorflow
- use_xla: <span class="hljs-literal">False</span>
- framework_version: <span class="hljs-number">2.2</span><span class="hljs-number">.0</span>
- python_version: <span class="hljs-number">3.6</span><span class="hljs-number">.10</span>
- system: Linux
- cpu: x86_64
- architecture: 64bit
- date: <span class="hljs-number">2020</span>-06-<span class="hljs-number">29</span>
- time: 09:<span class="hljs-number">26</span>:<span class="hljs-number">35.617317</span>
- fp16: <span class="hljs-literal">False</span>
- use_multiprocessing: <span class="hljs-literal">True</span>
- only_pretrain_model: <span class="hljs-literal">False</span>
- cpu_ram_mb: <span class="hljs-number">32088</span>
- use_gpu: <span class="hljs-literal">True</span>
- num_gpus: <span class="hljs-number">1</span>
- gpu: TITAN RTX
- gpu_ram_mb: <span class="hljs-number">24217</span>
- gpu_power_watts: <span class="hljs-number">280.0</span>
- gpu_performance_state: <span class="hljs-number">2</span>
- use_tpu: <span class="hljs-literal">False</span>`,wrap:!1}}),{c(){b(a.$$.fragment),n=o(),e=y("p"),e.innerHTML=t,c=o(),b(w.$$.fragment)},l(m){i(a.$$.fragment,m),n=h(m),e=$(m,"P",{"data-svelte-h":!0}),_(e)!=="svelte-ersiz3"&&(e.innerHTML=t),c=h(m),i(w.$$.fragment,m)},m(m,T){j(a,m,T),p(m,n,T),p(m,e,T),p(m,c,T),j(w,m,T),M=!0},p:B,i(m){M||(f(a.$$.fragment,m),f(w.$$.fragment,m),M=!0)},o(m){g(a.$$.fragment,m),g(w.$$.fragment,m),M=!1},d(m){m&&(r(n),r(e),r(c)),d(a,m),d(w,m)}}}function me(u){let a,n;return a=new A({props:{$$slots:{default:[pe]},$$scope:{ctx:u}}}),{c(){b(a.$$.fragment)},l(e){i(a.$$.fragment,e)},m(e,t){j(a,e,t),n=!0},p(e,t){const c={};t&2&&(c.$$scope={dirty:t,ctx:e}),a.$set(c)},i(e){n||(f(a.$$.fragment,e),n=!0)},o(e){g(a.$$.fragment,e),n=!1},d(e){d(a,e)}}}function ce(u){let a,n;return a=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFB5VG9yY2hCZW5jaG1hcmslMkMlMjBQeVRvcmNoQmVuY2htYXJrQXJndW1lbnRzJTJDJTIwQmVydENvbmZpZyUwQSUwQWFyZ3MlMjAlM0QlMjBQeVRvcmNoQmVuY2htYXJrQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG1vZGVscyUzRCU1QiUyMmJlcnQtYmFzZSUyMiUyQyUyMCUyMmJlcnQtMzg0LWhpZCUyMiUyQyUyMCUyMmJlcnQtNi1sYXklMjIlNUQlMkMlMjBiYXRjaF9zaXplcyUzRCU1QjglNUQlMkMlMjBzZXF1ZW5jZV9sZW5ndGhzJTNEJTVCOCUyQyUyMDMyJTJDJTIwMTI4JTJDJTIwNTEyJTVEJTBBKSUwQWNvbmZpZ19iYXNlJTIwJTNEJTIwQmVydENvbmZpZygpJTBBY29uZmlnXzM4NF9oaWQlMjAlM0QlMjBCZXJ0Q29uZmlnKGhpZGRlbl9zaXplJTNEMzg0KSUwQWNvbmZpZ182X2xheSUyMCUzRCUyMEJlcnRDb25maWcobnVtX2hpZGRlbl9sYXllcnMlM0Q2KSUwQSUwQWJlbmNobWFyayUyMCUzRCUyMFB5VG9yY2hCZW5jaG1hcmsoYXJncyUyQyUyMGNvbmZpZ3MlM0QlNUJjb25maWdfYmFzZSUyQyUyMGNvbmZpZ18zODRfaGlkJTJDJTIwY29uZmlnXzZfbGF5JTVEKSUwQWJlbmNobWFyay5ydW4oKSUwQSUwQSUwQQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> PyTorchBenchmark, PyTorchBenchmarkArguments, BertConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>args = PyTorchBenchmarkArguments(
<span class="hljs-meta">... </span>    models=[<span class="hljs-string">&quot;bert-base&quot;</span>, <span class="hljs-string">&quot;bert-384-hid&quot;</span>, <span class="hljs-string">&quot;bert-6-lay&quot;</span>], batch_sizes=[<span class="hljs-number">8</span>], sequence_lengths=[<span class="hljs-number">8</span>, <span class="hljs-number">32</span>, <span class="hljs-number">128</span>, <span class="hljs-number">512</span>]
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config_base = BertConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_384_hid = BertConfig(hidden_size=<span class="hljs-number">384</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config_6_lay = BertConfig(num_hidden_layers=<span class="hljs-number">6</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>benchmark = PyTorchBenchmark(args, configs=[config_base, config_384_hid, config_6_lay])
<span class="hljs-meta">&gt;&gt;&gt; </span>benchmark.run()
====================       INFERENCE - SPEED - RESULT       ====================
--------------------------------------------------------------------------------
Model Name             Batch Size     Seq Length       Time <span class="hljs-keyword">in</span> s                  
--------------------------------------------------------------------------------
bert-base                  <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">0.006</span>
bert-base                  <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">0.006</span>
bert-base                  <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">0.018</span>     
bert-base                  <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">0.088</span>     
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">0.006</span>     
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">0.006</span>     
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">0.011</span>     
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">0.054</span>     
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">0.003</span>     
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">0.004</span>     
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">0.009</span>     
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">0.044</span>
--------------------------------------------------------------------------------

====================      INFERENCE - MEMORY - RESULT       ====================
--------------------------------------------------------------------------------
Model Name             Batch Size     Seq Length      Memory <span class="hljs-keyword">in</span> MB 
--------------------------------------------------------------------------------
bert-base                  <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">1277</span>
bert-base                  <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">1281</span>
bert-base                  <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">1307</span>     
bert-base                  <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">1539</span>     
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">1005</span>     
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">1027</span>     
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">1035</span>     
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">1255</span>     
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">1097</span>     
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">1101</span>     
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">1127</span>     
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">1359</span>
--------------------------------------------------------------------------------

====================        ENVIRONMENT INFORMATION         ====================

- transformers_version: <span class="hljs-number">2.11</span><span class="hljs-number">.0</span>
- framework: PyTorch
- use_torchscript: <span class="hljs-literal">False</span>
- framework_version: <span class="hljs-number">1.4</span><span class="hljs-number">.0</span>
- python_version: <span class="hljs-number">3.6</span><span class="hljs-number">.10</span>
- system: Linux
- cpu: x86_64
- architecture: 64bit
- date: <span class="hljs-number">2020</span>-06-<span class="hljs-number">29</span>
- time: 09:<span class="hljs-number">35</span>:<span class="hljs-number">25.143267</span>
- fp16: <span class="hljs-literal">False</span>
- use_multiprocessing: <span class="hljs-literal">True</span>
- only_pretrain_model: <span class="hljs-literal">False</span>
- cpu_ram_mb: <span class="hljs-number">32088</span>
- use_gpu: <span class="hljs-literal">True</span>
- num_gpus: <span class="hljs-number">1</span>
- gpu: TITAN RTX
- gpu_ram_mb: <span class="hljs-number">24217</span>
- gpu_power_watts: <span class="hljs-number">280.0</span>
- gpu_performance_state: <span class="hljs-number">2</span>
- use_tpu: <span class="hljs-literal">False</span>`,wrap:!1}}),{c(){b(a.$$.fragment)},l(e){i(a.$$.fragment,e)},m(e,t){j(a,e,t),n=!0},p:B,i(e){n||(f(a.$$.fragment,e),n=!0)},o(e){g(a.$$.fragment,e),n=!1},d(e){d(a,e)}}}function oe(u){let a,n;return a=new A({props:{$$slots:{default:[ce]},$$scope:{ctx:u}}}),{c(){b(a.$$.fragment)},l(e){i(a.$$.fragment,e)},m(e,t){j(a,e,t),n=!0},p(e,t){const c={};t&2&&(c.$$scope={dirty:t,ctx:e}),a.$set(c)},i(e){n||(f(a.$$.fragment,e),n=!0)},o(e){g(a.$$.fragment,e),n=!1},d(e){d(a,e)}}}function he(u){let a,n;return a=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRlbnNvckZsb3dCZW5jaG1hcmslMkMlMjBUZW5zb3JGbG93QmVuY2htYXJrQXJndW1lbnRzJTJDJTIwQmVydENvbmZpZyUwQSUwQWFyZ3MlMjAlM0QlMjBUZW5zb3JGbG93QmVuY2htYXJrQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG1vZGVscyUzRCU1QiUyMmJlcnQtYmFzZSUyMiUyQyUyMCUyMmJlcnQtMzg0LWhpZCUyMiUyQyUyMCUyMmJlcnQtNi1sYXklMjIlNUQlMkMlMjBiYXRjaF9zaXplcyUzRCU1QjglNUQlMkMlMjBzZXF1ZW5jZV9sZW5ndGhzJTNEJTVCOCUyQyUyMDMyJTJDJTIwMTI4JTJDJTIwNTEyJTVEJTBBKSUwQWNvbmZpZ19iYXNlJTIwJTNEJTIwQmVydENvbmZpZygpJTBBY29uZmlnXzM4NF9oaWQlMjAlM0QlMjBCZXJ0Q29uZmlnKGhpZGRlbl9zaXplJTNEMzg0KSUwQWNvbmZpZ182X2xheSUyMCUzRCUyMEJlcnRDb25maWcobnVtX2hpZGRlbl9sYXllcnMlM0Q2KSUwQSUwQWJlbmNobWFyayUyMCUzRCUyMFRlbnNvckZsb3dCZW5jaG1hcmsoYXJncyUyQyUyMGNvbmZpZ3MlM0QlNUJjb25maWdfYmFzZSUyQyUyMGNvbmZpZ18zODRfaGlkJTJDJTIwY29uZmlnXzZfbGF5JTVEKSUwQWJlbmNobWFyay5ydW4oKSUwQSUwQSUwQQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TensorFlowBenchmark, TensorFlowBenchmarkArguments, BertConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>args = TensorFlowBenchmarkArguments(
<span class="hljs-meta">... </span>    models=[<span class="hljs-string">&quot;bert-base&quot;</span>, <span class="hljs-string">&quot;bert-384-hid&quot;</span>, <span class="hljs-string">&quot;bert-6-lay&quot;</span>], batch_sizes=[<span class="hljs-number">8</span>], sequence_lengths=[<span class="hljs-number">8</span>, <span class="hljs-number">32</span>, <span class="hljs-number">128</span>, <span class="hljs-number">512</span>]
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config_base = BertConfig()
<span class="hljs-meta">&gt;&gt;&gt; </span>config_384_hid = BertConfig(hidden_size=<span class="hljs-number">384</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config_6_lay = BertConfig(num_hidden_layers=<span class="hljs-number">6</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>benchmark = TensorFlowBenchmark(args, configs=[config_base, config_384_hid, config_6_lay])
<span class="hljs-meta">&gt;&gt;&gt; </span>benchmark.run()
====================       INFERENCE - SPEED - RESULT       ====================
--------------------------------------------------------------------------------
Model Name             Batch Size     Seq Length       Time <span class="hljs-keyword">in</span> s                  
--------------------------------------------------------------------------------
bert-base                  <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">0.005</span>
bert-base                  <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">0.008</span>
bert-base                  <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">0.022</span>
bert-base                  <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">0.106</span>
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">0.005</span>
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">0.007</span>
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">0.018</span>
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">0.064</span>
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">0.002</span>
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">0.003</span>
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">0.0011</span>
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">0.074</span>
--------------------------------------------------------------------------------

====================      INFERENCE - MEMORY - RESULT       ====================
--------------------------------------------------------------------------------
Model Name             Batch Size     Seq Length      Memory <span class="hljs-keyword">in</span> MB 
--------------------------------------------------------------------------------
bert-base                  <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">1330</span>
bert-base                  <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">1330</span>
bert-base                  <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">1330</span>
bert-base                  <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">1770</span>
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">1330</span>
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">1330</span>
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">1330</span>
bert-<span class="hljs-number">384</span>-hid              <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">1540</span>
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">1330</span>
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">1330</span>
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">1330</span>
bert-<span class="hljs-number">6</span>-lay                 <span class="hljs-number">8</span>              <span class="hljs-number">512</span>            <span class="hljs-number">1540</span>
--------------------------------------------------------------------------------

====================        ENVIRONMENT INFORMATION         ====================

- transformers_version: <span class="hljs-number">2.11</span><span class="hljs-number">.0</span>
- framework: Tensorflow
- use_xla: <span class="hljs-literal">False</span>
- framework_version: <span class="hljs-number">2.2</span><span class="hljs-number">.0</span>
- python_version: <span class="hljs-number">3.6</span><span class="hljs-number">.10</span>
- system: Linux
- cpu: x86_64
- architecture: 64bit
- date: <span class="hljs-number">2020</span>-06-<span class="hljs-number">29</span>
- time: 09:<span class="hljs-number">38</span>:<span class="hljs-number">15.487125</span>
- fp16: <span class="hljs-literal">False</span>
- use_multiprocessing: <span class="hljs-literal">True</span>
- only_pretrain_model: <span class="hljs-literal">False</span>
- cpu_ram_mb: <span class="hljs-number">32088</span>
- use_gpu: <span class="hljs-literal">True</span>
- num_gpus: <span class="hljs-number">1</span>
- gpu: TITAN RTX
- gpu_ram_mb: <span class="hljs-number">24217</span>
- gpu_power_watts: <span class="hljs-number">280.0</span>
- gpu_performance_state: <span class="hljs-number">2</span>
- use_tpu: <span class="hljs-literal">False</span>`,wrap:!1}}),{c(){b(a.$$.fragment)},l(e){i(a.$$.fragment,e)},m(e,t){j(a,e,t),n=!0},p:B,i(e){n||(f(a.$$.fragment,e),n=!0)},o(e){g(a.$$.fragment,e),n=!1},d(e){d(a,e)}}}function ue(u){let a,n;return a=new A({props:{$$slots:{default:[he]},$$scope:{ctx:u}}}),{c(){b(a.$$.fragment)},l(e){i(a.$$.fragment,e)},m(e,t){j(a,e,t),n=!0},p(e,t){const c={};t&2&&(c.$$scope={dirty:t,ctx:e}),a.$set(c)},i(e){n||(f(a.$$.fragment,e),n=!0)},o(e){g(a.$$.fragment,e),n=!1},d(e){d(a,e)}}}function be(u){let a,n,e,t,c,w,M,m,T,D,C,Ms="Let’s take a look at how 🤗 Transformers models can be benchmarked, best practices, and already available benchmarks.",O,E,_s='A notebook explaining in more detail how to benchmark 🤗 Transformers models can be found <a href="https://github.com/huggingface/notebooks/tree/main/examples/benchmark.ipynb" rel="nofollow">here</a>.',K,Z,ss,Q,ks="The classes <code>PyTorchBenchmark</code> and <code>TensorFlowBenchmark</code> allow to flexibly benchmark 🤗 Transformers models. The benchmark classes allow us to measure the <em>peak memory usage</em> and <em>required time</em> for both <em>inference</em> and <em>training</em>.",es,k,as,z,Us=`The benchmark classes <code>PyTorchBenchmark</code> and <code>TensorFlowBenchmark</code> expect an object of type <code>PyTorchBenchmarkArguments</code> and
<code>TensorFlowBenchmarkArguments</code>, respectively, for instantiation. <code>PyTorchBenchmarkArguments</code> and <code>TensorFlowBenchmarkArguments</code> are data classes and contain all relevant configurations for their corresponding benchmark class. In the following example, it is shown how a BERT model of type <em>bert-base-cased</em> can be benchmarked.`,ns,U,ls,R,Js=`Here, three arguments are given to the benchmark argument data classes, namely <code>models</code>, <code>batch_sizes</code>, and
<code>sequence_lengths</code>. The argument <code>models</code> is required and expects a <code>list</code> of model identifiers from the
<a href="https://huggingface.co/models" rel="nofollow">model hub</a> The <code>list</code> arguments <code>batch_sizes</code> and <code>sequence_lengths</code> define
the size of the <code>input_ids</code> on which the model is benchmarked. There are many more parameters that can be configured
via the benchmark argument data classes. For more detail on these one can either directly consult the files
<code>src/transformers/benchmark/benchmark_args_utils.py</code>, <code>src/transformers/benchmark/benchmark_args.py</code> (for PyTorch)
and <code>src/transformers/benchmark/benchmark_args_tf.py</code> (for Tensorflow). Alternatively, running the following shell
commands from root will print out a descriptive list of all configurable parameters for PyTorch and Tensorflow
respectively.`,rs,J,ts,W,vs=`By default, the <em>time</em> and the <em>required memory</em> for <em>inference</em> are benchmarked. In the example output above the first
two sections show the result corresponding to <em>inference time</em> and <em>inference memory</em>. In addition, all relevant
information about the computing environment, <em>e.g.</em> the GPU type, the system, the library versions, etc… are printed
out in the third section under <em>ENVIRONMENT INFORMATION</em>. This information can optionally be saved in a <em>.csv</em> file
when adding the argument <code>save_to_csv=True</code> to <code>PyTorchBenchmarkArguments</code> and
<code>TensorFlowBenchmarkArguments</code> respectively. In this case, every section is saved in a separate
<em>.csv</em> file. The path to each <em>.csv</em> file can optionally be defined via the argument data classes.`,ps,F,Ns=`Instead of benchmarking pre-trained models via their model identifier, <em>e.g.</em> <code>google-bert/bert-base-uncased</code>, the user can
alternatively benchmark an arbitrary configuration of any available model class. In this case, a <code>list</code> of
configurations must be inserted with the benchmark args as follows.`,ms,v,cs,x,Bs=`Again, <em>inference time</em> and <em>required memory</em> for <em>inference</em> are measured, but this time for customized configurations
of the <code>BertModel</code> class. This feature can especially be helpful when deciding for which configuration the model
should be trained.`,os,I,hs,S,Cs="This section lists a couple of best practices one should be aware of when benchmarking a model.",us,X,Es=`<li>Currently, only single device benchmarking is supported. When benchmarking on GPU, it is recommended that the user
specifies on which device the code should be run by setting the <code>CUDA_VISIBLE_DEVICES</code> environment variable in the
shell, <em>e.g.</em> <code>export CUDA_VISIBLE_DEVICES=0</code> before running the code.</li> <li>The option <code>no_multi_processing</code> should only be set to <code>True</code> for testing and debugging. To ensure accurate
memory measurement it is recommended to run each memory benchmark in a separate process by making sure
<code>no_multi_processing</code> is set to <code>True</code>.</li> <li>One should always state the environment information when sharing the results of a model benchmark. Results can vary
heavily between different GPU devices, library versions, etc., as a consequence, benchmark results on their own are not very
useful for the community.</li>`,bs,G,is,V,Zs=`Previously all available core models (10 at the time) have been benchmarked for <em>inference time</em>, across many different
settings: using PyTorch, with and without TorchScript, using TensorFlow, with and without XLA. All of those tests were
done across CPUs (except for TensorFlow XLA) and GPUs.`,js,L,Qs=`The approach is detailed in the <a href="https://medium.com/huggingface/benchmarking-transformers-pytorch-and-tensorflow-e2917fb891c2" rel="nofollow">following blogpost</a> and the results are
available <a href="https://docs.google.com/spreadsheets/d/1sryqufw2D0XlUH4sq3e9Wnxu5EAQkaohzrJbd5HdQ_w/edit?usp=sharing" rel="nofollow">here</a>.`,fs,H,zs="With the new <em>benchmark</em> tools, it is easier than ever to share your benchmark results with the community",gs,Y,Rs='<li><a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/benchmarking/README.md" rel="nofollow">PyTorch Benchmarking Results</a>.</li> <li><a href="https://github.com/huggingface/transformers/tree/main/examples/tensorflow/benchmarking/README.md" rel="nofollow">TensorFlow Benchmarking Results</a>.</li>',ds,P,ys,q,$s;return c=new ws({props:{title:"Benchmarks",local:"benchmarks",headingTag:"h1"}}),M=new Vs({props:{warning:!0,$$slots:{default:[Ks]},$$scope:{ctx:u}}}),T=new Ds({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/benchmarks.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/pytorch/benchmarks.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/tensorflow/benchmarks.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/benchmarks.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/pytorch/benchmarks.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/tensorflow/benchmarks.ipynb"}]}}),Z=new ws({props:{title:"How to benchmark 🤗 Transformers models",local:"how-to-benchmark--transformers-models",headingTag:"h2"}}),k=new Vs({props:{$$slots:{default:[se]},$$scope:{ctx:u}}}),U=new Ts({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[le],pytorch:[ae]},$$scope:{ctx:u}}}),J=new Ts({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[me],pytorch:[te]},$$scope:{ctx:u}}}),v=new Ts({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ue],pytorch:[oe]},$$scope:{ctx:u}}}),I=new ws({props:{title:"Benchmark best practices",local:"benchmark-best-practices",headingTag:"h2"}}),G=new ws({props:{title:"Sharing your benchmark",local:"sharing-your-benchmark",headingTag:"h2"}}),P=new Os({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/benchmarks.md"}}),{c(){a=y("meta"),n=o(),e=y("p"),t=o(),b(c.$$.fragment),w=o(),b(M.$$.fragment),m=o(),b(T.$$.fragment),D=o(),C=y("p"),C.textContent=Ms,O=o(),E=y("p"),E.innerHTML=_s,K=o(),b(Z.$$.fragment),ss=o(),Q=y("p"),Q.innerHTML=ks,es=o(),b(k.$$.fragment),as=o(),z=y("p"),z.innerHTML=Us,ns=o(),b(U.$$.fragment),ls=o(),R=y("p"),R.innerHTML=Js,rs=o(),b(J.$$.fragment),ts=o(),W=y("p"),W.innerHTML=vs,ps=o(),F=y("p"),F.innerHTML=Ns,ms=o(),b(v.$$.fragment),cs=o(),x=y("p"),x.innerHTML=Bs,os=o(),b(I.$$.fragment),hs=o(),S=y("p"),S.textContent=Cs,us=o(),X=y("ul"),X.innerHTML=Es,bs=o(),b(G.$$.fragment),is=o(),V=y("p"),V.innerHTML=Zs,js=o(),L=y("p"),L.innerHTML=Qs,fs=o(),H=y("p"),H.innerHTML=zs,gs=o(),Y=y("ul"),Y.innerHTML=Rs,ds=o(),b(P.$$.fragment),ys=o(),q=y("p"),this.h()},l(s){const l=As("svelte-u9bgzb",document.head);a=$(l,"META",{name:!0,content:!0}),l.forEach(r),n=h(s),e=$(s,"P",{}),Xs(e).forEach(r),t=h(s),i(c.$$.fragment,s),w=h(s),i(M.$$.fragment,s),m=h(s),i(T.$$.fragment,s),D=h(s),C=$(s,"P",{"data-svelte-h":!0}),_(C)!=="svelte-13lcah"&&(C.textContent=Ms),O=h(s),E=$(s,"P",{"data-svelte-h":!0}),_(E)!=="svelte-r2a0pt"&&(E.innerHTML=_s),K=h(s),i(Z.$$.fragment,s),ss=h(s),Q=$(s,"P",{"data-svelte-h":!0}),_(Q)!=="svelte-1flsss8"&&(Q.innerHTML=ks),es=h(s),i(k.$$.fragment,s),as=h(s),z=$(s,"P",{"data-svelte-h":!0}),_(z)!=="svelte-1ehry66"&&(z.innerHTML=Us),ns=h(s),i(U.$$.fragment,s),ls=h(s),R=$(s,"P",{"data-svelte-h":!0}),_(R)!=="svelte-1eubt8z"&&(R.innerHTML=Js),rs=h(s),i(J.$$.fragment,s),ts=h(s),W=$(s,"P",{"data-svelte-h":!0}),_(W)!=="svelte-44z1ex"&&(W.innerHTML=vs),ps=h(s),F=$(s,"P",{"data-svelte-h":!0}),_(F)!=="svelte-1r6j6dx"&&(F.innerHTML=Ns),ms=h(s),i(v.$$.fragment,s),cs=h(s),x=$(s,"P",{"data-svelte-h":!0}),_(x)!=="svelte-ztfcrc"&&(x.innerHTML=Bs),os=h(s),i(I.$$.fragment,s),hs=h(s),S=$(s,"P",{"data-svelte-h":!0}),_(S)!=="svelte-c3uya"&&(S.textContent=Cs),us=h(s),X=$(s,"UL",{"data-svelte-h":!0}),_(X)!=="svelte-zn5q06"&&(X.innerHTML=Es),bs=h(s),i(G.$$.fragment,s),is=h(s),V=$(s,"P",{"data-svelte-h":!0}),_(V)!=="svelte-wholqk"&&(V.innerHTML=Zs),js=h(s),L=$(s,"P",{"data-svelte-h":!0}),_(L)!=="svelte-mk4cui"&&(L.innerHTML=Qs),fs=h(s),H=$(s,"P",{"data-svelte-h":!0}),_(H)!=="svelte-15vqju9"&&(H.innerHTML=zs),gs=h(s),Y=$(s,"UL",{"data-svelte-h":!0}),_(Y)!=="svelte-1q9j466"&&(Y.innerHTML=Rs),ds=h(s),i(P.$$.fragment,s),ys=h(s),q=$(s,"P",{}),Xs(q).forEach(r),this.h()},h(){Gs(a,"name","hf:doc:metadata"),Gs(a,"content",ie)},m(s,l){qs(document.head,a),p(s,n,l),p(s,e,l),p(s,t,l),j(c,s,l),p(s,w,l),j(M,s,l),p(s,m,l),j(T,s,l),p(s,D,l),p(s,C,l),p(s,O,l),p(s,E,l),p(s,K,l),j(Z,s,l),p(s,ss,l),p(s,Q,l),p(s,es,l),j(k,s,l),p(s,as,l),p(s,z,l),p(s,ns,l),j(U,s,l),p(s,ls,l),p(s,R,l),p(s,rs,l),j(J,s,l),p(s,ts,l),p(s,W,l),p(s,ps,l),p(s,F,l),p(s,ms,l),j(v,s,l),p(s,cs,l),p(s,x,l),p(s,os,l),j(I,s,l),p(s,hs,l),p(s,S,l),p(s,us,l),p(s,X,l),p(s,bs,l),j(G,s,l),p(s,is,l),p(s,V,l),p(s,js,l),p(s,L,l),p(s,fs,l),p(s,H,l),p(s,gs,l),p(s,Y,l),p(s,ds,l),j(P,s,l),p(s,ys,l),p(s,q,l),$s=!0},p(s,[l]){const Ws={};l&2&&(Ws.$$scope={dirty:l,ctx:s}),M.$set(Ws);const Fs={};l&2&&(Fs.$$scope={dirty:l,ctx:s}),k.$set(Fs);const xs={};l&2&&(xs.$$scope={dirty:l,ctx:s}),U.$set(xs);const Is={};l&2&&(Is.$$scope={dirty:l,ctx:s}),J.$set(Is);const Ss={};l&2&&(Ss.$$scope={dirty:l,ctx:s}),v.$set(Ss)},i(s){$s||(f(c.$$.fragment,s),f(M.$$.fragment,s),f(T.$$.fragment,s),f(Z.$$.fragment,s),f(k.$$.fragment,s),f(U.$$.fragment,s),f(J.$$.fragment,s),f(v.$$.fragment,s),f(I.$$.fragment,s),f(G.$$.fragment,s),f(P.$$.fragment,s),$s=!0)},o(s){g(c.$$.fragment,s),g(M.$$.fragment,s),g(T.$$.fragment,s),g(Z.$$.fragment,s),g(k.$$.fragment,s),g(U.$$.fragment,s),g(J.$$.fragment,s),g(v.$$.fragment,s),g(I.$$.fragment,s),g(G.$$.fragment,s),g(P.$$.fragment,s),$s=!1},d(s){s&&(r(n),r(e),r(t),r(w),r(m),r(D),r(C),r(O),r(E),r(K),r(ss),r(Q),r(es),r(as),r(z),r(ns),r(ls),r(R),r(rs),r(ts),r(W),r(ps),r(F),r(ms),r(cs),r(x),r(os),r(hs),r(S),r(us),r(X),r(bs),r(is),r(V),r(js),r(L),r(fs),r(H),r(gs),r(Y),r(ds),r(ys),r(q)),r(a),d(c,s),d(M,s),d(T,s),d(Z,s),d(k,s),d(U,s),d(J,s),d(v,s),d(I,s),d(G,s),d(P,s)}}}const ie='{"title":"Benchmarks","local":"benchmarks","sections":[{"title":"How to benchmark 🤗 Transformers models","local":"how-to-benchmark--transformers-models","sections":[],"depth":2},{"title":"Benchmark best practices","local":"benchmark-best-practices","sections":[],"depth":2},{"title":"Sharing your benchmark","local":"sharing-your-benchmark","sections":[],"depth":2}],"depth":1}';function je(u){return Hs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Me extends Ys{constructor(a){super(),Ps(this,a,je,be,Ls,{})}}export{Me as component};
