Evaluate matched half-size trajectory distillation updates

This commit is contained in:
2026-11-26 15:12:33 +08:00
parent 6baff1af4a
commit a5978c0840
5 changed files with 238 additions and 2 deletions
+2 -2
View File
@@ -61,7 +61,7 @@ def replay_teacher_inputs(tail, path, ids, start, lengths):
return target, residual, donor
def validate_checkpoint(model, tokenizer, adapters, questions, decode_spec, path):
def validate_checkpoint(model, tokenizer, adapters, questions, decode_spec, path, *, split_name='validation'):
label = path.stem
rows = json.loads(path.read_text()) if path.exists() else []
if rows:
@@ -73,7 +73,7 @@ def validate_checkpoint(model, tokenizer, adapters, questions, decode_spec, path
rows.extend(outputs)
write_json(path, rows)
correct = sum(row['arms'][label]['correct'] for row in rows)
print(label, 'validation correct', correct, '/', len(rows), flush=True)
print(label, split_name, 'correct', correct, '/', len(rows), flush=True)
def main():