All bites
The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.
4330 bites
Page 46
Closed API vs open-weight models for production
APIs offer top quality and zero ops but recurring per-token cost and data-sharing concerns, open weights give control, privacy, and tuning at the price of hosting and MLOps burden.
Hugging Face Hub, transformers, and datasets
The Hub hosts models and data, transformers loads models and tokenizers and provides the Trainer, datasets streams and maps preprocessing.
Mixture of Experts architecture and routing
Many expert FFNs per layer, a router picks top-k experts per token, only those compute so active params are far fewer than total.
Designing a production LLM summarization eval
A representative gold set, quality via human or LLM-as-judge plus faithfulness checks, and operational metrics like p95 latency and cost per request.
Multimodal video understanding architecture
Sample frames, encode them into visual tokens via a vision encoder and projector, concatenate with text tokens, let cross-attention fuse them.
Three techniques to cut LLM inference latency
Quantization shrinks weights with small accuracy risk, KV-cache plus continuous batching boost throughput, speculative decoding drafts tokens for lossless speedup.
LSTM vs GRU gating and trade-offs
LSTM has three gates and a separate cell state, GRU merges gates and state into two, so GRU is lighter and faster while LSTM may model long dependencies better.
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.
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…
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.
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…
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.
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.
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.
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…
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.
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.
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.
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.
Preprocessing conversations to protect privacy before fine-tuning
Detect and redact PII with NER plus regex, choose redaction versus pseudonymization, and validate recall.