Operation process details
Crawl4LLM的使用主要分为三个关键步骤:
- 配置爬取任务::
- 在configs目录创建YAML配置文件
- 设置关键参数如数据集路径、线程数、最大文档数等
- 推荐选择
dclm_fasttext_score
作为selection_method
- Running the crawler: Implementation
python crawl.py crawl --config configs/my_config.yaml
- Data Capture::
- utilization
fetch_docs.py
将文档ID转换为文本 - transferring entity
access_data.py
检查特定文档内容
- utilization
practical skill
- 启用wandb日志记录便于分析爬取过程
- 16核CPU建议设置
num_workers:16
- 处理亿级数据时建议预留数百GB磁盘空间
- SSD存储能显著提升大规模数据集处理速度
This answer comes from the articleCrawl4LLM: An Efficient Web Crawling Tool for LLM PretrainingThe