# Are albert-base-v1( and v2) pretrained enough?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fare-albert-base-v1-and-v2-pretrained-enough%2F11061%3E%5C
**Category:** 🤗Transformers\
**Created:** [October 25, 2021, 6:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fare-albert-base-v1-and-v2-pretrained-enough%2F11061 "2021-10-25T18:28:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hojin](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hojin/32/2972_2.png) [@hojin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhojin)%5C
**Post date:** [October 25, 2021, 6:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fare-albert-base-v1-and-v2-pretrained-enough%2F11061%2F1 "2021-10-25T18:28:07Z")

</div>

Hi all,

I have questions on [albert-base-v1](https://huggingface.co/albert-base-v1) and v2 models uploaded in the huggingface model hub. I’ve checked the MLM loss of albert base models using book corpus dataset and squad context data(which is basically similar to Wikipedia data) based on [this example script](https://github.com/huggingface/transformers/blob/master/examples/pytorch/language-modeling/run_mlm.py) from transformer repo, in order to validate initial model performance (without additional training). It appears that the average MLM losses are around 2.5(squad context) and 3.2(book corpus) in albert-base-v1, which is much worse than I expected given that those two datasets must have been used for the pertaining albert base model. The value was much worse in v2.

I would like to ask whether albert-base models are trained until the losses converge, or the model has been trained on one or two epochs. Also, it would be great if there is an actual training script and/or MLM loss history on albert pertaining models.

Thanks!  
Hojin

---

<div class="post-metadata">

**Author:** ![BramVanroy](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bramvanroy/32/47360_2.png) [@BramVanroy](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBramVanroy)%5C
**Post date:** [October 25, 2021, 6:31pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fare-albert-base-v1-and-v2-pretrained-enough%2F11061%2F2 "2021-10-25T18:31:26Z")

</div>

The models on the hub are not trained by HuggingFace (unless explicitly mentioned), so the weights are the original implementation weights, ported/converted to the implementation by HF. Whether or not the model is trained “well enough” is a question for the original authors of the model.

---

<div class="post-metadata">

**Author:** ![hojin](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hojin/32/2972_2.png) [@hojin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhojin)%5C
**Post date:** [October 25, 2021, 8:57pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fare-albert-base-v1-and-v2-pretrained-enough%2F11061%2F3 "2021-10-25T20:57:51Z")

</div>

Thanks for the reply @BramVanroy! And thanks a lot for correcting me. I was wondering why the weights for sentence order prediction (SOP) classification (or next sentence prediction) weights are not ported/converted, while it is provided by the original implementation? Thanks!

---

<div class="post-metadata">

**Author:** ![BramVanroy](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/bramvanroy/32/47360_2.png) [@BramVanroy](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBramVanroy)%5C
**Post date:** [October 26, 2021, 8:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fare-albert-base-v1-and-v2-pretrained-enough%2F11061%2F4 "2021-10-26T08:19:55Z")

</div>

As far as I know the BERT NSP weights are present when you use `BertForPreTraining` or `BertForNextSentencePrediction`. But you are right that `AlbertForPreTraining` does not seem to load the SOP weights, and there is no specific SOP-only model definition. I am not sure why that is the case.

---

<div class="post-metadata">

**Author:** ![hojin](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/hojin/32/2972_2.png) [@hojin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fhojin)%5C
**Post date:** [October 26, 2021, 12:24pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fare-albert-base-v1-and-v2-pretrained-enough%2F11061%2F5 "2021-10-26T12:24:39Z")

</div>

Thanks, @BramVanroy.
