LLM Learning Hub

workspace/llm-course/home

Text Representation

Text representation is the process of converting human language into numerical form so machines can process it. It spans from simple bag-of-words to dense learned embeddings.

What is Text Representation?

Text representation is the process of converting human language into numerical form so machines can process it. It spans from simple bag-of-words to dense learned embeddings.

Text representation is the process of converting human language into numerical form so machines can process it. It spans from simple bag-of-words to dense learned embeddings.

Where is it used?

Before transformers, TF-IDF and word2vec were standard; modern LLMs represent text as sequences of dense token embeddings fed directly into transformer layers.

How to build it

Compare `sklearn.feature_extraction.text.TfidfVectorizer` with `torch.nn.Embedding` outputs on the same sentences to contrast sparse vs dense representations.