clip_pooled_output

Pooled CLIP output at the EOS position

Description

The HF CLIPTextModel pooler_output: the final-layer-norm hidden state at the EOS token position, located by argmax over the token ids (EOS is the highest id in the CLIP vocab, and causal attention makes any padding after it irrelevant). No text projection is applied - this is what FLUX uses as pooled_projections.

Usage

clip_pooled_output(hidden_states, input_ids)

Arguments

  • hidden_states: Final-LN hidden states [B, S, D] from text_encoder_native (with apply_final_ln = TRUE).
  • input_ids: Token ids [B, S] (0-based, as fed to the encoder).

Value

Tensor [B, D].