Skip to content

Model dimensions from constructor arguments stay wildcarded on layer inputs and logits #809

Description

@khatchad

Three wildcard axes in the gpt-2 subject are pinnable but left open, all the same shape: a model dimension that reaches a layer through a constructor argument.

  • OutputLayer.call's x is inferred float32 (None, None, None). Its final axis is the embedding width, which arrives as the constructor argument at Gpt2 and is read back in the body with tf.shape(x)[-1] rather than as a static dimension.
  • Gpt2.get_loss's pred and Gpt2.get_padded_accuracy's logits are inferred float32 (None, None, None). Their final axis is the output width of the same layer, constructed as OutputLayer(self.vocab_size), whose body reshapes to [batch, sequence, self.output_dim].

In both cases the value is a literal default on a command-line option in the entry script, threaded through the model constructor to the layer. It is a fixed integer at runtime, never None, so these are precision gaps rather than deliberate wildcards, and the derivation is static: fold the default through the constructor to the stored attribute, then to the layer's declared output dimension.

The batch and sequence axes on the same parameters are genuinely variable and correctly wildcarded, so only the final axis is at issue.

Scope note: a run overriding the option changes the constant, so any recovered value is the default-configuration one. That is the same status as other config-derived sizes the analysis reports as fixed-but-uncomputable.

The call sites and line numbers behind each axis are recorded alongside the analysis notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions