环境准备步骤
安装Crawl4LLM需要进行以下系统配置:
- Python要求:确保安装Python 3.10或更高版本
- 虚拟环境创建::
- Linux/Mac.
python -m venv crawl4llm_env && source crawl4llm_env/bin/activate
- Windows.
python -m venv crawl4llm_env && crawl4llm_envScriptsactivate
- Linux/Mac.
- Source code acquisition::
git clone https://github.com/cxcscmu/Crawl4LLM.git
- Dependent Installation: Go to the project directory and execute
pip install -r requirements.txt
- 分类器下载:将DCLM fastText分类器模型文件放入
fasttext_scorers/
catalogs
special attention
- 使用ClueWeb22数据集需提前申请访问权限
- 建议将大规模数据集存储在SSD上以提高IO性能
- 确保网络畅通以下载所有依赖包
This answer comes from the articleCrawl4LLM: An Efficient Web Crawling Tool for LLM PretrainingThe