KEMBAR78
Add Blenderbot example by kwen2501 · Pull Request #897 · pytorch/PiPPy · GitHub
Skip to content
This repository was archived by the owner on Aug 5, 2025. It is now read-only.

Conversation

@kwen2501
Copy link
Contributor

@kwen2501 kwen2501 commented Dec 4, 2023

Needs pytorch/pytorch#114982 to work.

BlenderbotForCausalLM(
  (model): BlenderbotDecoderWrapper(
    (decoder): BlenderbotDecoder(
      (embed_tokens): Embedding(8008, 2560, padding_idx=0)
      (embed_positions): BlenderbotLearnedPositionalEmbedding(128, 2560)
      (layers): ModuleList(
        (0-23): 24 x BlenderbotDecoderLayer(
          (self_attn): BlenderbotAttention(
            (k_proj): Linear(in_features=2560, out_features=2560, bias=True)
            (v_proj): Linear(in_features=2560, out_features=2560, bias=True)
            (q_proj): Linear(in_features=2560, out_features=2560, bias=True)
            (out_proj): Linear(in_features=2560, out_features=2560, bias=True)
          )
          (activation_fn): GELUActivation()
          (self_attn_layer_norm): LayerNorm((2560,), eps=1e-05, elementwise_affine=True)
          (encoder_attn): BlenderbotAttention(
            (k_proj): Linear(in_features=2560, out_features=2560, bias=True)
            (v_proj): Linear(in_features=2560, out_features=2560, bias=True)
            (q_proj): Linear(in_features=2560, out_features=2560, bias=True)
            (out_proj): Linear(in_features=2560, out_features=2560, bias=True)
          )
          (encoder_attn_layer_norm): LayerNorm((2560,), eps=1e-05, elementwise_affine=True)
          (fc1): Linear(in_features=2560, out_features=10240, bias=True)
          (fc2): Linear(in_features=10240, out_features=2560, bias=True)
          (final_layer_norm): LayerNorm((2560,), eps=1e-05, elementwise_affine=True)
        )
      )
      (layer_norm): LayerNorm((2560,), eps=1e-05, elementwise_affine=True)
    )
  )
  (lm_head): Linear(in_features=2560, out_features=8008, bias=False)
)

@kwen2501 kwen2501 merged commit fa24505 into main Dec 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants