import{S as zo,i as Bo,s as Io,e as n,k as p,w as y,t as l,M as Wo,c as r,d as o,m as h,a,x as b,h as c,b as i,G as t,g as m,y as M,q as w,o as j,B as $,v as Fo,L as xo}from"../../chunks/vendor-hf-doc-builder.js";import{T as Po}from"../../chunks/Tip-hf-doc-builder.js";import{D as Be}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ao}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ie}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as No}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function So(z){let f,v,g,u,T;return u=new Ao({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERlY2lzaW9uVHJhbnNmb3JtZXJDb25maWclMkMlMjBEZWNpc2lvblRyYW5zZm9ybWVyTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwRGVjaXNpb25UcmFuc2Zvcm1lciUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwRGVjaXNpb25UcmFuc2Zvcm1lckNvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBEZWNpc2lvblRyYW5zZm9ybWVyTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DecisionTransformerConfig, DecisionTransformerModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a DecisionTransformer configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = DecisionTransformerConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = DecisionTransformerModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){f=n("p"),v=l("Example:"),g=p(),y(u.$$.fragment)},l(s){f=r(s,"P",{});var _=a(f);v=c(_,"Example:"),_.forEach(o),g=h(s),b(u.$$.fragment,s)},m(s,_){m(s,f,_),t(f,v),m(s,g,_),M(u,s,_),T=!0},p:xo,i(s){T||(w(u.$$.fragment,s),T=!0)},o(s){j(u.$$.fragment,s),T=!1},d(s){s&&o(f),s&&o(g),$(u,s)}}}function Vo(z){let f,v,g,u,T;return{c(){f=n("p"),v=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),g=n("code"),u=l("Module"),T=l(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(s){f=r(s,"P",{});var _=a(f);v=c(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),g=r(_,"CODE",{});var B=a(g);u=c(B,"Module"),B.forEach(o),T=c(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(o)},m(s,_){m(s,f,_),t(f,v),t(f,g),t(g,u),t(f,T)},d(s){s&&o(f)}}}function Lo(z){let f,v,g,u,T;return u=new Ao({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERlY2lzaW9uVHJhbnNmb3JtZXJNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBbW9kZWwlMjAlM0QlMjBEZWNpc2lvblRyYW5zZm9ybWVyTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmVkYmVlY2hpbmclMkZkZWNpc2lvbi10cmFuc2Zvcm1lci1neW0taG9wcGVyLW1lZGl1bSUyMiklMEElMjMlMjBldmFsdWF0aW9uJTBBbW9kZWwlMjAlM0QlMjBtb2RlbC50byhkZXZpY2UpJTBBbW9kZWwuZXZhbCgpJTBBJTBBZW52JTIwJTNEJTIwZ3ltLm1ha2UoJTIySG9wcGVyLXYzJTIyKSUwQXN0YXRlX2RpbSUyMCUzRCUyMGVudi5vYnNlcnZhdGlvbl9zcGFjZS5zaGFwZSU1QjAlNUQlMEFhY3RfZGltJTIwJTNEJTIwZW52LmFjdGlvbl9zcGFjZS5zaGFwZSU1QjAlNUQlMEElMEFzdGF0ZSUyMCUzRCUyMGVudi5yZXNldCgpJTBBc3RhdGVzJTIwJTNEJTIwdG9yY2guZnJvbV9udW1weShzdGF0ZSkucmVzaGFwZSgxJTJDJTIwMSUyQyUyMHN0YXRlX2RpbSkudG8oZGV2aWNlJTNEZGV2aWNlJTJDJTIwZHR5cGUlM0R0b3JjaC5mbG9hdDMyKSUwQWFjdGlvbnMlMjAlM0QlMjB0b3JjaC56ZXJvcygoMSUyQyUyMDElMkMlMjBhY3RfZGltKSUyQyUyMGRldmljZSUzRGRldmljZSUyQyUyMGR0eXBlJTNEdG9yY2guZmxvYXQzMiklMEFyZXdhcmRzJTIwJTNEJTIwdG9yY2guemVyb3MoMSUyQyUyMDElMkMlMjBkZXZpY2UlM0RkZXZpY2UlMkMlMjBkdHlwZSUzRHRvcmNoLmZsb2F0MzIpJTBBdGFyZ2V0X3JldHVybiUyMCUzRCUyMHRvcmNoLnRlbnNvcihUQVJHRVRfUkVUVVJOJTJDJTIwZHR5cGUlM0R0b3JjaC5mbG9hdDMyKS5yZXNoYXBlKDElMkMlMjAxKSUwQXRpbWVzdGVwcyUyMCUzRCUyMHRvcmNoLnRlbnNvcigwJTJDJTIwZGV2aWNlJTNEZGV2aWNlJTJDJTIwZHR5cGUlM0R0b3JjaC5sb25nKS5yZXNoYXBlKDElMkMlMjAxKSUwQWF0dGVudGlvbl9tYXNrJTIwJTNEJTIwdG9yY2guemVyb3MoMSUyQyUyMDElMkMlMjBkZXZpY2UlM0RkZXZpY2UlMkMlMjBkdHlwZSUzRHRvcmNoLmZsb2F0MzIpJTBBJTBBJTIzJTIwZm9yd2FyZCUyMHBhc3MlMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwc3RhdGVfcHJlZHMlMkMlMjBhY3Rpb25fcHJlZHMlMkMlMjByZXR1cm5fcHJlZHMlMjAlM0QlMjBtb2RlbCglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBzdGF0ZXMlM0RzdGF0ZXMlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBhY3Rpb25zJTNEYWN0aW9ucyUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJld2FyZHMlM0RyZXdhcmRzJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuc190b19nbyUzRHRhcmdldF9yZXR1cm4lMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjB0aW1lc3RlcHMlM0R0aW1lc3RlcHMlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBhdHRlbnRpb25fbWFzayUzRGF0dGVudGlvbl9tYXNrJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcmV0dXJuX2RpY3QlM0RGYWxzZSUyQyUwQSUyMCUyMCUyMCUyMCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DecisionTransformerModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>model = DecisionTransformerModel.from_pretrained(<span class="hljs-string">&quot;edbeeching/decision-transformer-gym-hopper-medium&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># evaluation</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = model.to(device)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.<span class="hljs-built_in">eval</span>()

<span class="hljs-meta">&gt;&gt;&gt; </span>env = gym.make(<span class="hljs-string">&quot;Hopper-v3&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>state_dim = env.observation_space.shape[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>act_dim = env.action_space.shape[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>state = env.reset()
<span class="hljs-meta">&gt;&gt;&gt; </span>states = torch.from_numpy(state).reshape(<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, state_dim).to(device=device, dtype=torch.float32)
<span class="hljs-meta">&gt;&gt;&gt; </span>actions = torch.zeros((<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, act_dim), device=device, dtype=torch.float32)
<span class="hljs-meta">&gt;&gt;&gt; </span>rewards = torch.zeros(<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, device=device, dtype=torch.float32)
<span class="hljs-meta">&gt;&gt;&gt; </span>target_return = torch.tensor(TARGET_RETURN, dtype=torch.float32).reshape(<span class="hljs-number">1</span>, <span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>timesteps = torch.tensor(<span class="hljs-number">0</span>, device=device, dtype=torch.long).reshape(<span class="hljs-number">1</span>, <span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>attention_mask = torch.zeros(<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, device=device, dtype=torch.float32)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    state_preds, action_preds, return_preds = model(
<span class="hljs-meta">... </span>        states=states,
<span class="hljs-meta">... </span>        actions=actions,
<span class="hljs-meta">... </span>        rewards=rewards,
<span class="hljs-meta">... </span>        returns_to_go=target_return,
<span class="hljs-meta">... </span>        timesteps=timesteps,
<span class="hljs-meta">... </span>        attention_mask=attention_mask,
<span class="hljs-meta">... </span>        return_dict=<span class="hljs-literal">False</span>,
<span class="hljs-meta">... </span>    )`}}),{c(){f=n("p"),v=l("Examples:"),g=p(),y(u.$$.fragment)},l(s){f=r(s,"P",{});var _=a(f);v=c(_,"Examples:"),_.forEach(o),g=h(s),b(u.$$.fragment,s)},m(s,_){m(s,f,_),t(f,v),m(s,g,_),M(u,s,_),T=!0},p:xo,i(s){T||(w(u.$$.fragment,s),T=!0)},o(s){j(u.$$.fragment,s),T=!1},d(s){s&&o(f),s&&o(g),$(u,s)}}}function Xo(z){let f,v,g,u,T,s,_,B,lt,We,R,I,De,q,ct,Je,dt,Fe,Z,mt,Q,ft,pt,ht,Pe,pe,ut,Se,he,Ee,gt,Ve,ue,_t,Le,ge,Tt,Xe,k,vt,O,yt,bt,K,Mt,wt,Ye,U,W,ke,ee,jt,Re,$t,He,D,te,Dt,oe,Jt,_e,Et,kt,Rt,C,Zt,Te,Ut,Ct,ve,Gt,Nt,xt,F,qe,G,P,Ze,ne,At,Ue,zt,Qe,N,re,Bt,ye,ae,Oe,x,S,Ce,se,It,Ge,Wt,Ke,J,ie,Ft,le,Pt,ce,St,Vt,Lt,be,Xt,de,Yt,Ht,E,me,qt,A,Qt,Me,Ot,Kt,Ne,eo,to,oo,V,no,L,et;return s=new Ie({}),q=new Ie({}),ee=new Ie({}),te=new Be({props:{name:"class transformers.DecisionTransformerConfig",anchor:"transformers.DecisionTransformerConfig",parameters:[{name:"state_dim",val:" = 17"},{name:"act_dim",val:" = 4"},{name:"hidden_size",val:" = 128"},{name:"max_ep_len",val:" = 4096"},{name:"action_tanh",val:" = True"},{name:"vocab_size",val:" = 1"},{name:"n_positions",val:" = 1024"},{name:"n_layer",val:" = 3"},{name:"n_head",val:" = 1"},{name:"n_inner",val:" = None"},{name:"activation_function",val:" = 'relu'"},{name:"resid_pdrop",val:" = 0.1"},{name:"embd_pdrop",val:" = 0.1"},{name:"attn_pdrop",val:" = 0.1"},{name:"layer_norm_epsilon",val:" = 1e-05"},{name:"initializer_range",val:" = 0.02"},{name:"scale_attn_weights",val:" = True"},{name:"use_cache",val:" = True"},{name:"bos_token_id",val:" = 50256"},{name:"eos_token_id",val:" = 50256"},{name:"scale_attn_by_inverse_layer_idx",val:" = False"},{name:"reorder_and_upcast_attn",val:" = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.DecisionTransformerConfig.state_dim",description:`<strong>state_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 17) &#x2014;
The state size for the RL environment`,name:"state_dim"},{anchor:"transformers.DecisionTransformerConfig.act_dim",description:`<strong>act_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The size of the output action space`,name:"act_dim"},{anchor:"transformers.DecisionTransformerConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
The size of the hidden layers`,name:"hidden_size"},{anchor:"transformers.DecisionTransformerConfig.max_ep_len",description:`<strong>max_ep_len</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
The maximum length of an episode in the environment`,name:"max_ep_len"},{anchor:"transformers.DecisionTransformerConfig.action_tanh",description:`<strong>action_tanh</strong> (<code>bool</code>, <em>optional</em>, defaults to True) &#x2014;
Whether to use a tanh activation on action prediction`,name:"action_tanh"},{anchor:"transformers.DecisionTransformerConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50257) &#x2014;
Vocabulary size of the GPT-2 model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/decision_transformer#transformers.DecisionTransformerModel">DecisionTransformerModel</a>.`,name:"vocab_size"},{anchor:"transformers.DecisionTransformerConfig.n_positions",description:`<strong>n_positions</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"n_positions"},{anchor:"transformers.DecisionTransformerConfig.n_layer",description:`<strong>n_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layer"},{anchor:"transformers.DecisionTransformerConfig.n_head",description:`<strong>n_head</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_head"},{anchor:"transformers.DecisionTransformerConfig.n_inner",description:`<strong>n_inner</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Dimensionality of the inner feed-forward layers. If unset, will default to 4 times <code>n_embd</code>.`,name:"n_inner"},{anchor:"transformers.DecisionTransformerConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
Activation function, to be selected in the list <code>[&quot;relu&quot;, &quot;silu&quot;, &quot;gelu&quot;, &quot;tanh&quot;, &quot;gelu_new&quot;]</code>.`,name:"activation_function"},{anchor:"transformers.DecisionTransformerConfig.resid_pdrop",description:`<strong>resid_pdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"resid_pdrop"},{anchor:"transformers.DecisionTransformerConfig.embd_pdrop",description:`<strong>embd_pdrop</strong> (<code>int</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the embeddings.`,name:"embd_pdrop"},{anchor:"transformers.DecisionTransformerConfig.attn_pdrop",description:`<strong>attn_pdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention.`,name:"attn_pdrop"},{anchor:"transformers.DecisionTransformerConfig.layer_norm_epsilon",description:`<strong>layer_norm_epsilon</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon to use in the layer normalization layers.`,name:"layer_norm_epsilon"},{anchor:"transformers.DecisionTransformerConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.DecisionTransformerConfig.scale_attn_weights",description:`<strong>scale_attn_weights</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Scale attention weights by dividing by sqrt(hidden_size)..`,name:"scale_attn_weights"},{anchor:"transformers.DecisionTransformerConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"},{anchor:"transformers.DecisionTransformerConfig.scale_attn_by_inverse_layer_idx",description:`<strong>scale_attn_by_inverse_layer_idx</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to additionally scale attention weights by <code>1 / layer_idx + 1</code>.`,name:"scale_attn_by_inverse_layer_idx"},{anchor:"transformers.DecisionTransformerConfig.reorder_and_upcast_attn",description:`<strong>reorder_and_upcast_attn</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to scale keys (K) prior to computing attention (dot-product) and upcast attention
dot-product/softmax to float() when training with mixed precision.`,name:"reorder_and_upcast_attn"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/decision_transformer/configuration_decision_transformer.py#L31"}}),F=new No({props:{anchor:"transformers.DecisionTransformerConfig.example",$$slots:{default:[So]},$$scope:{ctx:z}}}),ne=new Ie({}),re=new Be({props:{name:"class transformers.DecisionTransformerGPT2Model",anchor:"transformers.DecisionTransformerGPT2Model",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/decision_transformer/modeling_decision_transformer.py#L477"}}),ae=new Be({props:{name:"forward",anchor:"transformers.DecisionTransformerGPT2Model.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/decision_transformer/modeling_decision_transformer.py#L507"}}),se=new Ie({}),ie=new Be({props:{name:"class transformers.DecisionTransformerModel",anchor:"transformers.DecisionTransformerModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.DecisionTransformerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/decision_transformer#transformers.DecisionTransformerConfig">~DecisionTransformerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/decision_transformer/modeling_decision_transformer.py#L796"}}),me=new Be({props:{name:"forward",anchor:"transformers.DecisionTransformerModel.forward",parameters:[{name:"states",val:" = None"},{name:"actions",val:" = None"},{name:"rewards",val:" = None"},{name:"returns_to_go",val:" = None"},{name:"timesteps",val:" = None"},{name:"attention_mask",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"output_attentions",val:" = None"},{name:"return_dict",val:" = None"}],parametersDescription:[{anchor:"transformers.DecisionTransformerModel.forward.states",description:`<strong>states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, episode_length, state_dim)</code>) &#x2014;
The states for each step in the trajectory`,name:"states"},{anchor:"transformers.DecisionTransformerModel.forward.actions",description:`<strong>actions</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, episode_length, act_dim)</code>) &#x2014;
The actions taken by the &#x201C;expert&#x201D; policy for the current state, these are masked for auto regressive
prediction`,name:"actions"},{anchor:"transformers.DecisionTransformerModel.forward.rewards",description:`<strong>rewards</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, episode_length, 1)</code>) &#x2014;
The rewards for each state, action`,name:"rewards"},{anchor:"transformers.DecisionTransformerModel.forward.returns_to_go",description:`<strong>returns_to_go</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, episode_length, 1)</code>) &#x2014;
The returns for each state in the trajectory`,name:"returns_to_go"},{anchor:"transformers.DecisionTransformerModel.forward.timesteps",description:`<strong>timesteps</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, episode_length)</code>) &#x2014;
The timestep for each step in the trajectory`,name:"timesteps"},{anchor:"transformers.DecisionTransformerModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, episode_length)</code>) &#x2014;
Masking, used to mask the actions when performing autoregressive prediction`,name:"attention_mask"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/decision_transformer/modeling_decision_transformer.py#L829",returnDescription:`
<p>A <code>transformers.models.decision_transformer.modeling_decision_transformer.DecisionTransformerOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/decision_transformer#transformers.DecisionTransformerConfig"
>DecisionTransformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>state_preds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, state_dim)</code>) \u2014 Environment state predictions</p>
</li>
<li>
<p><strong>action_preds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, action_dim)</code>) \u2014 Model action predictions</p>
</li>
<li>
<p><strong>return_preds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, 1)</code>) \u2014 Predicted returns for each state</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.decision_transformer.modeling_decision_transformer.DecisionTransformerOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),V=new Po({props:{$$slots:{default:[Vo]},$$scope:{ctx:z}}}),L=new No({props:{anchor:"transformers.DecisionTransformerModel.forward.example",$$slots:{default:[Lo]},$$scope:{ctx:z}}}),{c(){f=n("meta"),v=p(),g=n("h1"),u=n("a"),T=n("span"),y(s.$$.fragment),_=p(),B=n("span"),lt=l("Decision Transformer"),We=p(),R=n("h2"),I=n("a"),De=n("span"),y(q.$$.fragment),ct=p(),Je=n("span"),dt=l("Overview"),Fe=p(),Z=n("p"),mt=l("The Decision Transformer model was proposed in "),Q=n("a"),ft=l("Decision Transformer: Reinforcement Learning via Sequence Modeling"),pt=n("br"),ht=l(`
by Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Michael Laskin, Pieter Abbeel, Aravind Srinivas, Igor Mordatch.`),Pe=p(),pe=n("p"),ut=l("The abstract from the paper is the following:"),Se=p(),he=n("p"),Ee=n("em"),gt=l(`We introduce a framework that abstracts Reinforcement Learning (RL) as a sequence modeling problem.
This allows us to draw upon the simplicity and scalability of the Transformer architecture, and associated advances
in language modeling such as GPT-x and BERT. In particular, we present Decision Transformer, an architecture that
casts the problem of RL as conditional sequence modeling. Unlike prior approaches to RL that fit value functions or
compute policy gradients, Decision Transformer simply outputs the optimal actions by leveraging a causally masked
Transformer. By conditioning an autoregressive model on the desired return (reward), past states, and actions, our
Decision Transformer model can generate future actions that achieve the desired return. Despite its simplicity,
Decision Transformer matches or exceeds the performance of state-of-the-art model-free offline RL baselines on
Atari, OpenAI Gym, and Key-to-Door tasks.`),Ve=p(),ue=n("p"),_t=l("Tips:"),Le=p(),ge=n("p"),Tt=l("This version of the model is for tasks where the state is a vector, image-based states will come soon."),Xe=p(),k=n("p"),vt=l("This model was contributed by "),O=n("a"),yt=l("edbeeching"),bt=l(". The original code can be found "),K=n("a"),Mt=l("here"),wt=l("."),Ye=p(),U=n("h2"),W=n("a"),ke=n("span"),y(ee.$$.fragment),jt=p(),Re=n("span"),$t=l("DecisionTransformerConfig"),He=p(),D=n("div"),y(te.$$.fragment),Dt=p(),oe=n("p"),Jt=l("This is the configuration class to store the configuration of a "),_e=n("a"),Et=l("DecisionTransformerModel"),kt=l(`. It is used to
instantiate a Decision Transformer model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the standard
DecisionTransformer architecture. Many of the config options are used to instatiate the GPT2 model that is used as
part of the architecture.`),Rt=p(),C=n("p"),Zt=l("Configuration objects inherit from "),Te=n("a"),Ut=l("PretrainedConfig"),Ct=l(` and can be used to control the model outputs. Read the
documentation from `),ve=n("a"),Gt=l("PretrainedConfig"),Nt=l(" for more information."),xt=p(),y(F.$$.fragment),qe=p(),G=n("h2"),P=n("a"),Ze=n("span"),y(ne.$$.fragment),At=p(),Ue=n("span"),zt=l("DecisionTransformerGPT2Model"),Qe=p(),N=n("div"),y(re.$$.fragment),Bt=p(),ye=n("div"),y(ae.$$.fragment),Oe=p(),x=n("h2"),S=n("a"),Ce=n("span"),y(se.$$.fragment),It=p(),Ge=n("span"),Wt=l("DecisionTransformerModel"),Ke=p(),J=n("div"),y(ie.$$.fragment),Ft=p(),le=n("p"),Pt=l(`The Decision Transformer Model
This model is a PyTorch `),ce=n("a"),St=l("torch.nn.Module"),Vt=l(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Lt=p(),be=n("p"),Xt=l(`The model builds upon the GPT2 architecture to perform autoregressive prediction of actions in an offline RL
setting. Refer to the paper for more details: `),de=n("a"),Yt=l("https://arxiv.org/abs/2106.01345"),Ht=p(),E=n("div"),y(me.$$.fragment),qt=p(),A=n("p"),Qt=l("The "),Me=n("a"),Ot=l("DecisionTransformerModel"),Kt=l(" forward method, overrides the "),Ne=n("code"),eo=l("__call__"),to=l(" special method."),oo=p(),y(V.$$.fragment),no=p(),y(L.$$.fragment),this.h()},l(e){const d=Wo('[data-svelte="svelte-1phssyn"]',document.head);f=r(d,"META",{name:!0,content:!0}),d.forEach(o),v=h(e),g=r(e,"H1",{class:!0});var fe=a(g);u=r(fe,"A",{id:!0,class:!0,href:!0});var xe=a(u);T=r(xe,"SPAN",{});var Ae=a(T);b(s.$$.fragment,Ae),Ae.forEach(o),xe.forEach(o),_=h(fe),B=r(fe,"SPAN",{});var ao=a(B);lt=c(ao,"Decision Transformer"),ao.forEach(o),fe.forEach(o),We=h(e),R=r(e,"H2",{class:!0});var tt=a(R);I=r(tt,"A",{id:!0,class:!0,href:!0});var so=a(I);De=r(so,"SPAN",{});var io=a(De);b(q.$$.fragment,io),io.forEach(o),so.forEach(o),ct=h(tt),Je=r(tt,"SPAN",{});var lo=a(Je);dt=c(lo,"Overview"),lo.forEach(o),tt.forEach(o),Fe=h(e),Z=r(e,"P",{});var ze=a(Z);mt=c(ze,"The Decision Transformer model was proposed in "),Q=r(ze,"A",{href:!0,rel:!0});var co=a(Q);ft=c(co,"Decision Transformer: Reinforcement Learning via Sequence Modeling"),co.forEach(o),pt=r(ze,"BR",{}),ht=c(ze,`
by Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Michael Laskin, Pieter Abbeel, Aravind Srinivas, Igor Mordatch.`),ze.forEach(o),Pe=h(e),pe=r(e,"P",{});var mo=a(pe);ut=c(mo,"The abstract from the paper is the following:"),mo.forEach(o),Se=h(e),he=r(e,"P",{});var fo=a(he);Ee=r(fo,"EM",{});var po=a(Ee);gt=c(po,`We introduce a framework that abstracts Reinforcement Learning (RL) as a sequence modeling problem.
This allows us to draw upon the simplicity and scalability of the Transformer architecture, and associated advances
in language modeling such as GPT-x and BERT. In particular, we present Decision Transformer, an architecture that
casts the problem of RL as conditional sequence modeling. Unlike prior approaches to RL that fit value functions or
compute policy gradients, Decision Transformer simply outputs the optimal actions by leveraging a causally masked
Transformer. By conditioning an autoregressive model on the desired return (reward), past states, and actions, our
Decision Transformer model can generate future actions that achieve the desired return. Despite its simplicity,
Decision Transformer matches or exceeds the performance of state-of-the-art model-free offline RL baselines on
Atari, OpenAI Gym, and Key-to-Door tasks.`),po.forEach(o),fo.forEach(o),Ve=h(e),ue=r(e,"P",{});var ho=a(ue);_t=c(ho,"Tips:"),ho.forEach(o),Le=h(e),ge=r(e,"P",{});var uo=a(ge);Tt=c(uo,"This version of the model is for tasks where the state is a vector, image-based states will come soon."),uo.forEach(o),Xe=h(e),k=r(e,"P",{});var we=a(k);vt=c(we,"This model was contributed by "),O=r(we,"A",{href:!0,rel:!0});var go=a(O);yt=c(go,"edbeeching"),go.forEach(o),bt=c(we,". The original code can be found "),K=r(we,"A",{href:!0,rel:!0});var _o=a(K);Mt=c(_o,"here"),_o.forEach(o),wt=c(we,"."),we.forEach(o),Ye=h(e),U=r(e,"H2",{class:!0});var ot=a(U);W=r(ot,"A",{id:!0,class:!0,href:!0});var To=a(W);ke=r(To,"SPAN",{});var vo=a(ke);b(ee.$$.fragment,vo),vo.forEach(o),To.forEach(o),jt=h(ot),Re=r(ot,"SPAN",{});var yo=a(Re);$t=c(yo,"DecisionTransformerConfig"),yo.forEach(o),ot.forEach(o),He=h(e),D=r(e,"DIV",{class:!0});var X=a(D);b(te.$$.fragment,X),Dt=h(X),oe=r(X,"P",{});var nt=a(oe);Jt=c(nt,"This is the configuration class to store the configuration of a "),_e=r(nt,"A",{href:!0});var bo=a(_e);Et=c(bo,"DecisionTransformerModel"),bo.forEach(o),kt=c(nt,`. It is used to
instantiate a Decision Transformer model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the standard
DecisionTransformer architecture. Many of the config options are used to instatiate the GPT2 model that is used as
part of the architecture.`),nt.forEach(o),Rt=h(X),C=r(X,"P",{});var je=a(C);Zt=c(je,"Configuration objects inherit from "),Te=r(je,"A",{href:!0});var Mo=a(Te);Ut=c(Mo,"PretrainedConfig"),Mo.forEach(o),Ct=c(je,` and can be used to control the model outputs. Read the
documentation from `),ve=r(je,"A",{href:!0});var wo=a(ve);Gt=c(wo,"PretrainedConfig"),wo.forEach(o),Nt=c(je," for more information."),je.forEach(o),xt=h(X),b(F.$$.fragment,X),X.forEach(o),qe=h(e),G=r(e,"H2",{class:!0});var rt=a(G);P=r(rt,"A",{id:!0,class:!0,href:!0});var jo=a(P);Ze=r(jo,"SPAN",{});var $o=a(Ze);b(ne.$$.fragment,$o),$o.forEach(o),jo.forEach(o),At=h(rt),Ue=r(rt,"SPAN",{});var Do=a(Ue);zt=c(Do,"DecisionTransformerGPT2Model"),Do.forEach(o),rt.forEach(o),Qe=h(e),N=r(e,"DIV",{class:!0});var at=a(N);b(re.$$.fragment,at),Bt=h(at),ye=r(at,"DIV",{class:!0});var Jo=a(ye);b(ae.$$.fragment,Jo),Jo.forEach(o),at.forEach(o),Oe=h(e),x=r(e,"H2",{class:!0});var st=a(x);S=r(st,"A",{id:!0,class:!0,href:!0});var Eo=a(S);Ce=r(Eo,"SPAN",{});var ko=a(Ce);b(se.$$.fragment,ko),ko.forEach(o),Eo.forEach(o),It=h(st),Ge=r(st,"SPAN",{});var Ro=a(Ge);Wt=c(Ro,"DecisionTransformerModel"),Ro.forEach(o),st.forEach(o),Ke=h(e),J=r(e,"DIV",{class:!0});var Y=a(J);b(ie.$$.fragment,Y),Ft=h(Y),le=r(Y,"P",{});var it=a(le);Pt=c(it,`The Decision Transformer Model
This model is a PyTorch `),ce=r(it,"A",{href:!0,rel:!0});var Zo=a(ce);St=c(Zo,"torch.nn.Module"),Zo.forEach(o),Vt=c(it,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),it.forEach(o),Lt=h(Y),be=r(Y,"P",{});var ro=a(be);Xt=c(ro,`The model builds upon the GPT2 architecture to perform autoregressive prediction of actions in an offline RL
setting. Refer to the paper for more details: `),de=r(ro,"A",{href:!0,rel:!0});var Uo=a(de);Yt=c(Uo,"https://arxiv.org/abs/2106.01345"),Uo.forEach(o),ro.forEach(o),Ht=h(Y),E=r(Y,"DIV",{class:!0});var H=a(E);b(me.$$.fragment,H),qt=h(H),A=r(H,"P",{});var $e=a(A);Qt=c($e,"The "),Me=r($e,"A",{href:!0});var Co=a(Me);Ot=c(Co,"DecisionTransformerModel"),Co.forEach(o),Kt=c($e," forward method, overrides the "),Ne=r($e,"CODE",{});var Go=a(Ne);eo=c(Go,"__call__"),Go.forEach(o),to=c($e," special method."),$e.forEach(o),oo=h(H),b(V.$$.fragment,H),no=h(H),b(L.$$.fragment,H),H.forEach(o),Y.forEach(o),this.h()},h(){i(f,"name","hf:doc:metadata"),i(f,"content",JSON.stringify(Yo)),i(u,"id","decision-transformer"),i(u,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(u,"href","#decision-transformer"),i(g,"class","relative group"),i(I,"id","overview"),i(I,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(I,"href","#overview"),i(R,"class","relative group"),i(Q,"href","https://arxiv.org/abs/2106.01345"),i(Q,"rel","nofollow"),i(O,"href","https://huggingface.co/edbeeching"),i(O,"rel","nofollow"),i(K,"href","https://github.com/kzl/decision-transformer"),i(K,"rel","nofollow"),i(W,"id","transformers.DecisionTransformerConfig"),i(W,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(W,"href","#transformers.DecisionTransformerConfig"),i(U,"class","relative group"),i(_e,"href","/docs/transformers/main/en/model_doc/decision_transformer#transformers.DecisionTransformerModel"),i(Te,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),i(ve,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),i(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(P,"id","transformers.DecisionTransformerGPT2Model"),i(P,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(P,"href","#transformers.DecisionTransformerGPT2Model"),i(G,"class","relative group"),i(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(S,"id","transformers.DecisionTransformerModel"),i(S,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(S,"href","#transformers.DecisionTransformerModel"),i(x,"class","relative group"),i(ce,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(ce,"rel","nofollow"),i(de,"href","https://arxiv.org/abs/2106.01345"),i(de,"rel","nofollow"),i(Me,"href","/docs/transformers/main/en/model_doc/decision_transformer#transformers.DecisionTransformerModel"),i(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,d){t(document.head,f),m(e,v,d),m(e,g,d),t(g,u),t(u,T),M(s,T,null),t(g,_),t(g,B),t(B,lt),m(e,We,d),m(e,R,d),t(R,I),t(I,De),M(q,De,null),t(R,ct),t(R,Je),t(Je,dt),m(e,Fe,d),m(e,Z,d),t(Z,mt),t(Z,Q),t(Q,ft),t(Z,pt),t(Z,ht),m(e,Pe,d),m(e,pe,d),t(pe,ut),m(e,Se,d),m(e,he,d),t(he,Ee),t(Ee,gt),m(e,Ve,d),m(e,ue,d),t(ue,_t),m(e,Le,d),m(e,ge,d),t(ge,Tt),m(e,Xe,d),m(e,k,d),t(k,vt),t(k,O),t(O,yt),t(k,bt),t(k,K),t(K,Mt),t(k,wt),m(e,Ye,d),m(e,U,d),t(U,W),t(W,ke),M(ee,ke,null),t(U,jt),t(U,Re),t(Re,$t),m(e,He,d),m(e,D,d),M(te,D,null),t(D,Dt),t(D,oe),t(oe,Jt),t(oe,_e),t(_e,Et),t(oe,kt),t(D,Rt),t(D,C),t(C,Zt),t(C,Te),t(Te,Ut),t(C,Ct),t(C,ve),t(ve,Gt),t(C,Nt),t(D,xt),M(F,D,null),m(e,qe,d),m(e,G,d),t(G,P),t(P,Ze),M(ne,Ze,null),t(G,At),t(G,Ue),t(Ue,zt),m(e,Qe,d),m(e,N,d),M(re,N,null),t(N,Bt),t(N,ye),M(ae,ye,null),m(e,Oe,d),m(e,x,d),t(x,S),t(S,Ce),M(se,Ce,null),t(x,It),t(x,Ge),t(Ge,Wt),m(e,Ke,d),m(e,J,d),M(ie,J,null),t(J,Ft),t(J,le),t(le,Pt),t(le,ce),t(ce,St),t(le,Vt),t(J,Lt),t(J,be),t(be,Xt),t(be,de),t(de,Yt),t(J,Ht),t(J,E),M(me,E,null),t(E,qt),t(E,A),t(A,Qt),t(A,Me),t(Me,Ot),t(A,Kt),t(A,Ne),t(Ne,eo),t(A,to),t(E,oo),M(V,E,null),t(E,no),M(L,E,null),et=!0},p(e,[d]){const fe={};d&2&&(fe.$$scope={dirty:d,ctx:e}),F.$set(fe);const xe={};d&2&&(xe.$$scope={dirty:d,ctx:e}),V.$set(xe);const Ae={};d&2&&(Ae.$$scope={dirty:d,ctx:e}),L.$set(Ae)},i(e){et||(w(s.$$.fragment,e),w(q.$$.fragment,e),w(ee.$$.fragment,e),w(te.$$.fragment,e),w(F.$$.fragment,e),w(ne.$$.fragment,e),w(re.$$.fragment,e),w(ae.$$.fragment,e),w(se.$$.fragment,e),w(ie.$$.fragment,e),w(me.$$.fragment,e),w(V.$$.fragment,e),w(L.$$.fragment,e),et=!0)},o(e){j(s.$$.fragment,e),j(q.$$.fragment,e),j(ee.$$.fragment,e),j(te.$$.fragment,e),j(F.$$.fragment,e),j(ne.$$.fragment,e),j(re.$$.fragment,e),j(ae.$$.fragment,e),j(se.$$.fragment,e),j(ie.$$.fragment,e),j(me.$$.fragment,e),j(V.$$.fragment,e),j(L.$$.fragment,e),et=!1},d(e){o(f),e&&o(v),e&&o(g),$(s),e&&o(We),e&&o(R),$(q),e&&o(Fe),e&&o(Z),e&&o(Pe),e&&o(pe),e&&o(Se),e&&o(he),e&&o(Ve),e&&o(ue),e&&o(Le),e&&o(ge),e&&o(Xe),e&&o(k),e&&o(Ye),e&&o(U),$(ee),e&&o(He),e&&o(D),$(te),$(F),e&&o(qe),e&&o(G),$(ne),e&&o(Qe),e&&o(N),$(re),$(ae),e&&o(Oe),e&&o(x),$(se),e&&o(Ke),e&&o(J),$(ie),$(me),$(V),$(L)}}}const Yo={local:"decision-transformer",sections:[{local:"overview",title:"Overview"},{local:"transformers.DecisionTransformerConfig",title:"DecisionTransformerConfig"},{local:"transformers.DecisionTransformerGPT2Model",title:"DecisionTransformerGPT2Model"},{local:"transformers.DecisionTransformerModel",title:"DecisionTransformerModel"}],title:"Decision Transformer"};function Ho(z){return Fo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class on extends zo{constructor(f){super();Bo(this,f,Ho,Xo,Io,{})}}export{on as default,Yo as metadata};
