Skip to content

Instantly share code, notes, and snippets.

@jamescalam
Created June 11, 2021 19:27
Show Gist options
  • Save jamescalam/413e7bf0905f3fb944372a6b7583eaad to your computer and use it in GitHub Desktop.
Save jamescalam/413e7bf0905f3fb944372a6b7583eaad to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
},
"orig_nbformat": 2,
"kernelspec": {
"name": "ml",
"display_name": "ML",
"language": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2,
"cells": [
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"from transformers import BertConfig\n",
"\n",
"config = BertConfig(\n",
" vocab_size=30_522, # we align this to the tokenizer vocab_size\n",
" hidden_size=768,\n",
" num_hidden_layers=12,\n",
" pad_token_id=0\n",
")"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment