Skip to content

Random weights during forward #1

Description

@XinDongol

In thoughts_forward (

def thoughts_forward(self, num_thoughts, thought_ids, thought_mask, num_of_thought_tokens = 1):
), there are some 'random layers'.

For instance, for each forward pass, thought_proj has random weights:

thought_proj = nn.Sequential(
    nn.Linear(last_hidden.shape[-1], self.config.hidden_size // 2),
    nn.LayerNorm(self.config.hidden_size // 2),
    nn.GELU()
).to(last_hidden.device)

In addition, embed_proj also has random weights:

embed_proj = nn.Linear(
    self.config.hidden_size // 2,
    self.config.hidden_size,
    device=projected_thought.device
)

Are they designed on purpose?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions