From 3a51ad38e54ec81d3e16e66c969f414c8d35fae5 Mon Sep 17 00:00:00 2001 From: ys44kim Date: Fri, 13 Sep 2024 11:24:04 +0900 Subject: [PATCH 1/4] [circleschema] add RoPE operation ONE-DCO-1.0-Signed-off-by: youngsik kim draft : 13978 issue : 13972 --- nnpackage/schema/circle_schema.fbs | 11 +++++++++++ res/CircleSchema/0.9/circle_schema.fbs | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/nnpackage/schema/circle_schema.fbs b/nnpackage/schema/circle_schema.fbs index 0498318bfce..266ba93767c 100644 --- a/nnpackage/schema/circle_schema.fbs +++ b/nnpackage/schema/circle_schema.fbs @@ -286,6 +286,7 @@ table Tensor { // set of acceptable options. // LINT.IfChange enum BuiltinOperator : int32 { + ROPE = -7, RMS_NORM = -6, GRU = -5, BCQ_GATHER = -4, @@ -636,6 +637,7 @@ union BuiltinOptions { BitcastOptions, BitwiseXorOptions, RightShiftOptions, + RoPEOptions = 249, RmsNormOptions = 250, GRUOptions = 251, BCQGatherOptions = 252, @@ -1525,6 +1527,15 @@ table RmsNormOptions { epsilon:float; } +enum RoPEMode : int { + GPT_NEOX, + GPT_J, +} + +table RoPEOptions { + mode: RoPEMode; +} + // An OperatorCode can be an enum value (BuiltinOperator) if the operator is a // builtin, or a string if the operator is custom. table OperatorCode { diff --git a/res/CircleSchema/0.9/circle_schema.fbs b/res/CircleSchema/0.9/circle_schema.fbs index 0498318bfce..266ba93767c 100644 --- a/res/CircleSchema/0.9/circle_schema.fbs +++ b/res/CircleSchema/0.9/circle_schema.fbs @@ -286,6 +286,7 @@ table Tensor { // set of acceptable options. // LINT.IfChange enum BuiltinOperator : int32 { + ROPE = -7, RMS_NORM = -6, GRU = -5, BCQ_GATHER = -4, @@ -636,6 +637,7 @@ union BuiltinOptions { BitcastOptions, BitwiseXorOptions, RightShiftOptions, + RoPEOptions = 249, RmsNormOptions = 250, GRUOptions = 251, BCQGatherOptions = 252, @@ -1525,6 +1527,15 @@ table RmsNormOptions { epsilon:float; } +enum RoPEMode : int { + GPT_NEOX, + GPT_J, +} + +table RoPEOptions { + mode: RoPEMode; +} + // An OperatorCode can be an enum value (BuiltinOperator) if the operator is a // builtin, or a string if the operator is custom. table OperatorCode { From d0324d1785fdd38c35b6c2f018b520908be5b811 Mon Sep 17 00:00:00 2001 From: ys44kim Date: Tue, 24 Sep 2024 10:10:24 +0900 Subject: [PATCH 2/4] [circleschema] update revision history ONE-DCO-1.0-Signed-off-by: youngsik kim draft: #13978 issue: #13972 --- res/CircleSchema/0.9/circle_schema.fbs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/res/CircleSchema/0.9/circle_schema.fbs b/res/CircleSchema/0.9/circle_schema.fbs index 266ba93767c..869ba2229e6 100644 --- a/res/CircleSchema/0.9/circle_schema.fbs +++ b/res/CircleSchema/0.9/circle_schema.fbs @@ -33,7 +33,8 @@ // Version 0.6: Base up to TensorFlow Lite v2.13.0 schema. // Version 0.7: Base up to TensorFlow Lite v2.15.0 schema, deprecate data_format in Subgraph table // Version 0.8: GRU op is added. UINT4 is added. -// Version 0.9: GGML_Q{X}_{Y} types are added. Weight compression option is added +// Version 0.9: GGML_Q{X}_{Y} types are added. Weight compression option is added. + ROPE op is added. namespace circle; From 1581c64bc90b893e61d7b052ba88404a7bd8d577 Mon Sep 17 00:00:00 2001 From: ys44kim Date: Tue, 24 Sep 2024 11:11:08 +0900 Subject: [PATCH 3/4] [circleschema] update nnpackage revision history ONE-DCO-1.0-Signed-off-by: youngsik kim draft: #13978 issue: #13972 --- nnpackage/schema/circle_schema.fbs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nnpackage/schema/circle_schema.fbs b/nnpackage/schema/circle_schema.fbs index 266ba93767c..869ba2229e6 100644 --- a/nnpackage/schema/circle_schema.fbs +++ b/nnpackage/schema/circle_schema.fbs @@ -33,7 +33,8 @@ // Version 0.6: Base up to TensorFlow Lite v2.13.0 schema. // Version 0.7: Base up to TensorFlow Lite v2.15.0 schema, deprecate data_format in Subgraph table // Version 0.8: GRU op is added. UINT4 is added. -// Version 0.9: GGML_Q{X}_{Y} types are added. Weight compression option is added +// Version 0.9: GGML_Q{X}_{Y} types are added. Weight compression option is added. + ROPE op is added. namespace circle; From eb9757f91feb67e63c96d16e2055fb7a06e874c3 Mon Sep 17 00:00:00 2001 From: ys44kim Date: Tue, 24 Sep 2024 11:15:49 +0900 Subject: [PATCH 4/4] [circleschema] add comment ONE-DCO-1.0-Signed-off-by: youngsik kim draft: #13978 issue: #13972 --- nnpackage/schema/circle_schema.fbs | 2 +- res/CircleSchema/0.9/circle_schema.fbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nnpackage/schema/circle_schema.fbs b/nnpackage/schema/circle_schema.fbs index 869ba2229e6..e13bd3842cb 100644 --- a/nnpackage/schema/circle_schema.fbs +++ b/nnpackage/schema/circle_schema.fbs @@ -34,7 +34,7 @@ // Version 0.7: Base up to TensorFlow Lite v2.15.0 schema, deprecate data_format in Subgraph table // Version 0.8: GRU op is added. UINT4 is added. // Version 0.9: GGML_Q{X}_{Y} types are added. Weight compression option is added. - ROPE op is added. +// ROPE op is added. namespace circle; diff --git a/res/CircleSchema/0.9/circle_schema.fbs b/res/CircleSchema/0.9/circle_schema.fbs index 869ba2229e6..e13bd3842cb 100644 --- a/res/CircleSchema/0.9/circle_schema.fbs +++ b/res/CircleSchema/0.9/circle_schema.fbs @@ -34,7 +34,7 @@ // Version 0.7: Base up to TensorFlow Lite v2.15.0 schema, deprecate data_format in Subgraph table // Version 0.8: GRU op is added. UINT4 is added. // Version 0.9: GGML_Q{X}_{Y} types are added. Weight compression option is added. - ROPE op is added. +// ROPE op is added. namespace circle;