# Fine tuning for summarization script error

**URL:** <https://discuss.huggingface.co/t/fine-tuning-for-summarization-script-error/22009>\
**Category:** Intermediate\
**Created:** [August 24, 2022, 12:16am UTC](https://discuss.huggingface.co/t/fine-tuning-for-summarization-script-error/22009 "2022-08-24T00:16:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samuel-Fipps](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@Samuel-Fipps](https://discuss.huggingface.co/u/Samuel-Fipps)\
**Post date:** [August 24, 2022, 12:16am UTC](https://discuss.huggingface.co/t/fine-tuning-for-summarization-script-error/22009/1 "2022-08-24T00:16:39Z")

</div>

Hello I’m trying to run the fine tuning for summarization but i’m getting this error.

> usage: run\_summarization\_no\_trainer.py [-h] [–dataset\_name DATASET\_NAME]  
> [–dataset\_config\_name DATASET\_CONFIG\_NAME]  
> [–train\_file TRAIN\_FILE]  
> [–validation\_file VALIDATION\_FILE]  
> [–ignore\_pad\_token\_for\_loss IGNORE\_PAD\_TOKEN\_FOR\_LOSS]  
> [–max\_source\_length MAX\_SOURCE\_LENGTH]  
> [–source\_prefix SOURCE\_PREFIX]  
> [–preprocessing\_num\_workers PREPROCESSING\_NUM\_WORKERS]  
> [–overwrite\_cache OVERWRITE\_CACHE]  
> [–max\_target\_length MAX\_TARGET\_LENGTH]  
> [–val\_max\_target\_length VAL\_MAX\_TARGET\_LENGTH]  
> [–max\_length MAX\_LENGTH]  
> [–num\_beams NUM\_BEAMS]  
> [–pad\_to\_max\_length]  
> [–model\_name\_or\_path MODEL\_NAME\_OR\_PATH]  
> [–config\_name CONFIG\_NAME]  
> [–tokenizer\_name TOKENIZER\_NAME]  
> [–text\_column TEXT\_COLUMN]  
> [–summary\_column SUMMARY\_COLUMN]  
> [–use\_slow\_tokenizer]  
> [–per\_device\_train\_batch\_size PER\_DEVICE\_TRAIN\_BATCH\_SIZE]  
> [–per\_device\_eval\_batch\_size PER\_DEVICE\_EVAL\_BATCH\_SIZE]  
> [–learning\_rate LEARNING\_RATE]  
> [–weight\_decay WEIGHT\_DECAY]  
> [–num\_train\_epochs NUM\_TRAIN\_EPOCHS]  
> [–max\_train\_steps MAX\_TRAIN\_STEPS]  
> [–gradient\_accumulation\_steps GRADIENT\_ACCUMULATION\_STEPS]  
> [–lr\_scheduler\_type {linear,cosine,cosine\_with\_restarts,polynomial,constant,constant\_with\_warmup}]  
> [–num\_warmup\_steps NUM\_WARMUP\_STEPS]  
> [–output\_dir OUTPUT\_DIR] [–seed SEED]  
> [–model\_type {albert,bart,beit,bert,bert-generation,big\_bird,bigbird\_pegasus,blenderbot,blenderbot-small,bloom,camembert,canine,clip,codegen,convbert,convnext,ctrl,cvt,data2vec-audio,data2vec-text,data2vec-vision,deberta,deberta-v2,decision\_transformer,deit,detr,distilbert,donut-swin,dpr,dpt,electra,flaubert,flava,fnet,fsmt,funnel,glpn,gpt2,gpt\_neo,gpt\_neox,gptj,groupvit,hubert,ibert,imagegpt,layoutlm,layoutlmv2,layoutlmv3,led,levit,longformer,longt5,luke,lxmert,m2m\_100,marian,maskformer,mbart,mctct,megatron-bert,mobilebert,mobilevit,mpnet,mt5,mvp,nezha,nystromformer,openai-gpt,opt,owlvit,pegasus,perceiver,plbart,poolformer,prophetnet,qdqbert,reformer,regnet,rembert,resnet,retribert,roberta,roformer,segformer,sew,sew-d,speech\_to\_text,splinter,squeezebert,swin,swinv2,t5,tapas,trajectory\_transformer,transfo-xl,unispeech,unispeech-sat,van,videomae,vilt,vision-text-dual-encoder,visual\_bert,vit,vit\_mae,wav2vec2,wav2vec2-conformer,wavlm,xglm,xlm,xlm-prophetnet,xlm-roberta,xlm-roberta-xl,xlnet,yolos,yoso}]  
> [–push\_to\_hub]  
> [–hub\_model\_id HUB\_MODEL\_ID]  
> [–hub\_token HUB\_TOKEN]  
> [–checkpointing\_steps CHECKPOINTING\_STEPS]  
> [–resume\_from\_checkpoint RESUME\_FROM\_CHECKPOINT]  
> [–with\_tracking]  
> [–report\_to REPORT\_TO]  
> run\_summarization\_no\_trainer.py: error: unrecognized arguments:  
> ./sumtrainer.sh: line 2: --model\_name\_or\_path: command not found  
> ./sumtrainer.sh: line 3: --config\_name: command not found  
> ./sumtrainer.sh: line 4: --do\_train: command not found  
> ./sumtrainer.sh: line 5: --dataset\_name: command not found  
> ./sumtrainer.sh: line 6: --dataset\_config: command not found  
> ./sumtrainer.sh: line 7: --source\_prefix: command not found  
> ./sumtrainer.sh: line 8: --output\_dir: command not found  
> ./sumtrainer.sh: line 9: --preprocessing\_num\_workers=: command not found  
> ./sumtrainer.sh: line 10: --per\_device\_train\_batch\_size: command not found  
> ./sumtrainer.sh: line 11: --per\_device\_eval\_batch\_size: command not found  
> ./sumtrainer.sh: line 12: --overwrite\_output\_dir: command not found  
> ./sumtrainer.sh: line 13: --predict\_with\_generate: command not found  
> ./sumtrainer.sh: line 14: --num\_beams: command not found  
> ./sumtrainer.sh: line 15: --pad\_to\_max\_length: command not found  
> ./sumtrainer.sh: line 16: --tokenizer\_name: command not found

here is the script file

> python3 run\_summarization\_no\_trainer.py   
> –model\_name\_or\_path “/media/New Volume/models/t5-efficient-xl-nl28”   
> –config\_name “/media/New Volume/models/t5-efficient-xl-nl28”   
> –do\_train   
> –dataset\_name “xsum”   
> –dataset\_config “train”   
> –source\_prefix "summarize: "   
> –output\_dir “/media/New Volume/models/nl28”   
> –preprocessing\_num\_workers= “16”  
> –per\_device\_train\_batch\_size “4”   
> –per\_device\_eval\_batch\_size “4”   
> –overwrite\_output\_dir “media/New Volume/models/need to make/cachedir”   
> –predict\_with\_generate   
> –num\_beams “10”   
> –pad\_to\_max\_length “max\_length”   
> –tokenizer\_name “google/t5-efficient-xl-nl28”

The summarization file hasn’t been touched either.

> <https://github.com/huggingface/transformers/blob/main/examples/pytorch/summarization/run_summarization_no_trainer.py>
