跳到正文
r/MachineLearning· /u/Symeoon·· 4 小时前AI 评分41

在网页抓取数据上微调模型时踩过的坑与修复方法

What actually broke when I tried to fine-tune on web-scraped data and what fixed it [D]

AI 导读

在自采集网页数据上微调模型时,导航菜单、cookie 横幅和页脚文本等模板内容混入训练样本,导致模型输出类似半渲染 HTML 的怪异结构;改用激进的 DOM 定向提取并配合轮换住宅代理层后,原始 HTML 质量明显改善。

正文

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

Boilerplate contamination was the silent killer. Navigation menus, cookie banners, and footer text were leaking into training examples. The model started generating weirdly structured outputs that looked like half-rendered HTML. Solved it with aggressive DOM-targeting rather than raw text extraction and switching to a rotating residential proxy layer (per-request IP rotation means target sites serve you the same rendered DOM a real browser session would get, rather than a bot-filtered skeleton) made a noticeable difference in how clean the raw HTML was before I even touched the parser.

Deduplication order mattered more than I expected. Running exact dedup before fuzzy dedup produced meaningfully different training sets than the reverse. The model’s tendency to regurgitate phrasing shifted noticeably depending on the order.

The thing I still haven’t fully solved: near-duplicate detection across different languages. MinHash works fine monolingually, but multilingual dedup keeps surfacing edge cases I don’t love.

Curious whether others have hit the same issues, especially around multilingual corpora. Also genuinely wondering if anyone has a principled approach to deciding when scraped data quality is “good enough” to stop cleaning and just train.

submitted by /u/Symeoon
[link] [留言]

来源:r/MachineLearning · reddit.com