How to convert the ALBERT tfhub model to pytorch model?
## ❓ Questions & Help

<!-- A clear and concise description of the question. -->
I want to apply ALBERT to other QA datasets. But the first question is how to convert the tf_hub model. I downloaded the tfhub model from the repo "google research".  The script ```convert_albert_original_tf_checkpoint_to_pytorch.py``` need the parameter ```--tf_checkpoint_path```. I attempted the directory 'variables', 'assets' and the root directory but all failed.  I haven't solve it by document. Is there some demos for ALBERT?
Hi, if you ran the script `run_pretraining.py` in the original ALBERT repo, you should have put as argument an `--output_dir=dir`. In that directory should be several files, among which `model.ckpt-xxx.index`, `model.ckpt-xxx.meta`, `checkpoint` and `model.ckpt-xxx.data-xxxxx-of-xxxxx`.

You can pass this as argument to `convert_albert_original_tf_checkpoint_to_pytorch`: `--tf_checkpoint_path=dir/model.ckpt-xxx`.

A few changes to the script were done today so you might want to install from source to be sure it loads fine.<|||||>But I don't have the resources to pretrain my own ALBERT model, I just want to fine-tune the pretrained ALBERT-base model for my task. Are there some other methods to use the google's tfhub model in pytorch? Or if there is other pretrained ckpt type models I can download.<|||||>Yeah you can just load them using our API:

```py
from transformers import AlbertModel

model = AlbertModel.from_pretrained("albert-base-v1")
```