+
    "Ý³jµ  ã                   óV   € ^ RI Ht ^ RIHtHtHt ^RIHt R R ltR R lt	R R	 lt
R
# )é    )Údefaultdict)ÚIterableÚListÚTuple)ÚTorchLinearc                ó:   € V ^8„  d   QhR\         \        ,          /# ©é   Úmodules©r   r   )Úformats   "Úg/home/luca/screen-checking/.venv/lib/python3.14/site-packages/gptqmodel/nn_modules/qlinear/lookahead.pyÚ__annotate__r      s   € ÷ &ñ &¤x´Õ'<ñ &ó    c                ó¸   € RpV  F:  pVe!   VP                  R4      P                  V4       VP                  R4       TpK<  	  Ve   VP                  R4       R# R# )a  Wire a sequence of TorchLinear modules for one-step lookahead.

Each module in *modules* (except the last) will prefetch the next module's
dequantized weights the moment it finishes its own forward call. The last
module's ``lookahead_next`` pointer is cleared.
NT)Úenable_lookaheadÚset_lookahead_next)r   ÚlastÚmodules   &  r   Úconfigure_lookahead_chainr      s`   € ð €DÛˆØÒØ×!Ñ! $Ó'×:Ñ:¸6ÔBØ×Ñ Ô%ØŠñ	 ð
 ÒØ×Ñ Ö%ñ r   c                ó:   € V ^8„  d   QhR\         \        ,          /# r	   r   )r   s   "r   r   r      s   € ÷ (ñ (¤8¬KÕ#8ñ (r   c                 ó:   € V  F  pVP                  R 4       K  	  R # ©N)r   )r   r   s   & r   Ú_clear_existing_linksr      s   € ÛˆØ×!Ñ! $Ö'ó r   c                ó   € V ^8„  d   QhRR/# )r
   ÚreturnN© )r   s   "r   r   r   #   s   € ÷ 7.ñ 7.¨$ñ 7.r   c                óZ  € . pV P                  4        F/  w  r#\        V\        4      '       g   K  VP                  W#34       K1  	  V'       g   R# \	        R V 4       4       R
pRp\        \        4      p\        \        4      pV F‡  w  r#RV9   d;   VP                  R^R7      w  r‰V	P                  R4      ^ ,          p	W6V,          V	&   KF  RV9   g   KO  VP                  R^R7      w  r‰V	P                  R4      ^ ,          p	W7V,          V	&   K‰  	  \        \        VP                  4       4      \        VP                  4       4      ,           4       EFK  p
VP                  V
/ 4      pVP                  V
/ 4      pVP                  R4      pV Uu. uF(  qëP                  V4      f   K  VP                  V4      NK*  	  ppV Uu. uF(  qìP                  V4      f   K  VP                  V4      NK*  	  ppV F%  pVP                  R4       VP                  R4       K'  	  V F%  pVP                  R4       VP                  R4       K'  	  Vf   Ký  V'       g   EK  VP                  R	4      P                  \        V4      4       V F  pVP                  R	4       K  	  EKN  	  R# u upi u upi )a$  Eagerly decode the MLP projection trio when attention ``q_proj`` runs.

For each transformer block this disables lookahead between
``self_attn.{q,k,v,o}_proj`` and instead wires ``q_proj`` to prefetch the
block's ``mlp.{gate,up,down}_proj`` modules concurrently. Missing modules
are skipped.
Nc              3   ó*   "  € T F	  w  rVx € K  	  R # 5ir   r   )Ú.0Ú_r   s   &  r   Ú	<genexpr>Ú.configure_default_lookahead.<locals>.<genexpr>4   s   é € ÐB±/¡Y Q�&³/ùs   ‚Úq_projz.self_attn.)ÚmaxsplitÚ.z.mlp.FT)r$   Úk_projÚv_projÚo_proj)Ú	gate_projÚup_projÚ	down_proj)Únamed_modulesÚ
isinstancer   Úappendr   r   ÚdictÚsplitÚsetÚlistÚkeysÚgetr   r   Útuple)ÚmodelÚordered_modulesÚnamer   Ú
attn_orderÚ	mlp_orderÚattn_blocksÚ
mlp_blocksÚprefixÚleafÚblockÚattnÚmlpÚq_moduleÚkeyÚattn_modulesÚmlp_targetsÚtargets   &                 r   Úconfigure_default_lookaheadrH   #   s9  € ð 68€OØ×+Ñ+Ö-‰ˆÜ�fœk×*Ô*Ø×"Ñ" D >Ö2ñ .÷ ÙäÑB±/ÓBÔBà9€JØ5€IäœdÓ#€KÜœTÓ"€Jã'‰ˆØ˜DÔ ØŸ:™: m¸a˜:Ó@‰LˆFØ—:‘:˜c“? 1Õ%ˆDØ(.˜Õ Ñ%ÙØ�dŽ?ØŸ:™: g¸˜:Ó:‰LˆFØ—:‘:˜c“? 1Õ%ˆDØ'-�vÕ˜tÓ$ñ (ô ”T˜+×*Ñ*Ó,Ó-´°Z·_±_Ó5FÓ0GÕG×HˆØ�‰˜u bÓ)ˆØ�n‰n˜U BÓ'ˆà—8‘8˜HÓ%ˆÙ1;ÓY±¨#¿x¹xÈ»}œ˜Ÿ™ ž±ˆÐYÙ/8ÓU©y¨¿G¹GÀC»L”|�s—w‘w˜s–|©yˆÐUó #ˆFØ×%Ñ% dÔ+Ø×#Ñ# EÖ*ñ #ó "ˆFØ×%Ñ% dÔ+Ø×#Ñ# EÖ*ñ "ð Ô§K¢KØ×%Ñ% dÓ+×>Ñ>¼uÀ[Ó?QÔRÛ%�Ø×'Ñ'¨Ö-ô &ó% Iùò
 ZùÚUs   ÆJ#Æ'J#ÇJ(ÇJ(N)Úcollectionsr   Útypingr   r   r   Útorchr   r   r   rH   r   r   r   Ú<module>rL      s"   ðõ $ß (Ñ (å õ&õ$(÷
7.r   