MCPcopy Create free account
hub / github.com/huggingface/transformers / create_module

Function create_module

examples/seq2seq/distillation.py:382–395  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

380
381
382def create_module(args):
383 t5 = "t5" in args.model_name_or_path
384 if args.no_teacher:
385 assert not args.enc_only
386 module_cls = SummarizationModule
387 elif t5:
388 module_cls = T5SummarizationDistiller
389 elif args.enc_only:
390 raise ValueError("Deleted that")
391 else:
392 module_cls = BartSummarizationDistiller
393 args.setup_cls: str = module_cls.__name__
394 model = module_cls(args)
395 return model
396
397
398def evaluate_checkpoint(ckpt_path: Path, dest_dir=None):

Callers 2

evaluate_checkpointFunction · 0.85
distill_mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected