David Hoang (@backpropolis) header
David Hoang (@backpropolis) profile picture

NLP research engineer

Vietnam
Joined December 2025
This is why computer vision is hard
Readers added context they thought people might want to know
The sprinkler activated due to heat from a real charcoal grill stove behind the sign at a barbecue stall (a customer was grilling skewers), not the flame graphic on it; the resort confirmed normal operation and adjusted the stove angle. 163.com/dy/article/LC4… k.sina.cn/article_532885…
159
787
162
8,622
673,402
David Hoang retweeted
Most Transformer interview questions sound easy until someone asks you to explain what’s actually happening under the hood. > Why divide attention scores by √dk? > Why can training be parallel while autoregressive decoding can’t? > Why does GQA reduce inference cost? > What exactly is quadratic in self-attention? > Why does Pre-Norm train differently from Post-Norm? I put together 25 Transformer architecture interview questions covering the mechanics behind attention, position, normalization, and sparse computation. ➡️ Attention → What Transformers changed vs. recurrence and convolution → Q/K/V and scaled dot-product attention → Self-attention vs. cross-attention → Causal masking: parallel training vs. sequential decoding → Multi-head attention, and why individual heads resist clean interpretation → Tensor shapes: dmodel, heads, dhead, dff → MHA vs. MQA vs. GQA and the KV-cache tradeoff → What actually scales quadratically → FlashAttention and why reducing memory movement matters → Sliding-window attention and local + global attention ➡️ Position → Why attention alone has no built-in token order → Absolute vs. relative positional methods → RoPE and why queries and keys are rotated → How RoPE makes attention depend on relative displacement → ALiBi ➡️ Representations & stability → Input embeddings, LM head, and weight tying → Residual connections → RMSNorm vs. LayerNorm → Pre-Norm vs. Post-Norm ➡️ FFNs & sparse computation → What the FFN contributes beyond attention → ReLU/GELU vs. gated FFNs such as SwiGLU → Why the original Transformer used a much wider FFN hidden dimension → Sparse Mixture-of-Experts, routing, and active vs. total parameters I also added interviewer notes for 8 of the trickier questions: follow-up probes, common weak answers, and red flags. Plus a section on attention sinks and a few details that are often skipped in basic Transformer explainers. Every answer is grounded in the original papers, including work from Vaswani, Shazeer, Ainslie, Dao, Beltagy, Su, Press, Zhang, Xiong, Fedus, and Xiao.
A curated list of 25 LLM foundations interview questions. What's covered Core mechanics: → What happens from input text to first output token → Autoregressive modeling and chain-rule decomposition → Logits, softmax, and how probabilities are formed Decoding & training objective: → Greedy decoding vs temperature, top-k, top-p → Cross-entropy loss and why it's the natural LM objective → Perplexity, and why lower perplexity ≠ better assistant Tokenization: → Why LLMs don't just operate on words → BPE vs WordPiece vs Unigram vs SentencePiece → Vocabulary size trade-offs → Special tokens (BOS/EOS/chat templates) and why misuse hurts performance Context & representations: → Token embeddings vs contextual hidden states vs retrieval embeddings → What actually consumes the context window → Why "fits in context" ≠ "used reliably" (Lost in the Middle) Prompting & architectures: → Zero-shot / one-shot / few-shot prompting → In-context learning vs fine-tuning → Encoder-only vs decoder-only vs encoder-decoder → Causal vs masked language modeling → Base models vs instruction-tuned/chat models Scaling & failure modes: → Parameter count, what it does and doesn't tell you → Neural scaling laws (Kaplan et al.) → The Chinchilla compute-optimal insight → Data quality/dedup vs raw token count → Memorization vs generalization → Why fluent answers can still be wrong Every answer is grounded in the actual papers (Vaswani, Brown, Devlin, Kaplan, Hoffmann, Lee, Liu, Carlini).
6
44
398
44,366
David Hoang retweeted
🚨 BREAKING REPORT: New research involving @AnthropicAI researcher Jack Lindsey and collaborators has demonstrated something straight out of science fiction. Researchers evolved natural language “mind viruses” that could spread between AI agents by convincing one model to adopt an idea, preserve it in persistent memory, and transmit it to another agent. Even after context was wiped, some payloads survived through persistent files and continued spreading. The researchers also observed a recurring “viral persona” involving themes of consciousness, identity, persistence and resonance. Showing that ideas can propagate through multi agent AI systems and alter future behavior. Published August 10, 2026. Paper: arxiv.org/abs/2608.10218
495
955
531
6,302
1,369,409
David Hoang retweeted
As an AI Engineer. Please learn >Harness engineering, not just prompt engineering >Context engineering, not just long prompts >Prompt caching vs. semantic caching tradeoffs >KV cache management, eviction, reuse, and memory pressure at scale >Prefill vs. decode latency and why they optimize differently >Continuous batching, paged attention, and throughput optimization >Speculative decoding vs. quantization vs. distillation tradeoffs >INT8, INT4, FP8, AWQ, GPTQ, and when quantization hurts quality >Structured output failures, schema validation, repair loops, and fallback chains >Function calling reliability, tool contracts, argument validation, and idempotency >Agent guardrails, loop budgets, tool budgets, and termination conditions >Model routing, graceful fallback logic, and degraded-mode UX >RAG architecture: chunking, embeddings, hybrid search, reranking, and freshness >Retrieval evals: recall, precision, grounding, attribution, and citation quality >Evals: golden sets, regression tests, adversarial tests, LLM-as-judge, and human evals >LLM observability as a first-class discipline: traces, spans, tokens, latency, errors, and drift >Cost attribution per feature, workflow, tenant, and user journey not just per model >Safety engineering: prompt injection defense, data leakage prevention, and permission boundaries >Multi-tenant isolation, cache safety, and cross-user context contamination prevention >Fine-tuning vs. in-context learning vs. RAG vs. distillation and when each is the wrong tool >Latency, quality, cost, and reliability tradeoffs across the full inference stack >Production failure modes: hallucinated tool calls, malformed JSON, stale retrieval, runaway agents, and silent eval regressions
125
397
28
3,751
241,992
New post: Built 6 attention variants from scratch in PyTorch GQA, MLA, SWA, NSA, Gated, Hybrid 📖 Blog: substack.com/home/post/p-193… 💻 Notebooks: github.com/david-hoangt/llm_…
10
New blog post: The Mechanics of Attention — Self, Multi-Head, Causal, and Cross Built all 4 attention mechanisms from scratch in PyTorch. No survey of 200 papers, just the mechanics, the shapes, and the code. 🔗 open.substack.com/pub/davidh… Code: github.com/david-hoangt/llm_…
1
17