We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2e96e51 + 3affa19 commit 42a94c5Copy full SHA for 42a94c5
tabmemcheck/functions.py
@@ -468,10 +468,12 @@ def header_test(
468
)
469
prefixes = [data[:offset]]
470
suffixes = [data[offset : offset + completion_length]]
471
- few_shot = [
472
- ([fs_data[:offset]], [fs_data[offset : offset + completion_length]])
473
- for fs_data in few_shot_data
474
- ]
+
+ few_shot = []
+ for fs_data in few_shot_data:
+ fs_offset = min(offset, len(fs_data) // 2)
475
+ few_shot.append(([fs_data[:fs_offset]],
476
+ [fs_data[fs_offset : fs_offset + completion_length]]))
477
478
# chat mode: use few-shot examples
479
if llm.chat_mode:
0 commit comments