From the course: Applied AI: Getting Started with Hugging Face Transformers

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Understanding the model architecture

Understanding the model architecture

- [Instructor] While we simply use the pipeline to execute out of the box models, it is also important to understand the underlying model, it's architecture, and hyper parameters. If we just print the model attribute of the pipeline object, it'll print out a model architecture graph that helps us understand the structure behind the scenes. Let's explore the ner model this way. Let's execute the model command. This shows the model graph. The name shows as BERTForTokenClassification which mentions the architecture and its purpose. The embeddings branch show information about the word embeddings used. The embedding has 28,996 tokens in its vocabulary with each token having a vector size of 1024. Then comes position embeddings. There are 512 rows which points to the maximum sentence length supported. The vector length is the same as the word embedding, which is 1024. Normalization and dropout information are also shown.…

Contents