Evaluate matched half-size trajectory distillation updates
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user