docstr: The number of attention heads attribute retrieved from the model config. Override this for model configs where
  the number of attention heads attribute is not called `num_attention_heads`.
docstr_tok: ["The","number","of","attention","heads","attribute","retrieved","from","the","model","config",".","Override","this","for","model","configs","where","the","number","of","attention","heads","attribute","is","not","called","`","num_attention_heads","`","."]
code: def num_attention_heads(self) -> int:
      """
      The number of attention heads attribute retrieved from the model config. Override this for model configs where
      the number of attention heads attribute is not called `num_attention_heads`.
      """
      if not hasattr(self._config, "num_attention_heads"):
          raise AttributeError(
              "could not find the number of attention heads attribute in the model configuration, override the"
              " num_attention_heads property of the model OnnxConfig to solve this"
          )
      return self._config.num_attention_heads
  
imports: import copy
  import dataclasses
  import warnings
  from abc import ABC, abstractmethod
  from collections import OrderedDict
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Mapping, Optional, Tuple, Union
  import numpy
  from packaging import version
  from ..utils import TensorType, is_torch_available, is_vision_available, logging
  from .utils import ParameterFormat, compute_effective_axis_dimension, compute_serialized_parameters_size
label_desc: Use image node_id 6 for calling the OnnxConfigWithPast obj's underlying member method code with example usage: obj.num_attention_heads() and returns: self