fine-tuning

Why raw web data broke your fine-tuning and how DOM targeting fixed it

Boilerplate contamination is the silent killer of fine-tuning, and this post names it clearly.

3 min readMachine Learning

The boilerplate problem described here is the kind of silent failure that derails months of work, and it deserves more attention than it gets. When your fine-tuned model starts generating outputs that look like half-rendered HTML, the culprit isn't your architecture or your learning rate, it's the cookie banners and navigation menus you assumed your parser was smart enough to ignore. The solution, aggressive DOM-targeting paired with residential proxy rotation, is a pragmatic fix that points to a deeper truth: raw web data is never clean enough to trust at face value. This aligns with what we've explored in The Four Data Flaws That Slip Past Every Validation Check, where seemingly trivial contamination passes every schema test and null check. The difference here is that the contamination isn't just noisy, it actively teaches your model to mimic broken markup.

The deduplication ordering observation is the kind of detail that separates teams who ship reliable models from those who chase ghost regressions. Running exact dedup before fuzzy dedup changes the training set meaningfully, and the model's tendency to regurgitate phrasing shifts as a result. This is not a theoretical concern; it is a practical decision point that affects what your model learns to repeat. The fact that the same pipeline with inverted dedup steps produces measurably different behavior means this is not a minor implementation detail. It is a design choice that deserves the same scrutiny as your learning rate schedule. For anyone building on scraped data, this is a concrete takeaway: test both orders and measure the impact on output diversity before committing.

The unsolved problem of multilingual near-duplicate detection is where this story becomes genuinely useful for the broader community. MinHash works well enough for a single language, but cross-lingual dedup introduces edge cases that don't have a clean solution yet. This is not a failure of the approach; it is a signal that the field still lacks principled methods for deciding when scraped data is good enough to stop cleaning and train. That question, when is "good enough" actually good enough, is the one that separates practical pipelines from academic exercises. Until someone publishes a robust framework for cross-lingual dedup, the honest answer is that you stop cleaning when your validation loss stops improving, and not a moment sooner. That is not satisfying, but it is honest, and it is the kind of practical reality that Know when to keep or remove outliers with data-driven confidence speaks to directly. The next time your model starts generating odd structures, check your boilerplate before you blame your hyperparameters.

From Machine Learning

Fine tuning on self collected web data felt straightforward until it wasn’t. Here’s what actually caused problems:

Read the original at Machine Learning