code: def create_quantized_model(model):
      llama_config = model.config
      for i, layer in enumerate(model.model.layers):
          model.model.layers[i] = LlamaSmoothquantDecoderLayer(
              llama_config
          )
  
      model.model.forward = types.MethodType(
          llama_model_forward, model.model
      )
      cos, sin = init_to_get_rotary(llama_config)
      model.model.register_buffer("_cos_cached", cos)
      model.model.register_buffer("_sin_cached", sin)
  
imports: import math
  import os
  import types
  from collections import defaultdict
  from functools import partial
  from typing import List, Optional, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
  from torch_int.nn.bmm import BMM_S8T_S8N_F32T, BMM_S8T_S8N_S8T
  from transformers import PreTrainedModel
  from transformers.modeling_outputs import BaseModelOutputWithPast
  from transformers.models.llama.configuration_llama import LlamaConfig
  from transformers.models.llama.modeling_llama import LLAMA_INPUTS_DOCSTRING, LlamaAttention, LlamaDecoderLayer, LlamaMLP, LlamaRotaryEmbedding, repeat_kv, rotate_half
  from transformers.utils import add_start_docstrings_to_model_forward
  from colossalai.inference.tensor_parallel.batch_infer_state import BatchInferState
  from colossalai.kernel.triton import copy_kv_cache_to_dest, int8_rotary_embedding_fwd, smooth_llama_context_attn_fwd, smooth_token_attention_fwd
  from .base_model import BaseSmoothForCausalLM
  from .linear import W8A8B8O8Linear, W8A8BFP32O32LinearSiLU, W8A8BFP32OFP32Linear
label_desc: Use image node_id 4 for calling the SmoothLlamaForCausalLM obj's underlying member method code with example usage: obj.create_quantized_model(model) without return types