Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

4.4 KB
Raw Blame
ir_version: 10
graph {
  node {
    input: "query"
    input: ""
    input: ""
    input: "past_key"
    input: "past_value"
    input: "seqlens_k"
    input: "total_sequence_length"
    input: "cos_cache"
    input: "sin_cache"
    input: ""
    input: ""
    input: ""
    input: ""
    input: ""
    input: "q_norm_weight"
    input: "k_norm_weight"
    output: "output"
    output: "present_key"
    output: "present_value"
    name: "GroupQueryAttention_0"
    op_type: "GroupQueryAttention"
    attribute {
      name: "do_rotary"
      i: 1
      type: INT
    }
    attribute {
      name: "kv_num_heads"
      i: 1
      type: INT
    }
    attribute {
      name: "local_window_size"
      i: -1
      type: INT
    }
    attribute {
      name: "num_heads"
      i: 2
      type: INT
    }
    attribute {
      name: "rotary_interleaved"
      i: 0
      type: INT
    }
    attribute {
      name: "smooth_softmax"
      i: 0
      type: INT
    }
    attribute {
      name: "softcap"
      f: 0
      type: FLOAT
    }
    attribute {
      name: "qk_norm_epsilon"
      f: 1e-05
      type: FLOAT
    }
    domain: "com.microsoft"
  }
  name: "GroupQueryAttention_QKNorm_Graph"
  initializer {
    dims: 16
    data_type: 1
    name: "q_norm_weight"
    float_data: 0.5
    float_data: 0.6
    float_data: 0.7
    float_data: 0.8
    float_data: 0.9
    float_data: 1
    float_data: 1.1
    float_data: 1.2
    float_data: 1.3
    float_data: 1.4
    float_data: 1.5
    float_data: 1.6
    float_data: 1.7
    float_data: 1.8
    float_data: 1.9
    float_data: 2
  }
  initializer {
    dims: 16
    data_type: 1
    name: "k_norm_weight"
    float_data: 1.5
    float_data: 1.45
    float_data: 1.4
    float_data: 1.35
    float_data: 1.3
    float_data: 1.25
    float_data: 1.2
    float_data: 1.15
    float_data: 1.1
    float_data: 1.05
    float_data: 1
    float_data: 0.95
    float_data: 0.9
    float_data: 0.85
    float_data: 0.8
    float_data: 0.75
  }
  input {
    name: "query"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim { dim_param: "batch_size" }
          dim { dim_param: "sequence_length" }
          dim { dim_value: 64 }
        }
      }
    }
  }
  input {
    name: "past_key"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim { dim_param: "batch_size" }
          dim { dim_value: 1 }
          dim { dim_param: "past_sequence_length" }
          dim { dim_value: 16 }
        }
      }
    }
  }
  input {
    name: "past_value"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim { dim_param: "batch_size" }
          dim { dim_value: 1 }
          dim { dim_param: "past_sequence_length" }
          dim { dim_value: 16 }
        }
      }
    }
  }
  input {
    name: "seqlens_k"
    type {
      tensor_type {
        elem_type: 6
        shape {
          dim { dim_param: "batch_size" }
          dim { dim_value: 1 }
        }
      }
    }
  }
  input {
    name: "total_sequence_length"
    type{
      tensor_type {
        elem_type: 6
        shape {
        }
      }
    }
  }
  input {
    name: "cos_cache"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim { dim_param: "max_sequence_length" }
          dim { dim_value: 8 }
        }
      }
    }
  }
  input {
    name: "sin_cache"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim { dim_param: "max_sequence_length" }
          dim { dim_value: 8 }
        }
      }
    }
  }
  output {
    name: "output"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim { dim_param: "batch_size" }
          dim { dim_param: "sequence_length" }
          dim { dim_value: 32 }
        }
      }
    }
  }
  output {
    name: "present_key"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim { dim_param: "batch_size" }
          dim { dim_value: 1 }
          dim { dim_param: "total_sequence_length" }
          dim { dim_value: 16 }
        }
      }
    }
  }
  output {
    name: "present_value"
    type {
      tensor_type {
        elem_type: 1
        shape {
          dim { dim_param: "batch_size" }
          dim { dim_value: 1 }
          dim { dim_param: "total_sequence_length" }
          dim { dim_value: 16 }
        }
      }
    }
  }
}
opset_import {
  version: 11
}
opset_import {
  domain: "com.microsoft"
  version: 1
}