Created
November 15, 2024 00:12
-
-
Save freedomtowin/bf135fd0827cf8aa80699d171790c642 to your computer and use it in GitHub Desktop.
Example of creating a Gist using Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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