def METHOD_NAME(self, input):
    # train with QuantNoise and evaluate the fully quantized network
    p = self.p if self.training else 1
    # update parameters every 1000 iterations
    if self.counter % self.update_step == 0:
        self.scale = None
        self.zero_point = None
    self.counter += 1
    # quantize weight
    weight_quantized, self.scale, self.zero_point = emulate_int(
        self.weight.detach(),
        bits=self.bits,
        method=self.method,
        scale=self.scale,
        zero_point=self.zero_point,
    )
    # mask to apply noise
    mask = torch.zeros_like(self.weight)
    mask.bernoulli_(1 - p)
    noise = (weight_quantized - self.weight).masked_fill(mask.bool(), 0)
    # using straight-through estimator (STE)
    clamp_low = -self.scale * self.zero_point
    clamp_high = self.scale * (2**self.bits - 1 - self.zero_point)
    weight = (
        torch.clamp(self.weight, clamp_low.item(), clamp_high.item())
        + noise.detach()
    )
    # return output
    output = F.embedding(
        input,
        weight,
        self.padding_idx,
        self.max_norm,
        self.norm_type,
        self.scale_grad_by_freq,
        self.sparse,
    )
    return output