43 Commits

Author SHA1 Message Date
xming521 446df58a6c refactor(infer): streamline online model scoring and error handling
- Replaced the previous batch processing logic with a more robust implementation that utilizes guided decoding for improved result parsing.
- Enhanced error logging for failed parsing attempts, providing clearer warnings for issues encountered during inference.
- Updated the score mapping to utilize the new parsed results structure, ensuring accurate score assignment to QA pairs.
2026-01-04 18:14:57 +08:00
xming521 a0829d2098 feat(cleaning): add batch processing for online LLM
Introduce a ThreadPoolExecutor in the OnlineLLM class to enable
concurrent API calls, significantly boosting throughput for LLM operations.
Refactor the OlineLLMCleaningStrategy to leverage this new batching
capability, allowing multiple data points to be processed in parallel.

Increase the default `clean_batch_size` in settings and enhance
`n_process`/`batch_size` for PII detection to optimize for the new
concurrency. Simplify prompt management by removing a dedicated prompt
for online LLM cleaning. Add context manager support to OnlineLLM for
reliable resource cleanup. Ensure LLM chat responses explicitly request
JSON format.
2025-08-28 21:30:05 +08:00
xming521 e90f05c12a refactor(data): improve data cleaning robustness
Allow `vllm_infer` to return `None` for failed JSON parsing results,
clarifying the sequence index for such failures. This enables
`LLMCleaningStrategy` to robustly align parsed LLM scores with original data,
correctly handling examples where JSON parsing failed by assigning a default
score of 0.

Adds an option to disable data cleaning during training setup.
2025-08-17 14:30:17 +08:00
xming521 41167f6d29 fix(dataset): fix #192 standardize dataset naming and cleaning workflow
Refactors dataset management to consistently append '-vl' for vision-language
datasets and dynamically name cleaned datasets (e.g., 'dataset-cleaned').

Enforces vLLM as a strict dependency for LLM-based data cleaning, exiting if
unavailable. Integrates 'enable_thinking' option for LLM cleaning and enables
cleaning by default in relevant test configurations.

Adds torchvision dependency for vision models and streamlines the cleaning call
in training to centralize decision-making.
2025-08-16 22:51:29 +08:00
xming521 a3f39495de feat(core): enable configurable thinking and cleaning
Introduces a new 'enable_thinking' configuration for LLM interactions.
This allows dynamic control of thinking behavior in both offline inference
and the data cleaning process. When thinking is enabled for cleaning,
the maximum number of new tokens is increased to accommodate longer
reasoning outputs.

Also reduces the repetition penalty in the cleaning strategy for
improved response diversity and skips data entries containing images
during the LLM cleaning process to avoid irrelevant processing.
2025-08-11 15:34:27 +08:00
xming521 6b134ea703 feat(dataset): handle image data in LLM cleaning
Updates pre-commit hooks.

Previously, the cleaning pipeline was entirely disabled for datasets

containing image messages.

Image conversations now receive a default score, bypassing text-focused

LLM cleaning. This enables partial cleaning for mixed datasets and

