49 Commits

Author SHA1 Message Date
xming521 fca6ca1c55 feat(data): enhance conversation message processing in QA generation
- Added logic to handle the "<begin_chat>" marker in user messages, allowing for improved context in conversation flows.
- Updated the message processing to include the assistant's response when the user initiates a chat, ensuring more coherent QA pairs.
- Refactored the handling of conversation messages to maintain clarity and structure in the generated QA data.
2026-01-04 15:47:14 +08:00
xming521 bbe08f0c77 feat(data): enhance chat member relationship handling in QA generation
- Updated the `qa_generator.py` to include a new mechanism for managing chat member relationships, allowing the addition of contextual information about the relationship between users in conversations.
- Refactored the CSV loading function to support loading user relationship data from a `users.json` file, improving the context provided during QA generation.
- Added a new configuration option `add_relation` to the dataset settings, enabling users to toggle this feature.
- Updated the `.gitignore` to exclude additional data directories and cache files for better repository hygiene.
- Bumped version to 0.3.03 in `pyproject.toml` to reflect these changes.
2025-11-01 17:11:26 +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 cc34bea317 fix(data): classify gif as animated stickers
Ensures that files with a .gif extension are correctly identified and
categorized as animated expressions or stickers based on the platform.
This improves the accuracy of media type classification during data
processing.
2025-08-15 15:31:45 +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 533b0fa678 refactor(data): converts QA item ID to string
Ensures the ID field for generated QA items is always a string. This provides type consistency for downstream consumers.
2025-07-29 11:28:23 +08:00
xming521 785ad1472a remove wechat 2025-07-16 11:21:11 +08:00
xming521 2a7cb5f30d refactor(data): simplify datetime format
Removes the year from the datetime string included in the system prompt. This makes the prompt more concise.
2025-07-14 17:31:54 +08:00
xming521 7ce7fcd47a fix(dataset): fix blocked words filter
Adds a blocked words filter to the dataset creation process.
This prevents undesirable words from appearing in the generated
datasets, enhancing data quality and safety.
A test case is added to verify the filter is working correctly.

Also, skips "text" type in qa_generator to avoid duplicated filter.
2025-07-14 13:38:19 +08:00
xming521 49d62b3fda performance(PII): add batch PII detection
Implements batch processing for PII detection to improve
performance. Also, fixes a bug in the PII detection logic
and updates the installation instructions in the README.
2025-07-14 12:55:01 +08:00
xming521 a24442b78d feat(PII): enhance PII detection for Chinese
Improves PII detection for Chinese language data by:

- Adding a Chinese-specific PII detector that inherits from
  the base PII detector.
- Incorporating custom recognizers for common Chinese PII
  patterns (e.g., phone numbers, ID cards).
- Filtering out irrelevant country-specific entities when
  processing Chinese text.
- Adding unicode escape id recognizer.

These changes ensure more accurate and comprehensive
identification of sensitive information in Chinese datasets.
2025-07-10 12:10:09 +08:00
xming521 5f34b4561e feat(dataset): adds option to include time
Adds a configuration option to include the current
datetime in the system prompt of the generated dataset.
This allows models to be aware of the temporal context
of the conversations.
2025-07-09 23:15:51 +08:00
xming521 e96853d0fb refactor(dataset): removes newline characters from messages
This commit addresses an issue where newline characters
within text messages were causing problems in downstream
processing. It removes these characters to ensure that
the messages are processed correctly.
2025-07-08 18:31:30 +08:00
xming521 5b47d9b9ab refactor: unifies combined content separator
Consolidates the separator for combined content to a newline character, removing language-specific branching.
This simplifies the logic and ensures consistency across different languages.
2025-07-08 16:52:47 +08:00
xming521 f0476b05e7 feat(tg): add sticker parameter to include_type
Adds support for processing stickers in Telegram chat data.

