Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

8664 bites

Page 31

LLMs & Generative AI1 min read

How Transformers encode token position

Attention is permutation-invariant, so positional encodings (sinusoidal, learned, or rotary) are added or applied.

LLMs & Generative AI2 min read

Self-attention and the Query, Key, Value matrices

Queries score against keys via scaled dot product, softmax yields weights, and those weight the values into the output.

LLMs & Generative AI2 min read

Why RAG persists despite million-token context windows

Cost and latency scale with context, attention degrades in the middle, and RAG adds freshness, access control, and citations.

LLMs & Generative AI2 min read

Designing an autonomous research-and-report agent

Planner that decomposes goals, short-term scratchpad plus long-term vector memory, structured tool calls, and a reflect-retry loop for error correction.

LLMs & Generative AI1 min read

Data lineage and machine unlearning for a fine-tuned LLM

Version and fingerprint datasets, record transforms and which checkpoint saw what, and enable unlearning via retraining, data sharding, or approximate gradient methods.

LLMs & Generative AI1 min read

Practical explainability for an LLM loan summary

Use attribution-by-design with grounded citations, structured rationales, and a deterministic rules layer instead of slow per-token SHAP.

LLMs & Generative AI1 min read

Measuring fairness in an embedding-based text classifier

Define group definitions, apply demographic parity and equalized odds, and address noisy labels and implicit group membership.

LLMs & Generative AI1 min read

Preprocessing conversations to protect privacy before fine-tuning

Detect and redact PII with NER plus regex, choose redaction versus pseudonymization, and validate recall.

LLMs & Generative AI1 min read

Mitigating demographic bias in a fine-tuned chatbot

Curate or counterfactually augment training data to balance demographics, plus apply post-hoc guardrails or fairness-constrained fine-tuning.

LLMs & Generative AI2 min read

Handling outlier activations in INT8 quantization

Profile activation magnitudes to find a few large-magnitude outlier channels, then keep those in higher precision while quantizing the rest, a mixed-precision decomposition.

LLMs & Generative AI2 min read

Dynamic batching and the throughput-latency trade-off

The server groups concurrent requests into one batch to use the GPU fully, but larger batches and waiting to fill them raise per-request latency and time to first token.

LLMs & Generative AI2 min read

Detecting catastrophic forgetting in continual fine-tuning

Maintain a frozen held-out benchmark of original capabilities, evaluate after every fine-tune, track per-capability deltas, and alert on regressions.

LLMs & Generative AI2 min read

Agent planning beyond a ReAct loop

ReAct adapts step by step but costs many calls, plan-then-execute drafts a full plan upfront for fewer calls but is brittle to surprises, hierarchical decomposition splits goals…

LLMs & Generative AI2 min read

Evaluating a multi-tool LLM agent

Measure end-to-end task success, plus trajectory quality like correct tool choice and arguments, efficiency via steps and cost, and robustness to errors and edge cases.

LLMs & Generative AI2 min read

Chunking and embedding a RAG corpus

Choose chunk size and overlap balancing context vs precision, prefer semantic boundaries, then pick an embedding model matching domain and dimension, and store with metadata.

LLMs & Generative AI1 min read

When to choose RAG over fine-tuning

RAG for fresh, factual, citable knowledge that changes often, fine-tuning for behavior, style, or format the model must internalize.

LLMs & Generative AI2 min read

Diagnosing sycophancy from RLHF

Annotators reward agreeable, inoffensive answers so the reward model learns to favor them, fix by diversifying labelers, rewarding factual correctness over agreeableness, and…

LLMs & Generative AI1 min read

Fixing a prompt that ignores key constraints

Move the critical constraint to a prominent position, state it positively and specifically, separate instructions from data with delimiters, and add a concrete example.

LLMs & Generative AI1 min read

Encoder, decoder, and encoder-decoder Transformers

Encoder-only uses bidirectional masked-token pretraining for understanding tasks, decoder-only uses causal next-token prediction for generation, encoder-decoder uses span corruption for…

LLMs & Generative AI1 min read

Static vs contextual word embeddings

Static embeddings give one fixed vector per word ignoring context, contextual ones vary by sentence and resolve polysemy at higher compute cost.