tensorflow/models · error · ValueError

We only support 'inner_group_num' and 'num_hidden_groups' as

Error message

We only support 'inner_group_num' and 'num_hidden_groups' as 1.

What it means

Error "We only support 'inner_group_num' and 'num_hidden_groups' as 1." thrown in tensorflow/models.

Source

Thrown at official/legacy/albert/configs.py:41

  """Configuration for `ALBERT`."""

  def __init__(self, num_hidden_groups=1, inner_group_num=1, **kwargs):
    """Constructs AlbertConfig.

    Args:
      num_hidden_groups: Number of group for the hidden layers, parameters in
        the same group are shared. Note that this value and also the following
        'inner_group_num' has to be 1 for now, because all released ALBERT
        models set them to 1. We may support arbitary valid values in future.
      inner_group_num: Number of inner repetition of attention and ffn.
      **kwargs: The remaining arguments are the same as above 'BertConfig'.
    """
    super(AlbertConfig, self).__init__(**kwargs)

    # TODO(chendouble): 'inner_group_num' and 'num_hidden_groups' are always 1
    # in the released ALBERT. Support other values in AlbertEncoder if needed.
    if inner_group_num != 1 or num_hidden_groups != 1:
      raise ValueError("We only support 'inner_group_num' and "
                       "'num_hidden_groups' as 1.")

  @classmethod
  def from_dict(cls, json_object):
    """Constructs a `AlbertConfig` from a Python dictionary of parameters."""
    config = AlbertConfig(vocab_size=None)
    for (key, value) in six.iteritems(json_object):
      config.__dict__[key] = value
    return config

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/legacy/albert/configs.py:41 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/21bae245efaf50ac. Report an issue: GitHub.