code: def toggle_8bit(self, mode: bool):
      def _toggle_8bit(module):
          if isinstance(module, QuantizedLayer):
              module.mode_8bit = mode
  
      self.apply(_toggle_8bit)
      if mode:
          training = self.training
          self.eval()
          self.train(training)
  
imports: import logging
  import os
  import sys
  import torch
  from torch import nn
  from transformers.modeling_bert import ACT2FN, BertAttention, BertConfig, BertEmbeddings, BertEncoder, BertForQuestionAnswering, BertForSequenceClassification, BertForTokenClassification, BertIntermediate, BertLayer, BertLayerNorm, BertModel, BertOutput, BertPooler, BertPreTrainedModel, BertSelfAttention, BertSelfOutput
  from nlp_architect.models.pretrained_models import S3_PREFIX
  from nlp_architect.nn.torch.quantization import QuantizationConfig, QuantizedEmbedding, QuantizedLayer, QuantizedLinear
label_desc: Use image node_id 4 for calling the QuantizedBertPreTrainedModel obj's underlying member method code with example usage: obj.toggle_8bit(mode) without return types