- Includes 'sticker' as a valid DataModality.
- Allows the option to include sticker emojis as message content.
2025-07-06 10:38:28 +08:00
xming521 38113a2524 翻译注释日志为英文 2025-07-01 20:00:34 +08:00
xming521 256a601d9f 在qa_generator.py中设置VLLM_WORKER_MULTIPROC_METHOD环境变量为"spawn";删除train_pt.py文件。 2025-06-30 20:42:39 +08:00
xming521 2f9cc52955 更新pyproject.toml以添加pip依赖;优化README文档,增强数据预处理说明;调整日志系统配置,支持从配置文件读取日志等级;重构PII检测器,简化代码并添加自定义识别器;更新数据处理逻辑以支持多语言和隐私过滤。 2025-06-27 23:05:45 +08:00
xming521 6df8c5cf2f 使用presidio进行隐私过滤 ; 添加语言支持配置;优化日志系统,hook标准logging到loguru。 2025-06-26 22:54:45 +08:00
xming521 fc89b802a5 更新版本号至0.2.25,优化README文档,修正数据处理逻辑以支持Telegram平台,添加图像复制功能,改进消息类型处理。 2025-06-25 10:50:42 +08:00
xming521 43b22ce903 调整settings.template.jsonc以添加Telegram参数,更新数据处理逻辑以支持Telegram平台,优化数据模型以处理不同消息类型。 2025-06-23 18:06:55 +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 9f4a8f60a0 feat(data): 支持图像识别并优化数据清洗流程
- 新增 VisionApiConfig 类用于配置视觉 API
- 在数据处理中集成图像识别功能,支持并行处理
- 重构数据清洗策略,支持在线和离线两种方式- 优化数据清洗流程,提高可扩展性和可维护性
2025-06-12 13:13:57 +08:00
pre-commit-ci[bot] d006cc1ae1 🎈 auto fixes by pre-commit hooks 2025-06-11 04:03:36 +00:00
pre-commit-ci[bot] cf30258091 🎈 auto fixes by pre-commit hooks 2025-06-09 03:27:38 +00:00
xming521 babba7233a Merge remote-tracking branch 'origin/master' into dev 2025-05-28 19:55:36 +08:00
BAIKEMARK f2e79ad411 Fixed the bug where vllm uninstallation caused the inability to use online cleaning. 2025-05-28 18:54:15 +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
xming521 07662a3dc1 更新pyproject.toml以使用llamafactory的GitHub链接,修改settings.template.jsonc以更新模型路径和添加平台配置,增强数据处理逻辑以支持多语言切割类型,并在qa_generator.py中整合切割类型列表。 2025-05-24 23:24:26 +08:00
BAIKEMARK 5fa391f55e 修改clean策略使llm打分结果保留 2025-05-23 20:16:34 +08:00
niulinbiao 84f2577837 Merge branch 'master' into nb-dev 2025-05-22 20:13:05 +08:00
xming521 bbe16fda73 Add full-flow test pipeline 2025-05-22 20:05:22 +08:00
niuben bcf89d22e9 实现在线LLM清洗数据 2025-05-22 19:50:57 +08:00
xming521 ed9d8e320e Adjust the default values of lora_dropout and num_train_epochs, while applying a unified decorator in the CLI to support log capturing. Use an inelegant approach to print all terminal content to a file, enabled via full_log. 2025-05-21 21:57:12 +08:00
xming521 2db76b0968 在 qa_generator.py 中添加 vLLM 可用性检查并调整数据清洗逻辑;在 log.py 中设置日志级别为 INFO。 2025-05-17 23:04:56 +08:00
Hanyu 33fb27811a 优化CSV文件读取
- 增加CSV文件排序功能,按文件名中起始序号排序
- 添加启用vllm的 bitsandbytes 量化加载的注释选项
2025-05-17 14:11:55 +08:00
xming521 b16bd303e3 更新.gitignore以忽略输出文件,更新README.md以优化文本描述,修改vllm_infer.py和strategies.py以支持自定义禁用词配置。 2025-05-11 19:37:08 +08:00
xming521 a18e474720 禁用词配置改到settings.json。 2025-05-08 20:44:32 +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 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 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 9827a24929 更新依赖项版本,提升torch和torchaudio至2.6.0,更新openai至1.52.0 相应更新test_model,调整pytorch源为cu124。 2025-04-29 22:47:02 +08:00
xming521 6ecf2c8144 添加计算cutoff_len 2025-04-26 21:03:10 +08:00
xming521 10c6890795 重构项目 2025-04-21 20:30:55 +08:00