# How to resume language modeling training with flax?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-resume-language-modeling-training-with-flax%2F19808%3E%5C
**Category:** 🤗Transformers\
**Created:** [June 29, 2022, 6:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-resume-language-modeling-training-with-flax%2F19808 "2022-06-29T18:56:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emanuel](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/emanuel/32/20406_2.png) [@Emanuel](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FEmanuel)%5C
**Post date:** [June 29, 2022, 6:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-resume-language-modeling-training-with-flax%2F19808%2F1 "2022-06-29T18:56:10Z")

</div>

I know that Trainer has an [easy way](https://github.com/huggingface/transformers/issues/7198) to resume training. Nonetheless, the mlm [script](https://github.com/huggingface/transformers/blob/main/examples/flax/language-modeling/run_mlm_flax.py) for flax does not contain this functionality. How the training could be resumed with flax in mlm? (restoring weights, optimizer state, etc)
