Skip to content

Commit 1fbd28a

Browse files
committed
new changes in caches
1 parent 215cca6 commit 1fbd28a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

_unittests/ut_torch_models/test_tiny_llms.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def test_tiny_llm_export_dynamic(self):
3737
dynamic_shapes=use_dyn_not_str(data["dynamic_shapes"]),
3838
)
3939
got = ep.module()(**inputs)
40-
print(ep)
4140
self.assertEqualArrayAny(expected, got)
4241

4342
@requires_transformers("4.52")

onnx_diagnostic/helpers/cache_helper.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ def __init__(self):
265265
self.num_attention_heads = key_value_pairs[0][0].shape[1]
266266
self.num_hidden_layers = len(key_value_pairs)
267267

268+
def get_text_config(self):
269+
return self
270+
268271
assert max_cache_len is not None, (
269272
f"max_cache_len={max_cache_len} cannot be setup "
270273
f"automatically yet from shape {key_value_pairs[0][0].shape}"

0 commit comments

Comments
 (0)