Save only Bert Model after training a Sequence Classification Task/ LM finetuning Task. 
## ❓ Questions & Help

<!-- A clear and concise description of the question. -->
1) How do I save only the BERT Model after finetuning on a Sequence Classification Task/ LM finetuning Task
2) How to load only BERT Model from a saved model trained on Sequence Classification Task/ LM finetuning Task
By saving only BERT, do you mean saving only the transformer and not the classification layer as well?<|||||>@rahulbaburaj  you can use the code snippet below, change the 'bert-base-uncased' to your fine-tuned model directory.

```python
# load config
conf = BertConfig.from_pretrained('bert-base-uncased', num_labels=2)
# load a sequence model
bsm = BertForTokenClassification.from_pretrained('bert-base-uncased', config=conf)
# get bert core model
bcm = bsm.bert
# save the core model
bcm.save_pretrained('the output directory path')
# you also need to save your tokenizer in the same directory
```<|||||>@FacingBugs Thank you. 