prevents pipeline failures.
2025-08-11 11:03:14 +08:00
xming521 d113218e42 更新README文档;修改清理策略中的评分解析逻辑。 2025-07-04 20:51:38 +08:00
xming521 38113a2524 翻译注释日志为英文 2025-07-01 20:00:34 +08:00
xming521 16ec7178d7 更新README文档,翻译部分内容为英文并调整格式; 翻译注释 和 日志。 2025-06-30 20:02:25 +08:00
xming521 aeedf9eefb 优化vllm_infer函数,添加失败索引返回,改进JSON解析逻辑;在QaPairScore中设置评分范围,更新清理策略以处理解析失败的情况。 2025-06-22 20:20:53 +08:00
xming521 81999f861a 在offline_infer.py中添加从文本中提取JSON内容的功能,并优化vllm_infer函数的结果解析;在strategies.py中修正vllm_infer的输出处理逻辑。 2025-06-21 13:50:17 +08:00
xming521 19e1fde810 更新数据清理策略中的max_new_tokens和enable_thinking参数以优化推理过程。 2025-06-14 11:40:31 +08:00
xming521 4ca715768e 新增enable_thinking参数以支持推理过程中的思考功能;更新repetition_penalty和max_new_tokens配置以优化数据清理策略。 2025-06-13 21:36:06 +08:00
xming521 e239893884 feat(tests): 添加测试模型参数配置,允许自定义测试集文件 2025-06-13 15:49:02 +08:00
xming521 53fc844403 refactor(config): 移除configV2,整合配置加载逻辑至config.py,更新相关引用 2025-06-13 12:02:27 +08:00
BAIKEMARK f3e9efc6fc refactor(data): 重构数据清洗逻辑并更新评估标准 2025-06-12 19:45:00 +08:00
BAIKEMARK 9f4a8f60a0 feat(data): 支持图像识别并优化数据清洗流程
- 新增 VisionApiConfig 类用于配置视觉 API
- 在数据处理中集成图像识别功能,支持并行处理
- 重构数据清洗策略,支持在线和离线两种方式- 优化数据清洗流程,提高可扩展性和可维护性
2025-06-12 13:13:57 +08:00
xming521 4df64be831 fix text cleandata,add 风格代表性。 2025-06-12 11:37:58 +08:00
xming521 247383e4f3 更新版本号至0.2.23,添加依赖omegaconf,增加pydantic驱动的configV2。 2025-06-10 17:31:34 +08:00
pre-commit-ci[bot] cf30258091 🎈 auto fixes by pre-commit hooks 2025-06-09 03:27:38 +00:00
xming521 247920fe00 更新.gitignore,更新pyproject.toml,添加pre-commit,更新README.md。 2025-06-09 11:26:14 +08:00
xming521 4d69b0c9b6 更新mllm模板以支持最大图片数量,优化数据处理逻辑。 2025-05-29 23:20:11 +08:00
xming521 7e4b0433f1 add QaPairV2 2025-05-27 23:07:17 +08:00
xming521 5c28bf084e 更新数据模型以支持ShareGPT格式,新增QaPairV2类和Message类,修改数据处理逻辑以支持图片消息,优化图片文件检查功能。 2025-05-25 23:23:58 +08:00
BAIKEMARK ddd6b49af3 Changed commentjson back to json 2025-05-24 22:15:27 +08:00
BAIKEMARK b8b566f89b Debug and Update README 2025-05-24 22:10:21 +08:00
BAIKEMARK 7cd7740d5e 完善clean_by_score逻辑并将其整合至strategies 2025-05-24 10:50:52 +08:00
BAIKEMARK 3db44677f0 修复了'qa' referenced before assignment的bug 2025-05-23 20:42:48 +08:00
BAIKEMARK 5fa391f55e 修改clean策略使llm打分结果保留 2025-05-23 20:16:34 +08:00
niuben bcf89d22e9 实现在线LLM清洗数据 2025-05-22 19:50:57 +08:00
xming521 2db76b0968 在 qa_generator.py 中添加 vLLM 可用性检查并调整数据清洗逻辑;在 log.py 中设置日志级别为 INFO。 2025-05-17 23:04:56 +08:00
xming521 4478cfbaa0 在 strategies.py 中添加对 vLLM 可用性的检查,并根据可用性选择推理引擎。暂不可用 2025-05-16 13:19:44 +08:00
xming521 b16bd303e3 更新.gitignore以忽略输出文件,更新README.md以优化文本描述,修改vllm_infer.py和strategies.py以支持自定义禁用词配置。 2025-05-11 19:37:08 +08:00
xming521 03636d4a37 更新README.md。 2025-05-07 22:33:37 +08:00
xming521 3bdcb3b8ac fixi 多卡length_cdf。 2025-05-06 22:35:10 +08:00
xming521 528de9970b 固定length_cdf 单卡运行;去掉vllm_infer.py并行推理。 2025-05-05 22:48:45 +08:00
xming521 5a48ab4ceb 修改vllm_infer.py以支持禁用\n,调整strategies.py以引入重复惩罚参数。 2025-05-05 20:35:24 +08:00
xming521 d7b77483a5 update llm judge 2025-05-05 19:52:29 +08:00
xming521 631c1731ed 重构vllm_infer.py以支持新的输入类型和引入引导解码参数,新增QaPairScore模型以支持评分功能,实现大模型对数据评分。 2025-05-04 22:52:09 +08:00
xming521 fec538fea6 在pyproject.toml中添加langchain依赖,并在strategies.py中引入PromptTemplate以支持数据清洗功能的实现。 2025-05-03 22:57:36 +08:00
xming521 319aaa1814 修改qa_generator.py以支持QaPair对象 2025-05-02 22:34:41 +08:00
xming521 035d138d8d 更新pyproject.toml版本至0.2.2,优化vllm_infer函数以支持前缀缓存,调整qa_generator.py以处理结果并保存为JSON格式。 2025-05-01 23:04:37 +08:00
xming521 20904b0202 更新vllm依赖版本至0.8.2 2025-05-01 19:39:15 +08:00