tf_model = TFDistilBertModel.from_pretrained("distilbert/distilbert-base-uncased")

When you load pretrained weights, the default model configuration is automatically loaded if the model is provided by 🤗 Transformers. However, you can still replace - some or all of - the default model configuration attributes with your own if you'd like:

tf_model = TFDistilBertModel.from_pretrained("distilbert/distilbert-base-uncased", config=my_config)