$ whoami

Truong Duc Dung - AI Engineer. I take models out of the notebook and into production.

I focus on LLM systems that can run in production: RAG over internal data, Vietnamese model fine-tuning, inference infrastructure, and quality evaluation before product rollout. I write up what I learn in the blog below.

see projects ->read the blog

$ ls ./work --selected

04
2026

Internal document assistant

Question answering over 180,000 pages of a bank's procedures and contracts, with source citations and per-department access control.

-> 62% less time spent on manual lookup
ragpgvectorvllmfastapi
2025

Vietnamese LLM fine-tuning pipeline

End-to-end flow from collection and cleaning through LoRA training to automated evaluation, reproducible with one command.

-> experiment cycle: 9 days -> 14 hours
loraraywandbairflow
2025

Real-time transaction risk scoring

Gradient boosting model served under 40ms p99, with drift monitoring and automatic rollback.

-> 1.4M inferences per day
xgboostkafkatritongrafana
2024

eval-kit - open source evaluation library

A small toolkit for testing LLM output the way you write unit tests, used internally before it was open sourced.

-> 1,900 github stars, 40 contributors
pythonosspytest

$ cat experience.log

2023 - now
AI Engineer
Fintech product company, Hanoi

Leading a team of four building the internal LLM platform and the applications on top of it.

2021 - 2023
Machine Learning Engineer
E-commerce startup

Recommendation and inventory forecasting systems for 2M monthly active users.

2019 - 2021
Data Scientist
Data consultancy

Demand forecasting and customer segmentation models for retail and logistics clients.

$ cat stack.toml

[models]
pytorchtransformerslora/qlorarageval & benchmarkdistillation
[infra]
vllmtritonkubernetesrayairflowawsterraform
[languages]
pythongosqlduckdbpostgres/pgvectorweights & biases

$ ls ./blog

all posts ->
./gen-ai/llm-fundamentals/how llms work3 posts
2026-10-19

Why LLMs Get Things Wrong, and How We Measure It: Hallucination, Calibration, Benchmarks and LLM-as-Judge

On SimpleQA, GPT-4o-mini answers 90.5% of questions wrongly and abstains on only 0.9%. This post explains why that is not random noise: facts that appear only once in the data are where a calibrated model must make things up, and most benchmarks grade right-or-wrong, which rewards guessing. Then come calibration and ways to get a confidence score, the four components of a benchmark number (capability, what was already seen, sensitivity to how you ask, noise), contamination from the evaluator's side, and the biases of LLM-as-judge. The code measures Qwen3-0.6B's calibration on 200 MMLU questions, simulates two grading rules, and computes error bars for comparing two models.

#llm
34 min
2026-10-14

Reasoning Models and Test-Time Compute: When Thinking Longer Pays Off

DeepSeek-R1-Zero went from 15.6% to 71.0% on AIME 2024 with nothing but RL on a right-or-wrong reward, and its answers grew longer on their own during training. This post explains why writing out intermediate steps lets a model compute more, three ways to spend compute at answer time (sample many times, think in one long chain, search with step-level scoring), what happens inside GRPO and why a group of all-correct answers teaches nothing, the debate over whether RL teaches new skills or only sharpens existing ones, and the real price of thinking tokens. The code runs Qwen3-0.6B with thinking on and off on GSM8K, simulates pass@k against majority voting, and computes GRPO advantages in plain PyTorch.

#llm
36 min
2026-10-09

Mixture of Experts and Alternative Architectures: Routers, Experts, and Mamba

DeepSeek-V3 has 671B parameters but each token runs only about 37B, and Qwen3-Next stacks three Gated DeltaNet layers on every attention layer. This post opens up the router: how it picks experts, why left alone it piles everything onto a few of them, and three ways to balance the load, from an auxiliary loss to a loss-free bias. It then redoes the roofline for MoE and moves to the other direction: replacing attention with a fixed state, why pure SSMs are weak at exact recall, and why hybrids win. The code counts the parameters of nine real models from safetensors headers, writes an MoE layer in plain PyTorch, and shows that three ways of computing an SSM give the same result.

#llm
40 min
./ai-news/ai weekly2 posts
2026-10-12

AI Weekly, 12 Oct 2026: GPT-6 for Everyone, Text Watermarks in the EU and On-Device Multimodal RAG

GPT-6 reaches free ChatGPT users and builds an interface for each answer. OpenAI starts watermarking text in the EU and publishes the watermark's weak spots. Google brings multimodal embeddings onto the device, and RTX Spark laptops promise to run 100B+ parameter models locally.

#ai-news
10 min
2026-10-05

AI Weekly, 28 Sep – 5 Oct 2026: Cheaper Frontier Models, Controlled Releases and New Rules of the Game

This week three frontier models landed at roughly $2/$10 per 1M tokens, Google opened Gemini 4 Argon to cyber defenders first, and both the White House and California added new rules. Developers got new ways to hook into agents and RAG: Claude Code mods, Clef and Index-Translate.

#ai-news
9 min
./gen-ai/gen ai & application3 posts
2026-09-30

How JEV Works: Choice, Score, Noul and RLCD

One JEV call takes roughly 70–500 ms. In that window, a request made of state, a model name and typed questions goes in, and a set of probabilities comes out. This post opens each layer of that loop: the schema, the three question types, runnable code, the parallel sampler, RLCD, calibration, how to set thresholds, and the line between what TypeSafe has published and what nobody knows yet.

#decision-model
32 min
2026-09-30

The JEV Ecosystem: Official SDKs, Community Projects and Open System One Models

A compact list of the tools and repositories in the JEV ecosystem, grouped into three layers by who is responsible: official (the typesafe-ai org), community (calling the real JEV through the SDK or HTTP), and open / self-hosted (open models behind a server that speaks the same protocol). One line per tool: name, link, description.

#decision-model
5 min
2026-09-30

Decision Models: A New Branch Beside Generative LLMs

Most places we wire an LLM into software only need a decision: which team gets this ticket, should this transaction be blocked, does a person need to look. Yet we still make the model write prose and parse it back. A decision model flips that: declare the answer space first, get back a typed decision with probabilities.

#decision-model
21 min
~/contact.sh

Got an AI problem that needs to ship?

I take on architecture reviews, prototypes, and hands-on work until the system runs for real. Send a few lines of context; I reply within 48 hours.

book 20 minutes
mail truongducdung.98@gmail.com
tz   GMT+7
rep  < 48h