Canstralian's picture
Create hf_model/pytorch_model.bin
8bdcd41 verified
from transformers import BertForSequenceClassification
model = BertForSequenceClassification.from_pretrained('bert-base-uncased', num_labels=2)
model.save_pretrained('./hf_model')