| { | |
| "framework": "pytorch", | |
| "task": "text2text-generation", | |
| "model": { | |
| "type": "T5", | |
| "language": "zh" | |
| }, | |
| "pipeline": { | |
| "type": "text2text-generation" | |
| }, | |
| "preprocessor": { | |
| "type": "text-gen-tokenizer" | |
| }, | |
| "train": { | |
| "work_dir": "/tmp", | |
| "max_epochs": 5, | |
| "dataloader": { | |
| "batch_size_per_gpu": 32, | |
| "workers_per_gpu": 0 | |
| }, | |
| "optimizer": { | |
| "type": "AdamW", | |
| "lr": 2e-5, | |
| "options": {} | |
| }, | |
| "lr_scheduler": { | |
| "type": "LinearLR", | |
| "start_factor": 1.0, | |
| "end_factor": 0.0, | |
| "total_iters": null, | |
| "options": { | |
| "by_epoch": false | |
| } | |
| }, | |
| "hooks": [ | |
| { | |
| "type": "TextLoggerHook", | |
| "interval": 1 | |
| }, | |
| { | |
| "type": "IterTimerHook" | |
| } | |
| ] | |
| }, | |
| "evaluation": { | |
| "dataloader": { | |
| "batch_size_per_gpu": 32, | |
| "workers_per_gpu": 0, | |
| "shuffle": false | |
| }, | |
| "metrics": [{ | |
| "type": "text-gen-metric" | |
| }] | |
| } | |
| } |