Skip to content

Commit 7fe88be

Browse files
committed
Remove unnecessary validation for local global attention
1 parent f49cf00 commit 7fe88be

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

extension/llm/export/config/llm_config.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ class ModelConfig:
166166

167167
def __post_init__(self):
168168
self._validate_attention_sink()
169-
self._validate_local_global_attention()
170169

171170
if self.quantize_kv_cache and not self.use_kv_cache:
172171
raise ValueError(
@@ -186,18 +185,6 @@ def _validate_attention_sink(self):
186185
"The value of use_attention_sink must be structured like '<sink_size>,<window_size>,<batch_eviction_size>'"
187186
)
188187

189-
def _validate_local_global_attention(self):
190-
if self.local_global_attention:
191-
local_global_err = "The value of local_global_attention must be a list of integers, e.g., [0, 16, 0, 16]"
192-
try:
193-
parsed = ast.literal_eval(self.local_global_attention)
194-
if not (
195-
isinstance(parsed, list) and all(isinstance(i, int) for i in parsed)
196-
):
197-
raise ValueError(local_global_err)
198-
except Exception:
199-
raise ValueError(local_global_err)
200-
201188

202189
################################################################################
203190
################################ ExportConfig ##################################

0 commit comments

Comments
 (0)