class_docstr: Quantized BERT token classification head with linear classifier.
  This head's forward ignores word piece tokens in its linear layer.
  
  The forward requires an additional 'valid_ids' map that maps the tensors
  for valid tokens (e.g., ignores additional word piece tokens generated by
  the tokenizer, as in NER task the 'X' label).
code: def forward(
      self,
      input_ids,
      token_type_ids=None,
      attention_mask=None,
      labels=None,
      position_ids=None,
      head_mask=None,
      valid_ids=None,
  ):
      return _bert_token_tagging_head_fw(
          self,
          input_ids,
          token_type_ids=token_type_ids,
          attention_mask=attention_mask,
          labels=labels,
          head_mask=head_mask,
          valid_ids=valid_ids,
      )
  
imports: import logging
  from typing import List, Union
  import torch
  from torch.nn import CrossEntropyLoss, Dropout, Linear
  from torch.nn import functional
  from torch.utils.data import DataLoader, SequentialSampler, TensorDataset
  from transformers import ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP, BertForTokenClassification, BertPreTrainedModel, RobertaConfig, RobertaModel, XLNetModel, XLNetPreTrainedModel
  from nlp_architect.data.sequential_tagging import TokenClsInputExample
  from nlp_architect.models.transformers.base_model import InputFeatures, TransformerBase
  from nlp_architect.models.transformers.quantized_bert import QuantizedBertForTokenClassification
  from nlp_architect.utils.metrics import tagging
label_desc: Use image node_id 1 for calling the QuantizedBertForTokenClassificationHead obj's underlying member method code with example usage: obj.forward(input_ids, token_type_ids, attention_mask, labels, position_ids, head_mask, valid_ids) and returns: _bert_token_tagging_head_fw