import{s as Ls,o as Ps,n as B}from"../chunks/scheduler.889ebb13.js";import{S as Hs,i as As,g as $,s as h,r as o,A as Ds,h as d,f as p,c as u,j as Gs,u as j,x as T,k as Is,y as qs,a as t,v as i,d as f,t as g,w as y}from"../chunks/index.b9ddb21d.js";import{T as Ys}from"../chunks/Tip.ebe17e87.js";import{C as N}from"../chunks/CodeBlock.15ac7ec2.js";import{D as Os}from"../chunks/DocNotebookDropdown.a5a5f333.js";import{F as Ms,M as A}from"../chunks/Markdown.41f63184.js";import{H as _s}from"../chunks/Heading.77ad4fb6.js";function Ks(b){let n,e="Hugging Faceのベンチマークツールは非推奨であり、Transformerモデルの速度とメモリの複雑さを測定するために外部のベンチマークライブラリを使用することをお勧めします。";return{c(){n=$("p"),n.textContent=e},l(a){n=d(a,"P",{"data-svelte-h":!0}),T(n)!=="svelte-1sly4sf"&&(n.textContent=e)},m(a,r){t(a,n,r)},p:B,d(a){a&&p(n)}}}function sa(b){let n,e=`ここでの <em>推論</em> は、単一のフォワードパスによって定義され、 <em>トレーニング</em> は単一のフォワードパスと
バックワードパスによって定義されます。`;return{c(){n=$("p"),n.innerHTML=e},l(a){n=d(a,"P",{"data-svelte-h":!0}),T(n)!=="svelte-grjiom"&&(n.innerHTML=e)},m(a,r){t(a,n,r)},p:B,d(a){a&&p(n)}}}function aa(b){let n,e;return n=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFB5VG9yY2hCZW5jaG1hcmslMkMlMjBQeVRvcmNoQmVuY2htYXJrQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFB5VG9yY2hCZW5jaG1hcmtBcmd1bWVudHMobW9kZWxzJTNEJTVCJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIlNUQlMkMlMjBiYXRjaF9zaXplcyUzRCU1QjglNUQlMkMlMjBzZXF1ZW5jZV9sZW5ndGhzJTNEJTVCOCUyQyUyMDMyJTJDJTIwMTI4JTJDJTIwNTEyJTVEKSUwQWJlbmNobWFyayUyMCUzRCUyMFB5VG9yY2hCZW5jaG1hcmsoYXJncyk=",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;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(){o(n.$$.fragment)},l(a){j(n.$$.fragment,a)},m(a,r){i(n,a,r),e=!0},p:B,i(a){e||(f(n.$$.fragment,a),e=!0)},o(a){g(n.$$.fragment,a),e=!1},d(a){y(n,a)}}}function na(b){let n,e;return n=new A({props:{$$slots:{default:[aa]},$$scope:{ctx:b}}}),{c(){o(n.$$.fragment)},l(a){j(n.$$.fragment,a)},m(a,r){i(n,a,r),e=!0},p(a,r){const m={};r&2&&(m.$$scope={dirty:r,ctx:a}),n.$set(m)},i(a){e||(f(n.$$.fragment,a),e=!0)},o(a){g(n.$$.fragment,a),e=!1},d(a){y(n,a)}}}function ea(b){let n,e;return n=new N({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRlbnNvckZsb3dCZW5jaG1hcmslMkMlMjBUZW5zb3JGbG93QmVuY2htYXJrQXJndW1lbnRzJTBBJTBBYXJncyUyMCUzRCUyMFRlbnNvckZsb3dCZW5jaG1hcmtBcmd1bWVudHMoJTBBJTIwJTIwJTIwJTIwbW9kZWxzJTNEJTVCJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIlNUQlMkMlMjBiYXRjaF9zaXplcyUzRCU1QjglNUQlMkMlMjBzZXF1ZW5jZV9sZW5ndGhzJTNEJTVCOCUyQyUyMDMyJTJDJTIwMTI4JTJDJTIwNTEyJTVEJTBBKSUwQWJlbmNobWFyayUyMCUzRCUyMFRlbnNvckZsb3dCZW5jaG1hcmsoYXJncyk=",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;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(){o(n.$$.fragment)},l(a){j(n.$$.fragment,a)},m(a,r){i(n,a,r),e=!0},p:B,i(a){e||(f(n.$$.fragment,a),e=!0)},o(a){g(n.$$.fragment,a),e=!1},d(a){y(n,a)}}}function la(b){let n,e;return n=new A({props:{$$slots:{default:[ea]},$$scope:{ctx:b}}}),{c(){o(n.$$.fragment)},l(a){j(n.$$.fragment,a)},m(a,r){i(n,a,r),e=!0},p(a,r){const m={};r&2&&(m.$$scope={dirty:r,ctx:a}),n.$set(m)},i(a){e||(f(n.$$.fragment,a),e=!0)},o(a){g(n.$$.fragment,a),e=!1},d(a){y(n,a)}}}function pa(b){let n,e,a,r="インスタンス化されたベンチマークオブジェクトは、単に <code>benchmark.run()</code> を呼び出すことで実行できます。",m,_,w;return n=new N({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZweXRvcmNoJTJGYmVuY2htYXJraW5nJTJGcnVuX2JlbmNobWFyay5weSUyMC0taGVscA==",highlighted:'python examples/pytorch/benchmarking/run_benchmark.py --<span class="hljs-built_in">help</span>',wrap:!1}}),_=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                  
--------------------------------------------------------------------------------
bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">0.006</span>     
bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">0.006</span>     
bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">0.018</span>     
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 
--------------------------------------------------------------------------------
bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">1227</span>
bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">1281</span>
bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">1307</span>
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(){o(n.$$.fragment),e=h(),a=$("p"),a.innerHTML=r,m=h(),o(_.$$.fragment)},l(c){j(n.$$.fragment,c),e=u(c),a=d(c,"P",{"data-svelte-h":!0}),T(a)!=="svelte-103f2r4"&&(a.innerHTML=r),m=u(c),j(_.$$.fragment,c)},m(c,M){i(n,c,M),t(c,e,M),t(c,a,M),t(c,m,M),i(_,c,M),w=!0},p:B,i(c){w||(f(n.$$.fragment,c),f(_.$$.fragment,c),w=!0)},o(c){g(n.$$.fragment,c),g(_.$$.fragment,c),w=!1},d(c){c&&(p(e),p(a),p(m)),y(n,c),y(_,c)}}}function ra(b){let n,e;return n=new A({props:{$$slots:{default:[pa]},$$scope:{ctx:b}}}),{c(){o(n.$$.fragment)},l(a){j(n.$$.fragment,a)},m(a,r){i(n,a,r),e=!0},p(a,r){const m={};r&2&&(m.$$scope={dirty:r,ctx:a}),n.$set(m)},i(a){e||(f(n.$$.fragment,a),e=!0)},o(a){g(n.$$.fragment,a),e=!1},d(a){y(n,a)}}}function ta(b){let n,e,a,r="インスタンス化されたベンチマークオブジェクトは、単に <code>benchmark.run()</code> を呼び出すことで実行できます。",m,_,w;return n=new N({props:{code:"cHl0aG9uJTIwZXhhbXBsZXMlMkZ0ZW5zb3JmbG93JTJGYmVuY2htYXJraW5nJTJGcnVuX2JlbmNobWFya190Zi5weSUyMC0taGVscA==",highlighted:'python examples/tensorflow/benchmarking/run_benchmark_tf.py --<span class="hljs-built_in">help</span>',wrap:!1}}),_=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                  
--------------------------------------------------------------------------------
bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">0.005</span>
bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">0.008</span>
bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">0.022</span>
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 
--------------------------------------------------------------------------------
bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">8</span>             <span class="hljs-number">1330</span>
bert-base-uncased          <span class="hljs-number">8</span>               <span class="hljs-number">32</span>            <span class="hljs-number">1330</span>
bert-base-uncased          <span class="hljs-number">8</span>              <span class="hljs-number">128</span>            <span class="hljs-number">1330</span>
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(){o(n.$$.fragment),e=h(),a=$("p"),a.innerHTML=r,m=h(),o(_.$$.fragment)},l(c){j(n.$$.fragment,c),e=u(c),a=d(c,"P",{"data-svelte-h":!0}),T(a)!=="svelte-103f2r4"&&(a.innerHTML=r),m=u(c),j(_.$$.fragment,c)},m(c,M){i(n,c,M),t(c,e,M),t(c,a,M),t(c,m,M),i(_,c,M),w=!0},p:B,i(c){w||(f(n.$$.fragment,c),f(_.$$.fragment,c),w=!0)},o(c){g(n.$$.fragment,c),g(_.$$.fragment,c),w=!1},d(c){c&&(p(e),p(a),p(m)),y(n,c),y(_,c)}}}function ca(b){let n,e;return n=new A({props:{$$slots:{default:[ta]},$$scope:{ctx:b}}}),{c(){o(n.$$.fragment)},l(a){j(n.$$.fragment,a)},m(a,r){i(n,a,r),e=!0},p(a,r){const m={};r&2&&(m.$$scope={dirty:r,ctx:a}),n.$set(m)},i(a){e||(f(n.$$.fragment,a),e=!0)},o(a){g(n.$$.fragment,a),e=!1},d(a){y(n,a)}}}function ma(b){let n,e;return n=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(){o(n.$$.fragment)},l(a){j(n.$$.fragment,a)},m(a,r){i(n,a,r),e=!0},p:B,i(a){e||(f(n.$$.fragment,a),e=!0)},o(a){g(n.$$.fragment,a),e=!1},d(a){y(n,a)}}}function ha(b){let n,e;return n=new A({props:{$$slots:{default:[ma]},$$scope:{ctx:b}}}),{c(){o(n.$$.fragment)},l(a){j(n.$$.fragment,a)},m(a,r){i(n,a,r),e=!0},p(a,r){const m={};r&2&&(m.$$scope={dirty:r,ctx:a}),n.$set(m)},i(a){e||(f(n.$$.fragment,a),e=!0)},o(a){g(n.$$.fragment,a),e=!1},d(a){y(n,a)}}}function ua(b){let n,e;return n=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(){o(n.$$.fragment)},l(a){j(n.$$.fragment,a)},m(a,r){i(n,a,r),e=!0},p:B,i(a){e||(f(n.$$.fragment,a),e=!0)},o(a){g(n.$$.fragment,a),e=!1},d(a){y(n,a)}}}function ba(b){let n,e;return n=new A({props:{$$slots:{default:[ua]},$$scope:{ctx:b}}}),{c(){o(n.$$.fragment)},l(a){j(n.$$.fragment,a)},m(a,r){i(n,a,r),e=!0},p(a,r){const m={};r&2&&(m.$$scope={dirty:r,ctx:a}),n.$set(m)},i(a){e||(f(n.$$.fragment,a),e=!0)},o(a){g(n.$$.fragment,a),e=!1},d(a){y(n,a)}}}function oa(b){let n,e,a,r,m,_,w,c,M,q,Z,Ts="🤗 Transformersモデルをベンチマークし、ベストプラクティス、すでに利用可能なベンチマークについて見てみましょう。",O,v,ws='🤗 Transformersモデルをベンチマークする方法について詳しく説明したノートブックは<a href="https://github.com/huggingface/notebooks/tree/main/examples/benchmark.ipynb" rel="nofollow">こちら</a>で利用できます。',K,E,ss,Q,ks=`<code>PyTorchBenchmark</code>クラスと<code>TensorFlowBenchmark</code>クラスを使用すると、🤗 Transformersモデルを柔軟にベンチマークできます。
ベンチマーククラスを使用すると、<em>ピークメモリ使用量</em> および <em>必要な時間</em> を <em>推論</em> および <em>トレーニング</em> の両方について測定できます。`,as,k,ns,F,Us=`ベンチマーククラス<code>PyTorchBenchmark</code>と<code>TensorFlowBenchmark</code>は、それぞれのベンチマーククラスに対する適切な設定を含む <code>PyTorchBenchmarkArguments</code> および <code>TensorFlowBenchmarkArguments</code> タイプのオブジェクトを必要とします。
<code>PyTorchBenchmarkArguments</code> および <code>TensorFlowBenchmarkArguments</code> はデータクラスであり、それぞれのベンチマーククラスに対するすべての関連する設定を含んでいます。
次の例では、タイプ <em>bert-base-cased</em> のBERTモデルをベンチマークする方法が示されています。`,es,U,ls,W,Js=`ここでは、ベンチマーク引数のデータクラスに対して、<code>models</code>、<code>batch_sizes</code>
および<code>sequence_lengths</code>の3つの引数が指定されています。引数<code>models</code>は必須で、
<a href="https://huggingface.co/models" rel="nofollow">モデルハブ</a>からのモデル識別子の<code>リスト</code>を期待し
ます。<code>batch_sizes</code>と<code>sequence_lengths</code>の2つの<code>リスト</code>引数は
モデルのベンチマーク対象となる<code>input_ids</code>のサイズを定義します。
ベンチマーク引数データクラスを介して設定できる他の多くのパラメータがあります。これらの詳細については、直接ファイル
<code>src/transformers/benchmark/benchmark_args_utils.py</code>、
<code>src/transformers/benchmark/benchmark_args.py</code>（PyTorch用）、および<code>src/transformers/benchmark/benchmark_args_tf.py</code>（Tensorflow用）
を参照するか、次のシェルコマンドをルートから実行すると、PyTorchとTensorflowのそれぞれに対して設定可能なすべてのパラメータの記述的なリストが表示されます。`,ps,J,rs,z,Cs=`デフォルトでは、<em>推論時間</em> と <em>必要なメモリ</em> がベンチマークされます。
上記の例の出力では、最初の2つのセクションが <em>推論時間</em> と <em>推論メモリ</em>
に対応する結果を示しています。さらに、計算環境に関するすべての関連情報、
例えば GPU タイプ、システム、ライブラリのバージョンなどが、<em>ENVIRONMENT INFORMATION</em> の下に表示されます。この情報は、<code>PyTorchBenchmarkArguments</code>
および <code>TensorFlowBenchmarkArguments</code> に引数 <code>save_to_csv=True</code>
を追加することで、オプションで <em>.csv</em> ファイルに保存することができます。この場合、各セクションは別々の <em>.csv</em> ファイルに保存されます。<em>.csv</em>
ファイルへのパスは、データクラスの引数を使用してオプションで定義できます。`,ts,R,Ns="モデル識別子、例えば <code>bert-base-uncased</code> を使用して事前学習済みモデルをベンチマークする代わりに、利用可能な任意のモデルクラスの任意の設定をベンチマークすることもできます。この場合、ベンチマーク引数と共に設定の <code>list</code> を挿入する必要があります。",cs,C,ms,S,Bs="カスタマイズされたBertModelクラスの構成に対する推論時間と必要なメモリのベンチマーク",hs,X,Zs="この機能は、モデルをトレーニングする際にどの構成を選択すべきかを決定する際に特に役立つことがあります。",us,V,bs,x,vs="このセクションでは、モデルをベンチマークする際に注意すべきいくつかのベストプラクティスをリストアップしています。",os,G,Es=`<li>現在、単一デバイスのベンチマークしかサポートされていません。GPUでベンチマークを実行する場合、コードを実行するデバイスをユーザーが指定することを推奨します。
これはシェルで<code>CUDA_VISIBLE_DEVICES</code>環境変数を設定することで行えます。例：<code>export CUDA_VISIBLE_DEVICES=0</code>を実行してからコードを実行します。</li> <li><code>no_multi_processing</code>オプションは、テストおよびデバッグ用にのみ<code>True</code>に設定すべきです。正確なメモリ計測を確保するために、各メモリベンチマークを別々のプロセスで実行することをお勧めします。これにより、<code>no_multi_processing</code>が<code>True</code>に設定されます。</li> <li>モデルのベンチマーク結果を共有する際には、常に環境情報を記述するべきです。異なるGPUデバイス、ライブラリバージョンなどでベンチマーク結果が大きく異なる可能性があるため、ベンチマーク結果単体ではコミュニティにとってあまり有用ではありません。</li>`,js,I,is,Y,Qs="以前、すべての利用可能なコアモデル（当時10モデル）に対して、多くの異なる設定で推論時間のベンチマークが行われました：PyTorchを使用し、TorchScriptの有無、TensorFlowを使用し、XLAの有無などです。これらのテストはすべてCPUで行われました（TensorFlow XLAを除く）。",fs,L,Fs='このアプローチの詳細については、<a href="https://medium.com/huggingface/benchmarking-transformers-pytorch-and-tensorflow-e2917fb891c2" rel="nofollow">次のブログポスト</a>に詳しく説明されており、結果は<a href="https://docs.google.com/spreadsheets/d/1sryqufw2D0XlUH4sq3e9Wnxu5EAQkaohzrJbd5HdQ_w/edit?usp=sharing" rel="nofollow">こちら</a>で利用できます。',gs,P,Ws="新しいベンチマークツールを使用すると、コミュニティとベンチマーク結果を共有することがこれまで以上に簡単になります。",ys,H,zs='<li><a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/benchmarking/README.md" rel="nofollow">PyTorchベンチマーク結果</a>。</li> <li><a href="https://github.com/huggingface/transformers/tree/main/examples/tensorflow/benchmarking/README.md" rel="nofollow">TensorFlowベンチマーク結果</a>。</li>',$s,D,ds;return m=new _s({props:{title:"Benchmarks",local:"benchmarks",headingTag:"h1"}}),w=new Ys({props:{warning:!0,$$slots:{default:[Ks]},$$scope:{ctx:b}}}),M=new Os({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/ja/benchmarks.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ja/pytorch/benchmarks.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ja/tensorflow/benchmarks.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ja/benchmarks.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ja/pytorch/benchmarks.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ja/tensorflow/benchmarks.ipynb"}]}}),E=new _s({props:{title:"How to benchmark 🤗 Transformers models",local:"how-to-benchmark--transformers-models",headingTag:"h2"}}),k=new Ys({props:{$$slots:{default:[sa]},$$scope:{ctx:b}}}),U=new Ms({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[la],pytorch:[na]},$$scope:{ctx:b}}}),J=new Ms({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ca],pytorch:[ra]},$$scope:{ctx:b}}}),C=new Ms({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ba],pytorch:[ha]},$$scope:{ctx:b}}}),V=new _s({props:{title:"Benchmark best practices",local:"benchmark-best-practices",headingTag:"h2"}}),I=new _s({props:{title:"Sharing your benchmark",local:"sharing-your-benchmark",headingTag:"h2"}}),{c(){n=$("meta"),e=h(),a=$("p"),r=h(),o(m.$$.fragment),_=h(),o(w.$$.fragment),c=h(),o(M.$$.fragment),q=h(),Z=$("p"),Z.textContent=Ts,O=h(),v=$("p"),v.innerHTML=ws,K=h(),o(E.$$.fragment),ss=h(),Q=$("p"),Q.innerHTML=ks,as=h(),o(k.$$.fragment),ns=h(),F=$("p"),F.innerHTML=Us,es=h(),o(U.$$.fragment),ls=h(),W=$("p"),W.innerHTML=Js,ps=h(),o(J.$$.fragment),rs=h(),z=$("p"),z.innerHTML=Cs,ts=h(),R=$("p"),R.innerHTML=Ns,cs=h(),o(C.$$.fragment),ms=h(),S=$("p"),S.textContent=Bs,hs=h(),X=$("p"),X.textContent=Zs,us=h(),o(V.$$.fragment),bs=h(),x=$("p"),x.textContent=vs,os=h(),G=$("ul"),G.innerHTML=Es,js=h(),o(I.$$.fragment),is=h(),Y=$("p"),Y.textContent=Qs,fs=h(),L=$("p"),L.innerHTML=Fs,gs=h(),P=$("p"),P.textContent=Ws,ys=h(),H=$("ul"),H.innerHTML=zs,$s=h(),D=$("p"),this.h()},l(s){const l=Ds("svelte-u9bgzb",document.head);n=d(l,"META",{name:!0,content:!0}),l.forEach(p),e=u(s),a=d(s,"P",{}),Gs(a).forEach(p),r=u(s),j(m.$$.fragment,s),_=u(s),j(w.$$.fragment,s),c=u(s),j(M.$$.fragment,s),q=u(s),Z=d(s,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-88l8pk"&&(Z.textContent=Ts),O=u(s),v=d(s,"P",{"data-svelte-h":!0}),T(v)!=="svelte-fh9elv"&&(v.innerHTML=ws),K=u(s),j(E.$$.fragment,s),ss=u(s),Q=d(s,"P",{"data-svelte-h":!0}),T(Q)!=="svelte-13heyvu"&&(Q.innerHTML=ks),as=u(s),j(k.$$.fragment,s),ns=u(s),F=d(s,"P",{"data-svelte-h":!0}),T(F)!=="svelte-yazwkg"&&(F.innerHTML=Us),es=u(s),j(U.$$.fragment,s),ls=u(s),W=d(s,"P",{"data-svelte-h":!0}),T(W)!=="svelte-avjjfe"&&(W.innerHTML=Js),ps=u(s),j(J.$$.fragment,s),rs=u(s),z=d(s,"P",{"data-svelte-h":!0}),T(z)!=="svelte-15apes9"&&(z.innerHTML=Cs),ts=u(s),R=d(s,"P",{"data-svelte-h":!0}),T(R)!=="svelte-8vruab"&&(R.innerHTML=Ns),cs=u(s),j(C.$$.fragment,s),ms=u(s),S=d(s,"P",{"data-svelte-h":!0}),T(S)!=="svelte-1xjvi7s"&&(S.textContent=Bs),hs=u(s),X=d(s,"P",{"data-svelte-h":!0}),T(X)!=="svelte-19wa5rt"&&(X.textContent=Zs),us=u(s),j(V.$$.fragment,s),bs=u(s),x=d(s,"P",{"data-svelte-h":!0}),T(x)!=="svelte-mguz8l"&&(x.textContent=vs),os=u(s),G=d(s,"UL",{"data-svelte-h":!0}),T(G)!=="svelte-16nnrpj"&&(G.innerHTML=Es),js=u(s),j(I.$$.fragment,s),is=u(s),Y=d(s,"P",{"data-svelte-h":!0}),T(Y)!=="svelte-hnjc8r"&&(Y.textContent=Qs),fs=u(s),L=d(s,"P",{"data-svelte-h":!0}),T(L)!=="svelte-kio2c8"&&(L.innerHTML=Fs),gs=u(s),P=d(s,"P",{"data-svelte-h":!0}),T(P)!=="svelte-1hmt9mr"&&(P.textContent=Ws),ys=u(s),H=d(s,"UL",{"data-svelte-h":!0}),T(H)!=="svelte-1itkghy"&&(H.innerHTML=zs),$s=u(s),D=d(s,"P",{}),Gs(D).forEach(p),this.h()},h(){Is(n,"name","hf:doc:metadata"),Is(n,"content",ja)},m(s,l){qs(document.head,n),t(s,e,l),t(s,a,l),t(s,r,l),i(m,s,l),t(s,_,l),i(w,s,l),t(s,c,l),i(M,s,l),t(s,q,l),t(s,Z,l),t(s,O,l),t(s,v,l),t(s,K,l),i(E,s,l),t(s,ss,l),t(s,Q,l),t(s,as,l),i(k,s,l),t(s,ns,l),t(s,F,l),t(s,es,l),i(U,s,l),t(s,ls,l),t(s,W,l),t(s,ps,l),i(J,s,l),t(s,rs,l),t(s,z,l),t(s,ts,l),t(s,R,l),t(s,cs,l),i(C,s,l),t(s,ms,l),t(s,S,l),t(s,hs,l),t(s,X,l),t(s,us,l),i(V,s,l),t(s,bs,l),t(s,x,l),t(s,os,l),t(s,G,l),t(s,js,l),i(I,s,l),t(s,is,l),t(s,Y,l),t(s,fs,l),t(s,L,l),t(s,gs,l),t(s,P,l),t(s,ys,l),t(s,H,l),t(s,$s,l),t(s,D,l),ds=!0},p(s,[l]){const Rs={};l&2&&(Rs.$$scope={dirty:l,ctx:s}),w.$set(Rs);const Ss={};l&2&&(Ss.$$scope={dirty:l,ctx:s}),k.$set(Ss);const Xs={};l&2&&(Xs.$$scope={dirty:l,ctx:s}),U.$set(Xs);const Vs={};l&2&&(Vs.$$scope={dirty:l,ctx:s}),J.$set(Vs);const xs={};l&2&&(xs.$$scope={dirty:l,ctx:s}),C.$set(xs)},i(s){ds||(f(m.$$.fragment,s),f(w.$$.fragment,s),f(M.$$.fragment,s),f(E.$$.fragment,s),f(k.$$.fragment,s),f(U.$$.fragment,s),f(J.$$.fragment,s),f(C.$$.fragment,s),f(V.$$.fragment,s),f(I.$$.fragment,s),ds=!0)},o(s){g(m.$$.fragment,s),g(w.$$.fragment,s),g(M.$$.fragment,s),g(E.$$.fragment,s),g(k.$$.fragment,s),g(U.$$.fragment,s),g(J.$$.fragment,s),g(C.$$.fragment,s),g(V.$$.fragment,s),g(I.$$.fragment,s),ds=!1},d(s){s&&(p(e),p(a),p(r),p(_),p(c),p(q),p(Z),p(O),p(v),p(K),p(ss),p(Q),p(as),p(ns),p(F),p(es),p(ls),p(W),p(ps),p(rs),p(z),p(ts),p(R),p(cs),p(ms),p(S),p(hs),p(X),p(us),p(bs),p(x),p(os),p(G),p(js),p(is),p(Y),p(fs),p(L),p(gs),p(P),p(ys),p(H),p($s),p(D)),p(n),y(m,s),y(w,s),y(M,s),y(E,s),y(k,s),y(U,s),y(J,s),y(C,s),y(V,s),y(I,s)}}}const ja='{"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 ia(b){return Ps(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ta extends Hs{constructor(n){super(),As(this,n,ia,oa,Ls,{})}}export{Ta as component};
