NLP & Language Models Virtual Lab

Explore Natural Language Processing and modern language models interactively

🔤

Word Embeddings

Word2Vec, GloVe, and semantic spaces

👁️

Attention Mechanism

Self-attention and multi-head attention

🤖

Transformer Architecture

Encoder-decoder and BERT/GPT models

✂️

Tokenization

BPE, WordPiece, and subword tokenization

🔄

Sequence-to-Sequence

Translation and text generation

😊

Sentiment Analysis

Text classification and emotion detection

Word Embeddings: Semantic Vector Spaces

Word embeddings represent words as dense vectors in a continuous space where semantically similar words are closer together.

Famous Word Analogy:

kingman+womanqueen\text{king} - \text{man} + \text{woman} \approx \text{queen}

Vector arithmetic captures semantic relationships!

Select Word

Most Similar Words:

boy100.0% similar
prince99.1% similar
queen99.0% similar

2D Embedding Space

Red = Selected word | Blue = Other words

Embedding Techniques

Word2Vec

Skip-gram & CBOW models

Predicts context from word or vice versa

GloVe

Global Vectors

Uses word co-occurrence statistics

FastText

Subword embeddings

Handles out-of-vocabulary words