import{s as At,n as St,o as Ht}from"../chunks/scheduler.9bc65507.js";import{S as Dt,i as It,g as o,s as i,u,A as Ot,h as r,f as t,c as l,j as d,v as _,y as p,k as m,o as n,a as s,w as v,d as b,t as x,x as y}from"../chunks/index.78c82d43.js";import{D as be}from"../chunks/Docstring.f3d04bd2.js";import{I as xe}from"../chunks/IconCopyLink.bedaa44d.js";function jt(nt){let C,ye,he,Ce,w,L,ce,E,Ve,K,at="Graphormer",we,G,N,fe,F,Ye,Z,st="Overview",Ge,A,it=`The Graphormer model was proposed in <a href="https://arxiv.org/abs/2106.05234" rel="nofollow">Do Transformers Really Perform Bad for Graph Representation?</a>  by
Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen and Tie-Yan Liu. It is a Graph Transformer model, modified to allow computations on graphs instead of text sequences by generating embeddings and features of interest during preprocessing and collation, then using a modified attention.`,$e,S,lt="The abstract from the paper is the following:",Te,H,mt="<em>The Transformer architecture has become a dominant choice in many domains, such as natural language processing and computer vision. Yet, it has not achieved competitive performance on popular leaderboards of graph-level prediction compared to mainstream GNN variants. Therefore, it remains a mystery how Transformers could perform well for graph representation learning. In this paper, we solve this mystery by presenting Graphormer, which is built upon the standard Transformer architecture, and could attain excellent results on a broad range of graph representation learning tasks, especially on the recent OGB Large-Scale Challenge. Our key insight to utilizing Transformer in the graph is the necessity of effectively encoding the structural information of a graph into the model. To this end, we propose several simple yet effective structural encoding methods to help Graphormer better model graph-structured data. Besides, we mathematically characterize the expressive power of Graphormer and exhibit that with our ways of encoding the structural information of graphs, many popular GNN variants could be covered as the special cases of Graphormer.</em>",ke,D,dt="Tips:",Le,I,pt=`This model will not work well on large graphs (more than 100 nodes/edges), as it will make the memory explode.
You can reduce the batch size, increase your RAM, or decrease the <code>UNREACHABLE_NODE_DISTANCE</code> parameter in algos_graphormer.pyx, but it will be hard to go above 700 nodes/edges.`,Ne,O,ht="This model does not use a tokenizer, but instead a special collator during training.",Pe,j,ct='This model was contributed by <a href="https://huggingface.co/clefourrier" rel="nofollow">clefourrier</a>. The original code can be found <a href="https://github.com/microsoft/Graphormer" rel="nofollow">here</a>.',qe,$,P,ge,R,Be,X,ft="GraphormerConfig",Me,f,V,Ue,ee,gt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/graphormer#transformers.GraphormerModel">~GraphormerModel</a>. It is used to instantiate an
Graphormer 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 Graphormer
<a href="https://huggingface.co/graphormer-base-pcqm4mv1" rel="nofollow">graphormer-base-pcqm4mv1</a> architecture.`,Qe,te,ut=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ze,T,q,ue,Y,We,oe,_t="GraphormerModel",Ee,c,B,Je,re,vt="The Graphormer model is a graph-encoder model.",Ke,ne,bt=`It goes from a graph to its representation. If you want to use the model for a downstream classification task, use
GraphormerForGraphClassification instead. For any other downstream task, feel free to add a new class, or combine
this model with a downstream model of your choice, following the example in GraphormerForGraphClassification.`,Ze,ae,U,Fe,k,M,_e,Q,Xe,se,xt="GraphormerForGraphClassification",Ae,h,W,et,ie,yt="This model can be used for graph-level classification or regression tasks.",tt,le,Ct="It can be trained on",ot,me,wt=`<li>regression (by setting config.num_classes to 1); there should be one float-type label per graph</li> <li>one task classification (by setting config.num_classes to the number of classes); there should be one integer
label per graph</li> <li>binary multi-task classification (by setting config.num_classes to the number of labels); there should be a list
of integer labels for each graph.</li>`,rt,de,J,Se,ve,He;return E=new xe({}),F=new xe({}),R=new xe({}),V=new be({props:{name:"class transformers.GraphormerConfig",anchor:"transformers.GraphormerConfig",parameters:[{name:"num_classes",val:": int = 1"},{name:"num_atoms",val:": int = 4608"},{name:"num_edges",val:": int = 1536"},{name:"num_in_degree",val:": int = 512"},{name:"num_out_degree",val:": int = 512"},{name:"num_spatial",val:": int = 512"},{name:"num_edge_dis",val:": int = 128"},{name:"multi_hop_max_dist",val:": int = 5"},{name:"spatial_pos_max",val:": int = 1024"},{name:"edge_type",val:": str = 'multi_hop'"},{name:"max_nodes",val:": int = 512"},{name:"share_input_output_embed",val:": bool = False"},{name:"num_hidden_layers",val:": int = 12"},{name:"embedding_dim",val:": int = 768"},{name:"ffn_embedding_dim",val:": int = 768"},{name:"num_attention_heads",val:": int = 32"},{name:"dropout",val:": float = 0.1"},{name:"attention_dropout",val:": float = 0.1"},{name:"layerdrop",val:": float = 0.0"},{name:"encoder_normalize_before",val:": bool = False"},{name:"pre_layernorm",val:": bool = False"},{name:"apply_graphormer_init",val:": bool = False"},{name:"activation_fn",val:": str = 'gelu'"},{name:"embed_scale",val:": float = None"},{name:"freeze_embeddings",val:": bool = False"},{name:"num_trans_layers_to_freeze",val:": int = 0"},{name:"traceable",val:": bool = False"},{name:"q_noise",val:": float = 0.0"},{name:"qn_block_size",val:": int = 8"},{name:"kdim",val:": int = None"},{name:"vdim",val:": int = None"},{name:"bias",val:": bool = True"},{name:"self_attention",val:": bool = True"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.GraphormerConfig.num_classes",description:`<strong>num_classes</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of target classes or labels, set to n for binary classification of n tasks.`,name:"num_classes"},{anchor:"transformers.GraphormerConfig.num_atoms",description:`<strong>num_atoms</strong> (<code>int</code>, <em>optional</em>, defaults to 512*9) &#x2014;
Number of node types in the graphs.`,name:"num_atoms"},{anchor:"transformers.GraphormerConfig.num_edges",description:`<strong>num_edges</strong> (<code>int</code>, <em>optional</em>, defaults to 512*3) &#x2014;
Number of edges types in the graph.`,name:"num_edges"},{anchor:"transformers.GraphormerConfig.num_in_degree",description:`<strong>num_in_degree</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Number of in degrees types in the input graphs.`,name:"num_in_degree"},{anchor:"transformers.GraphormerConfig.num_out_degree",description:`<strong>num_out_degree</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Number of out degrees types in the input graphs.`,name:"num_out_degree"},{anchor:"transformers.GraphormerConfig.num_edge_dis",description:`<strong>num_edge_dis</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Number of edge dis in the input graphs.`,name:"num_edge_dis"},{anchor:"transformers.GraphormerConfig.multi_hop_max_dist",description:`<strong>multi_hop_max_dist</strong> (<code>int</code>, <em>optional</em>, defaults to 20) &#x2014;
Maximum distance of multi hop edges between two nodes.`,name:"multi_hop_max_dist"},{anchor:"transformers.GraphormerConfig.spatial_pos_max",description:`<strong>spatial_pos_max</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Maximum distance between nodes in the graph attention bias matrices, used during preprocessing and
collation.`,name:"spatial_pos_max"},{anchor:"transformers.GraphormerConfig.edge_type",description:`<strong>edge_type</strong> (<code>str</code>, <em>optional</em>, defaults to multihop) &#x2014;
Type of edge relation chosen.`,name:"edge_type"},{anchor:"transformers.GraphormerConfig.max_nodes",description:`<strong>max_nodes</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Maximum number of nodes which can be parsed for the input graphs.`,name:"max_nodes"},{anchor:"transformers.GraphormerConfig.share_input_output_embed",description:`<strong>share_input_output_embed</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Shares the embedding layer between encoder and decoder - careful, True is not implemented.`,name:"share_input_output_embed"},{anchor:"transformers.GraphormerConfig.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of layers.`,name:"num_layers"},{anchor:"transformers.GraphormerConfig.embedding_dim",description:`<strong>embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimension of the embedding layer in encoder.`,name:"embedding_dim"},{anchor:"transformers.GraphormerConfig.ffn_embedding_dim",description:`<strong>ffn_embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in encoder.`,name:"ffn_embedding_dim"},{anchor:"transformers.GraphormerConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of attention heads in the encoder.`,name:"num_attention_heads"},{anchor:"transformers.GraphormerConfig.self_attention",description:`<strong>self_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Model is self attentive (False not implemented).`,name:"self_attention"},{anchor:"transformers.GraphormerConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.GraphormerConfig.dropout",description:`<strong>dropout</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:"dropout"},{anchor:"transformers.GraphormerConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the attention weights.`,name:"attention_dropout"},{anchor:"transformers.GraphormerConfig.layerdrop",description:`<strong>layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the encoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"layerdrop"},{anchor:"transformers.GraphormerConfig.bias",description:`<strong>bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Uses bias in the attention module - unsupported at the moment.`,name:"bias"},{anchor:"transformers.GraphormerConfig.embed_scale(float,",description:`<strong>embed_scale(<code>float</code>,</strong> <em>optional</em>, defaults to None) &#x2014;
Scaling factor for the node embeddings.`,name:"embed_scale(float,"},{anchor:"transformers.GraphormerConfig.num_trans_layers_to_freeze",description:`<strong>num_trans_layers_to_freeze</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Number of transformer layers to freeze.`,name:"num_trans_layers_to_freeze"},{anchor:"transformers.GraphormerConfig.encoder_normalize_before",description:`<strong>encoder_normalize_before</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Normalize features before encoding the graph.`,name:"encoder_normalize_before"},{anchor:"transformers.GraphormerConfig.pre_layernorm",description:`<strong>pre_layernorm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Apply layernorm before self attention and the feed forward network. Without this, post layernorm will be
used.`,name:"pre_layernorm"},{anchor:"transformers.GraphormerConfig.apply_graphormer_init",description:`<strong>apply_graphormer_init</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Apply a custom graphormer initialisation to the model before training.`,name:"apply_graphormer_init"},{anchor:"transformers.GraphormerConfig.freeze_embeddings",description:`<strong>freeze_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Freeze the embedding layer, or train it along the model.`,name:"freeze_embeddings"},{anchor:"transformers.GraphormerConfig.encoder_normalize_before",description:`<strong>encoder_normalize_before</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Apply the layer norm before each encoder block.`,name:"encoder_normalize_before"},{anchor:"transformers.GraphormerConfig.q_noise",description:`<strong>q_noise</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Amount of quantization noise (see &#x201C;Training with Quantization Noise for Extreme Model Compression&#x201D;). (For
more detail, see fairseq&#x2019;s documentation on quant_noise).`,name:"q_noise"},{anchor:"transformers.GraphormerConfig.qn_block_size",description:`<strong>qn_block_size</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Size of the blocks for subsequent quantization with iPQ (see q_noise).`,name:"qn_block_size"},{anchor:"transformers.GraphormerConfig.kdim",description:`<strong>kdim</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
Dimension of the key in the attention, if different from the other values.`,name:"kdim"},{anchor:"transformers.GraphormerConfig.vdim",description:`<strong>vdim</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
Dimension of the value in the attention, if different from the other values.`,name:"vdim"},{anchor:"transformers.GraphormerConfig.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.GraphormerConfig.traceable",description:`<strong>traceable</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Changes return value of the encoder&#x2019;s inner_state to stacked tensors.</p>
<p>Example &#x2014;`,name:"traceable"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/graphormer/configuration_graphormer.py#L30"}}),Y=new xe({}),B=new be({props:{name:"class transformers.GraphormerModel",anchor:"transformers.GraphormerModel",parameters:[{name:"config",val:": GraphormerConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/graphormer/modeling_graphormer.py#L781"}}),U=new be({props:{name:"forward",anchor:"transformers.GraphormerModel.forward",parameters:[{name:"input_nodes",val:": LongTensor"},{name:"input_edges",val:": LongTensor"},{name:"attn_bias",val:": Tensor"},{name:"in_degree",val:": LongTensor"},{name:"out_degree",val:": LongTensor"},{name:"spatial_pos",val:": LongTensor"},{name:"attn_edge_type",val:": LongTensor"},{name:"perturb",val:": typing.Optional[torch.FloatTensor] = None"},{name:"masked_tokens",val:": None = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**unused",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/graphormer/modeling_graphormer.py#L810"}}),Q=new xe({}),W=new be({props:{name:"class transformers.GraphormerForGraphClassification",anchor:"transformers.GraphormerForGraphClassification",parameters:[{name:"config",val:": GraphormerConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/graphormer/modeling_graphormer.py#L852"}}),J=new be({props:{name:"forward",anchor:"transformers.GraphormerForGraphClassification.forward",parameters:[{name:"input_nodes",val:": LongTensor"},{name:"input_edges",val:": LongTensor"},{name:"attn_bias",val:": Tensor"},{name:"in_degree",val:": LongTensor"},{name:"out_degree",val:": LongTensor"},{name:"spatial_pos",val:": LongTensor"},{name:"attn_edge_type",val:": LongTensor"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**unused",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/graphormer/modeling_graphormer.py#L875"}}),{c(){C=o("meta"),ye=i(),he=o("p"),Ce=i(),w=o("h1"),L=o("a"),ce=o("span"),u(E.$$.fragment),Ve=i(),K=o("span"),K.textContent=at,we=i(),G=o("h2"),N=o("a"),fe=o("span"),u(F.$$.fragment),Ye=i(),Z=o("span"),Z.textContent=st,Ge=i(),A=o("p"),A.innerHTML=it,$e=i(),S=o("p"),S.textContent=lt,Te=i(),H=o("p"),H.innerHTML=mt,ke=i(),D=o("p"),D.textContent=dt,Le=i(),I=o("p"),I.innerHTML=pt,Ne=i(),O=o("p"),O.textContent=ht,Pe=i(),j=o("p"),j.innerHTML=ct,qe=i(),$=o("h2"),P=o("a"),ge=o("span"),u(R.$$.fragment),Be=i(),X=o("span"),X.textContent=ft,Me=i(),f=o("div"),u(V.$$.fragment),Ue=i(),ee=o("p"),ee.innerHTML=gt,Qe=i(),te=o("p"),te.innerHTML=ut,ze=i(),T=o("h2"),q=o("a"),ue=o("span"),u(Y.$$.fragment),We=i(),oe=o("span"),oe.textContent=_t,Ee=i(),c=o("div"),u(B.$$.fragment),Je=i(),re=o("p"),re.textContent=vt,Ke=i(),ne=o("p"),ne.textContent=bt,Ze=i(),ae=o("div"),u(U.$$.fragment),Fe=i(),k=o("h2"),M=o("a"),_e=o("span"),u(Q.$$.fragment),Xe=i(),se=o("span"),se.textContent=xt,Ae=i(),h=o("div"),u(W.$$.fragment),et=i(),ie=o("p"),ie.textContent=yt,tt=i(),le=o("p"),le.textContent=Ct,ot=i(),me=o("ul"),me.innerHTML=wt,rt=i(),de=o("div"),u(J.$$.fragment),Se=i(),ve=o("p"),this.h()},l(e){const a=Ot("svelte-1phssyn",document.head);C=r(a,"META",{name:!0,content:!0}),a.forEach(t),ye=l(e),he=r(e,"P",{}),d(he).forEach(t),Ce=l(e),w=r(e,"H1",{class:!0});var De=d(w);L=r(De,"A",{id:!0,class:!0,href:!0});var Gt=d(L);ce=r(Gt,"SPAN",{});var $t=d(ce);_(E.$$.fragment,$t),$t.forEach(t),Gt.forEach(t),Ve=l(De),K=r(De,"SPAN",{"data-svelte-h":!0}),p(K)!=="svelte-1h7m2i4"&&(K.textContent=at),De.forEach(t),we=l(e),G=r(e,"H2",{class:!0});var Ie=d(G);N=r(Ie,"A",{id:!0,class:!0,href:!0});var Tt=d(N);fe=r(Tt,"SPAN",{});var kt=d(fe);_(F.$$.fragment,kt),kt.forEach(t),Tt.forEach(t),Ye=l(Ie),Z=r(Ie,"SPAN",{"data-svelte-h":!0}),p(Z)!=="svelte-1jsw1pg"&&(Z.textContent=st),Ie.forEach(t),Ge=l(e),A=r(e,"P",{"data-svelte-h":!0}),p(A)!=="svelte-1muoe1y"&&(A.innerHTML=it),$e=l(e),S=r(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-vfdo9a"&&(S.textContent=lt),Te=l(e),H=r(e,"P",{"data-svelte-h":!0}),p(H)!=="svelte-vndg5l"&&(H.innerHTML=mt),ke=l(e),D=r(e,"P",{"data-svelte-h":!0}),p(D)!=="svelte-axv494"&&(D.textContent=dt),Le=l(e),I=r(e,"P",{"data-svelte-h":!0}),p(I)!=="svelte-i9pwbm"&&(I.innerHTML=pt),Ne=l(e),O=r(e,"P",{"data-svelte-h":!0}),p(O)!=="svelte-zfbk6c"&&(O.textContent=ht),Pe=l(e),j=r(e,"P",{"data-svelte-h":!0}),p(j)!=="svelte-jcrxss"&&(j.innerHTML=ct),qe=l(e),$=r(e,"H2",{class:!0});var Oe=d($);P=r(Oe,"A",{id:!0,class:!0,href:!0});var Lt=d(P);ge=r(Lt,"SPAN",{});var Nt=d(ge);_(R.$$.fragment,Nt),Nt.forEach(t),Lt.forEach(t),Be=l(Oe),X=r(Oe,"SPAN",{"data-svelte-h":!0}),p(X)!=="svelte-1k3qmbi"&&(X.textContent=ft),Oe.forEach(t),Me=l(e),f=r(e,"DIV",{class:!0});var pe=d(f);_(V.$$.fragment,pe),Ue=l(pe),ee=r(pe,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-1qgvfna"&&(ee.innerHTML=gt),Qe=l(pe),te=r(pe,"P",{"data-svelte-h":!0}),p(te)!=="svelte-cfh5wl"&&(te.innerHTML=ut),pe.forEach(t),ze=l(e),T=r(e,"H2",{class:!0});var je=d(T);q=r(je,"A",{id:!0,class:!0,href:!0});var Pt=d(q);ue=r(Pt,"SPAN",{});var qt=d(ue);_(Y.$$.fragment,qt),qt.forEach(t),Pt.forEach(t),We=l(je),oe=r(je,"SPAN",{"data-svelte-h":!0}),p(oe)!=="svelte-1g73e6j"&&(oe.textContent=_t),je.forEach(t),Ee=l(e),c=r(e,"DIV",{class:!0});var z=d(c);_(B.$$.fragment,z),Je=l(z),re=r(z,"P",{"data-svelte-h":!0}),p(re)!=="svelte-1h7pfe4"&&(re.textContent=vt),Ke=l(z),ne=r(z,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-dkg3qc"&&(ne.textContent=bt),Ze=l(z),ae=r(z,"DIV",{class:!0});var Mt=d(ae);_(U.$$.fragment,Mt),Mt.forEach(t),z.forEach(t),Fe=l(e),k=r(e,"H2",{class:!0});var Re=d(k);M=r(Re,"A",{id:!0,class:!0,href:!0});var zt=d(M);_e=r(zt,"SPAN",{});var Et=d(_e);_(Q.$$.fragment,Et),Et.forEach(t),zt.forEach(t),Xe=l(Re),se=r(Re,"SPAN",{"data-svelte-h":!0}),p(se)!=="svelte-cb7rgb"&&(se.textContent=xt),Re.forEach(t),Ae=l(e),h=r(e,"DIV",{class:!0});var g=d(h);_(W.$$.fragment,g),et=l(g),ie=r(g,"P",{"data-svelte-h":!0}),p(ie)!=="svelte-1nkx1mp"&&(ie.textContent=yt),tt=l(g),le=r(g,"P",{"data-svelte-h":!0}),p(le)!=="svelte-16q1k4"&&(le.textContent=Ct),ot=l(g),me=r(g,"UL",{"data-svelte-h":!0}),p(me)!=="svelte-7iqyu8"&&(me.innerHTML=wt),rt=l(g),de=r(g,"DIV",{class:!0});var Ft=d(de);_(J.$$.fragment,Ft),Ft.forEach(t),g.forEach(t),Se=l(e),ve=r(e,"P",{}),d(ve).forEach(t),this.h()},h(){m(C,"name","hf:doc:metadata"),m(C,"content",JSON.stringify(Rt)),m(L,"id","graphormer"),m(L,"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"),m(L,"href","#graphormer"),m(w,"class","relative group"),m(N,"id","overview"),m(N,"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"),m(N,"href","#overview"),m(G,"class","relative group"),m(P,"id","transformers.GraphormerConfig"),m(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"),m(P,"href","#transformers.GraphormerConfig"),m($,"class","relative group"),m(f,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(q,"id","transformers.GraphormerModel"),m(q,"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"),m(q,"href","#transformers.GraphormerModel"),m(T,"class","relative group"),m(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(c,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(M,"id","transformers.GraphormerForGraphClassification"),m(M,"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"),m(M,"href","#transformers.GraphormerForGraphClassification"),m(k,"class","relative group"),m(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(h,"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,a){n(document.head,C),s(e,ye,a),s(e,he,a),s(e,Ce,a),s(e,w,a),n(w,L),n(L,ce),v(E,ce,null),n(w,Ve),n(w,K),s(e,we,a),s(e,G,a),n(G,N),n(N,fe),v(F,fe,null),n(G,Ye),n(G,Z),s(e,Ge,a),s(e,A,a),s(e,$e,a),s(e,S,a),s(e,Te,a),s(e,H,a),s(e,ke,a),s(e,D,a),s(e,Le,a),s(e,I,a),s(e,Ne,a),s(e,O,a),s(e,Pe,a),s(e,j,a),s(e,qe,a),s(e,$,a),n($,P),n(P,ge),v(R,ge,null),n($,Be),n($,X),s(e,Me,a),s(e,f,a),v(V,f,null),n(f,Ue),n(f,ee),n(f,Qe),n(f,te),s(e,ze,a),s(e,T,a),n(T,q),n(q,ue),v(Y,ue,null),n(T,We),n(T,oe),s(e,Ee,a),s(e,c,a),v(B,c,null),n(c,Je),n(c,re),n(c,Ke),n(c,ne),n(c,Ze),n(c,ae),v(U,ae,null),s(e,Fe,a),s(e,k,a),n(k,M),n(M,_e),v(Q,_e,null),n(k,Xe),n(k,se),s(e,Ae,a),s(e,h,a),v(W,h,null),n(h,et),n(h,ie),n(h,tt),n(h,le),n(h,ot),n(h,me),n(h,rt),n(h,de),v(J,de,null),s(e,Se,a),s(e,ve,a),He=!0},p:St,i(e){He||(b(E.$$.fragment,e),b(F.$$.fragment,e),b(R.$$.fragment,e),b(V.$$.fragment,e),b(Y.$$.fragment,e),b(B.$$.fragment,e),b(U.$$.fragment,e),b(Q.$$.fragment,e),b(W.$$.fragment,e),b(J.$$.fragment,e),He=!0)},o(e){x(E.$$.fragment,e),x(F.$$.fragment,e),x(R.$$.fragment,e),x(V.$$.fragment,e),x(Y.$$.fragment,e),x(B.$$.fragment,e),x(U.$$.fragment,e),x(Q.$$.fragment,e),x(W.$$.fragment,e),x(J.$$.fragment,e),He=!1},d(e){e&&(t(ye),t(he),t(Ce),t(w),t(we),t(G),t(Ge),t(A),t($e),t(S),t(Te),t(H),t(ke),t(D),t(Le),t(I),t(Ne),t(O),t(Pe),t(j),t(qe),t($),t(Me),t(f),t(ze),t(T),t(Ee),t(c),t(Fe),t(k),t(Ae),t(h),t(Se),t(ve)),t(C),y(E),y(F),y(R),y(V),y(Y),y(B),y(U),y(Q),y(W),y(J)}}}const Rt={local:"graphormer",sections:[{local:"overview",title:"Overview"},{local:"transformers.GraphormerConfig",title:"GraphormerConfig"},{local:"transformers.GraphormerModel",title:"GraphormerModel"},{local:"transformers.GraphormerForGraphClassification",title:"GraphormerForGraphClassification"}],title:"Graphormer"};function Vt(nt){return Ht(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Wt extends Dt{constructor(C){super(),It(this,C,Vt,jt,At,{})}}export{Wt as component};
