File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
tico/serialize/operators/onert Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change 4141 Tensor attention_mask,
4242 Tensor past_key,
4343 Tensor past_value,
44- Tensor cache_position,
45- int layer_idx
44+ Tensor cache_position
4645) -> Tensor
4746"""
4847)
@@ -63,8 +62,7 @@ def attention_llama(*args, **kwargs):
6362 attention_mask ,
6463 past_key ,
6564 past_value ,
66- cache_position ,
67- layer_idx ,
65+ cache_position
6866 ) = args
6967 return hidden_states
7068
@@ -104,8 +102,7 @@ def llama_attention_forward_adapter(
104102 # k_cache[0] | k_cache[1] | ... | k_cache[n]
105103 key_cache [self .layer_idx ],
106104 value_cache [self .layer_idx ], # Same to value_cache
107- cache_position ,
108- self .layer_idx ,
105+ cache_position
109106 ),
110107 None ,
111108 )
@@ -136,7 +133,6 @@ def define_node(
136133 past_key ,
137134 past_value ,
138135 cache_position ,
139- layer_idx ,
140136 ) = node .args
141137
142138 op_index = get_op_index (
@@ -153,9 +149,6 @@ def define_node(
153149 operator .builtinOptionsType = (
154150 circle .BuiltinOptions .BuiltinOptions .AttentionOptions
155151 )
156- option = circle .AttentionOptions .AttentionOptionsT ()
157- option .layer_idx = layer_idx
158-
159- operator .builtinOptions = option
152+ operator .builtinOptions = circle .AttentionOptions .AttentionOptionsT ()
160153
161154 return operator
You can’t perform that action at this time.
0 commit comments