code: def test_linear_quant_inner_product_3bit(self):
      pytest.xfail(
          "rdar://101370330 ([CI] nnv1 model compression tests are failing after roots is updated)"
      )
      W = np.reshape(np.arange(6), (2, 3)).astype(np.uint8)
      input_features = [("data", datatypes.Array(3))]
      output_features = [("probs", None)]
      builder = NeuralNetworkBuilder(input_features, output_features)
      builder.add_inner_product(
          name="ip1",
          W=_convert_array_to_nbit_quantized_bytes(
              W.flatten(), 3
          ).tobytes(),
          b=None,
          input_channels=3,
          output_channels=2,
          has_bias=False,
          input_name="data",
          output_name="probs",
          quantization_type="linear",
          nbits=3,
          quant_scale=[11.0, 2.0],
          quant_bias=[-2.0, 10.0],
      )
      mlmodel = MLModel(builder.spec)
      data = np.array([1.0, 3.0, 5.0])
      data_dict = {"data": data}
      probs = mlmodel.predict(data_dict)["probs"]
      expected_out = np.array([125, 170])
      self.assertTrue(
          np.allclose(probs.flatten(), expected_out.flatten())
      )
  
imports: import numpy
  import pytest
  import unittest
  import coremltools
  from coremltools import ComputeUnit
  from coremltools.converters.mil.mil.types.type_mapping import np_val_to_py_type
  from coremltools.models import MLModel, datatypes
  from coremltools.models.neural_network import NeuralNetworkBuilder
  from coremltools.models.neural_network.quantization_utils import _convert_array_to_nbit_quantized_bytes, quantize_weights
  from coremltools.models.utils import _is_macos, _macos_version
label_desc: Use image node_id 6 for calling the BasicNumericCorrectnessTest_1014NewLayers obj's underlying member method code with example usage: obj.test_linear_quant_inner_product_3bit() without return types