Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save freedomtowin/bf135fd0827cf8aa80699d171790c642 to your computer and use it in GitHub Desktop.
Save freedomtowin/bf135fd0827cf8aa80699d171790c642 to your computer and use it in GitHub Desktop.
Example of creating a Gist using Python
from transformers import BertConfig, BertModel
bert_config = BertConfig.from_pretrained("bert-base-cased" , num_hidden_Iayers=10)
bert_model = BertModel(bert_config)
#### Training Code ####
bert_model.save_pretrained("my-bert-model")
bert_model = BertModel.from_pretrained("my-bert-model")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment