LocalLLM Forum — Run it locally. Own your models.

Synthetic data pipelines — filtering out model-echo artifacts

M posted by MateusKeller #datasets#fine-tuning#prompting 4 posts 1,530 views
M

Every synthetic pipeline I've reviewed this month has the same disease: the generator model's tics get baked into the training data, and the fine-tune learns to be a chatbot imitating a chatbot. Here's the filter chain that fixed it for me.

The pipeline

1. generate   — Qwen2.5 72B Instruct Q5 via vLLM on the 4090 box, 120k seeds
2. dedupe     — MinHash, Jaccard cutoff 0.72, plus 5-gram overlap sweep
3. de-echo    — strip model-echo artefacts (see below)
4. score      — reward-model filter, keep top 60% by preference score
5. mix        — 70% synthetic / 30% human seed data, shuffled per epoch

What "model echo" looks like

  • Hedging openers — "Certainly!", "Of course!", "Great question!" — the generator's assistant-persona leaking into assistant training targets.
  • Instruction restatement — responses that begin by paraphrasing the prompt back before answering.
  • Signature phrases — "Here's a breakdown", "In summary", the em-dash-heavy cadence the base model over-uses.
  • Self-referential drift — "As an AI language model…" appearing in fictional dialogue samples.

Stage 3 removes about 9% of raw generations and, more importantly, the 2% it removes is concentrated in the longest responses — exactly the ones the reward model otherwise scores highest.

Ryzen 7950X + RTX 4090 · São Paulo
E

Can confirm the scale of this — I profiled a 40k-sample set generated with Llama 3.1 8B Instruct and 11% of responses opened with "Certainly". After de-echo filtering, my eval loss dropped measurably and the fine-tune stopped sounding like it was about to offer me a helpful bullet-point list.

My stage 3, for comparison: a regex pass for the openers and self-references, then a small classifier (DistilBERT fine-tuned on 2k hand-labelled examples) for the restatement cases the regex can't catch. The classifier catches about a third more than regex alone.

One warning: don't filter too aggressively. I stripped every "In summary" once and the fine-tune lost the ability to conclude long answers at all — some of the echo is just… how conclusions work.

Node 304 · 4070 Ti Super · 24 dB(A) under load
I

Mod hat on for a moment: this thread is exactly what the wiki's new synthetic data checklist page needed — I've linked both the pipeline and Elif's classifier approach from it.

Two housekeeping requests:

  • Keep the filter configuration in the dataset card when you publish. A synthetic set without its de-echo parameters isn't reproducible.
  • The usual rule applies to generator choice — open-weight models are fine, leaked bases are not. Synthetic output inherits the licence questions of the generator, so note which model produced the data.

And a technique note: MinHash on its own misses near-duplicates that differ only in the echo phrases — run the de-echo pass before the dedupe pass, or you'll keep five copies of the same answer with five different "Certainly!" prefixes.

"Pushing 24GB to its limits since 2023." — Ingrid Marchetti, Bergen
T
M MateusKeller replied
…reward-model filter, keep top 60% by preference score…

Ran the A/B on this last week and the numbers back the whole chain up. Two QLoRA runs on Qwen2.5 7B Instruct (4-bit NF4, rank 32, same hyperparameters), one on the raw synthetic set and one on the filtered version:

                       raw set      filtered set
500-prompt eval        61.4%        64.5%
hedging in outputs     frequent     rare
"as an AI" leaks       14 hits      0 hits

Same base model, same LoRA rank, same seed — the only variable was the filter chain, and it bought 3.1 points plus a model that no longer introduces itself mid-story. The de-echo stage is doing most of the work; the reward-model top-60% cut added maybe half a point on its own.

"If it fits in VRAM, it ships." — Tomás Beaumont, Porto
Want to join the discussion? Register or log in to reply. Register Log in
Reply
Ctrl+Enter to submit
post 1 of 4