Notes
Two minutes. Then you know a little more.
NLP boiled down. From foundations to advanced techniques, simplified and packed into a short note.
Starter packs
Categories
54 notes
GPU utilization is the wrong question
Seeing 95% GPU utilization feels reassuring. The expensive hardware is busy, so the workload must be well optimized.
The evaluation set becomes part of the product
The first evaluation set for an AI system is usually built before anyone knows how the system will fail.
False positives are an architecture decision
A similarity threshold looks like a model parameter until the system gives it consequences.
When the model stops being the bottleneck
A machine learning project can change character without changing its model.
Speaker embeddings
Speaker embeddings make voice matching look almost trivial.
Direct Preference Optimization (DPO)
Suppose you show someone two responses to the same prompt and ask which one they prefer.
Prompt injection and guardrails
Prompt injection becomes much more consequential once a model can do something.
Serving LLMs in production
LLM inference is partly a scheduling and memory problem disguised as a model call.
Structured outputs
Free-form language is an excellent interface for people. It is usually a bad interface between software components.
RAG failure modes
RAG failures become easier to debug once “RAG quality” stops being treated as one thing.
Evaluating LLM products
The useful unit of evaluation for an LLM product is usually not the completion. It is the task.
Tool-calling agents
Function calling gives a model an interface to software. An agent appears when you put that capability inside a control loop.
Mixed Precision vs. Quantization
Mixed precision and quantization are two techniques that can significantly reduce the memory and computational requirements of AI models.
Prompt Chaining
Prompt chaining is a technique that involves combining multiple prompts to generate more complex and nuanced responses from AI models.
Reinforcement Learning from Human Feedback (RLHF)
RLHF is a method that incorporates human feedback into the training process of AI models. Unlike traditional training, which relies solely on datasets and metrics, RLHF uses human evaluators to guide the model's learning.
Vector Databases in NLP
Vector databases are a powerful tool for storing and querying high-dimensional vectors. They are very useful in comparison and search tasks in NLP
Exploring LangChain
LangChain is a tool for building AI applications. It simplifies the process by making it easier to connect and manage the various components.
The Art of Fine-Tuning
Finetuning is the magic wand that transforms a general-purpose AI model into a domain-specific maestro.
How Prompt Engineering Shapes AI Interactions
Prompt engineering is the art of crafting the perfect question or instruction to elicit the desired response from an AI model.
Retrieval-Augmented Generation (RAG)
RAG combines the best of both worlds: the vast knowledge of a search engine and the creative storytelling of a language model.
OpenAI Function Calling
Imagine asking your AI assistant to not only remind you of an upcoming meeting but also to book the venue, send invitations, and update your calendar, all seamlessly.
Optimizing Transformer Architectures for Specific NLP Tasks
Transformers have revolutionized natural language processing (NLP), offering remarkable results across a wide range of tasks.
Analyzing Attention Maps in Transformer Models
At its core, the attention mechanism allows Transformers to focus on different parts of input sequences when processing data. Attention maps are essentially heatmaps
Gradient Accumulation in Training Large NLP Models
Gradient accumulation is a technique that allows us to train large NLP models with limited memory. It involves splitting the training batch into smaller batches
Cross-Lingual NLP: Challenges and Solutions
Cross-lingual NLP is a field that aims to develop models that can process text in multiple languages. It has many applications, from machine translation to sentiment analysis
Evaluating NLP Models: Metrics and Benchmarks
Evaluating NLP models is a crucial step in the model development process. It allows us to determine whether a model is performing as expected and identify areas for improvement
Data Collators in Machine Learning
At its core, a data collator is an object that assembles a batch of data from a list of dataset elements. These elements share the same data type as those of the training or evaluation.
Causal vs. Masked Language Modeling
In the realm of CLM, language models are trained with a unidirectional focus. This means that the model's training objective is to predict the next word or token in a sequence
Packing in Transformer Models
Packing involves concatenating multiple tokenized sequences into a single input, which we can aptly refer to as a 'pack.' This method has become increasingly important as many datasets exhibit skewed length distributions.
Quantization: Shrinking Model Sizes for Efficient AI
Quantization involves performing computations and storing tensors at lower bitwidths than traditional floating-point precision, effectively reducing the memory and processing requirements of AI models.
Low-Rank Adaptation (LoRA)
LoRA is one of the widely used PEFT methods. Even in most cases when someone says PEFT, they typically mean LoRA only.
Parameter-Efficient Fine-Tuning (PEFT)
PEFT methods focus on fine-tuning only a limited subset of additional model parameters, significantly reducing both computational and storage requirements while maintaining performance similar to fully fine-tuned models.
Hugging Face: The Open-Source Hub for NLP
Hugging Face is an open-source platform that provides a treasure trove of pre-trained models for a wide range of NLP tasks.
Text Summarization Techniques in NLP
Text summarization is a technique that involves generating a shorter version of a given text while preserving its meaning and key points
Weights and Biases (W&B): The Ultimate Experiment Tracker
The pursuit of model development, training, and optimization often feels like a complex journey into uncharted territory.
Text Generation Models: From GPT to BERT
Text generation is a technique that involves generating text from a given input. It has many applications in NLP, including machine translation
Named Entity Recognition (NER): A Beginner's Guide
Named Entity Recognition (NER) is a technique that involves identifying and classifying named entities in text data. It has many applications
BERT vs. RoBERTa: A Comparative Analysis
BERT and RoBERTa are two popular language models that have achieved state-of-the-art results across a wide range of NLP tasks. They were both developed by researchers at Facebook
BERT: Bidirectional Encoder Representations from Transformers
BERT is a state-of-the-art language model that has achieved remarkable results across a wide range of NLP tasks. It was developed by researchers at Google
Sequence-to-Sequence Learning: Architectures and Applications
Sequence-to-sequence learning is a technique that involves mapping an input sequence to an output sequence. It has many applications in NLP
Callbacks
Callbacks are specialized objects that play a crucial role in customizing the behavior of the training loop within the PyTorch Trainer. These objects offer a unique vantage point
Attention Mechanisms in NLP: A Mathematical Deep Dive
Attention mechanisms are a key component of many state-of-the-art NLP models. They allow the model to focus on specific parts of the input sequence
Understanding the Limitations and Challenges of Natural Language Processing
Natural Language Processing has come a long way in recent years, and its applications are becoming increasingly diverse and sophisticated. However, despite its rapid
The Science Behind NLP: A Look into Linguistics and Machine Learning
NLP is a field that combines computer science, linguistics, and machine learning to help computers understand, interpret, and generate human language.
Advanced Techniques for Handling Imbalanced NLP Datasets
Imbalanced datasets are a common challenge in NLP. This is because many real-world datasets are skewed towards a particular class or category
The Ethics of NLP: Exploring the Challenges of Bias and Privacy
Natural Language Processing (NLP) is an exciting field that has seen rapid progress in recent years, thanks to advancements in machine learning and artificial intelligence.
Introduction to Text Classification
Text classification is a natural language processing (NLP) technique that involves automatically categorizing text into different classes or categories.
How to Build an Effective Machine Translation System
Machine translation is the process of automatically translating text from one language to another. While the accuracy of machine translation has improved significantly in recent years
Getting Started with NLP
Getting started with NLP (Natural Language Processing) can be a daunting task, especially if you are new to the field. But fear not! With the right tools and mindset
Introduction to Text Similarity Metrics
Text similarity metrics are a class of algorithms that measure the similarity between two texts. They are commonly used in NLP tasks such as machine translation
What's Deep Learning
Deep learning, a subfield of artificial intelligence, has been making waves in technology and science. In this blog post, we'll break down
Deep Learning: The basics
Understanding essential concepts is essential. Let's embark on a journey through the core elements that power NLP with deep learning
NLP vs. Machine Learning: What's the Difference?
Natural Language Processing (NLP) and Machine Learning (ML) are two commonly used terms in the field of Artificial Intelligence (AI). While they are related
Word Embeddings vs. Subword Tokenization in NLP
Word embeddings and subword tokenization are two popular techniques for representing text data in NLP. While they both have their advantages
