MCPcopy Create free account
hub / github.com/OpenGVLab/EfficientQAT / PPLvalCallback

Class PPLvalCallback

main_e2e_qp.py:431–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429
430 if args.do_ppl_eval:
431 class PPLvalCallback(transformers.TrainerCallback):
432 @torch.no_grad()
433 def on_evaluate(self, args=None, state=None, control=None, model=None, **kwargs):
434 results = test_ppl(trainer.model, trainer.tokenizer, datasets=['wikitext2','c4'],ppl_seqlen=2048)
435 logger.info(results)
436 trainer.log(results)
437
438 trainer.add_callback(PPLvalCallback)
439

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected