you might want to save the quantized_model using
save_torchscript_model(model=quantized_model, model_dir=model_dir, model_filename=quantized_model_filename)

and load the script in the other place for inference:
quantized_jit_model = load_torchscript_model(model_filepath=quantized_model_filepath, device=cpu_device)
quantized_jit_model.eval()
outputs = quantized_jit_model(inputs)