# MLM Using AlBert - No loss error

**URL:** <https://discuss.huggingface.co/t/mlm-using-albert-no-loss-error/41748>\
**Category:** 🤗Transformers\
**Created:** [June 1, 2023, 7:28am UTC](https://discuss.huggingface.co/t/mlm-using-albert-no-loss-error/41748 "2023-06-01T07:28:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![raygx](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/raygx/32/17328_2.png) [@raygx](https://discuss.huggingface.co/u/raygx)\
**Post date:** [June 1, 2023, 7:28am UTC](https://discuss.huggingface.co/t/mlm-using-albert-no-loss-error/41748/1 "2023-06-01T07:28:17Z")

</div>

I’m getting this error while trying to train Albert model MLM task. (albert-xlarge-v2)

WARNING:tensorflow:Gradients do not exist for variables [‘tf\_albert\_for\_masked\_lm/predictions/bias:0’] when minimizing the loss. If you’re using `model.compile()`, did you forget to provide a `loss` argument?

The problem is not the warning but what happens next. The colab notebook just crashes and runtime is closed.

It’s not the memory issue (I am using only 10,000 lines of text for MLM which after preparation drops down to 4000 lines)
