Commit graph

36 commits

Author SHA1 Message Date
JimmyZQX
f5bb0dad59
Data Filtering with Gemma (#396)
* Add code for data filtering llm judge

* Ignore log file created on root (mainly for synthetic_data_generation.log)

* Fix metadata API compatibility issues by commenting out metadata tags in LLM API calls

- Commented out metadata.tags parameters in all LLM API calls across the codebase
- This fixes compatibility issues with custom LLM providers that don't support metadata
- Affects shades generation, topics generation, wiki generation, bio QA, and question generation
- Preserves the original code structure for future re-enabling if needed

* feat: add data filtering pipeline with Ollama integration

- Add MergedDataJudge class for intelligent data filtering using Ollama Gemma
- Integrate automatic Ollama CLI installation into project setup process
- Add DATA_FILTERING step to training pipeline with concurrent processing
- Include testing for MergedDataJudge in its local main() function
- Add Ollama dependency to pyproject.toml

* feat: add automatic Ollama model cleanup after data filtering

* Add logging for outputting data filtering parameters

* fix: adjust error handling for MergedDataJudge:
- Keep original merged.json unchanged when any error occurs
- Exit filtering process immediately on errors instead of continuing with defaults
- Ensure training pipeline continues safely even if data filtering fails

* Add frontend for data filtering pipeline

* resolve data filtering quality_level error by commenting out problematic fields, change TrainProcessService back to original class definition

* fix: quote unquoted shade icons to prevent JSON parsing errors

* Fixed wiki_res.json missing due to no database connection at wiki/base.py module import

* Added scoring reasoning as part of the merged data

* fix: filter ANSI escape sequences from Ollama logs in data filtering step

* fix: Add data filtering steps to cloud training to resolve KeyError

- Added 'Data Filtering' step to cloud training progress holder
- Added data filtering step execution in cloud training service
- Added data filtering parameters to cloud training routes
- Updated frontend to send data filtering parameters
- Fixed missing except clause in cloud training service

This resolves the KeyError: 'data_filtering' when switching from cloud to local training.
2025-08-15 11:19:12 +08:00
doubleBlack2
c7e56858dc
remove additional data (#398) 2025-07-28 16:11:25 +08:00
doubleBlack2
d96eda2e0d
Fix/new data fix (#394)
* fix

* fix error

* fix stop error

* fix stop error

* fix stop error

* fix stop error

* fix stop error
2025-07-03 18:56:37 +08:00
wuyuxiangX
7becdc4f84
Feature/new data (#393)
* new data pipiline

* new data pipiline

* shades and topic

---------

Co-authored-by: yanmuyuan <2216646664@qq.com>
2025-07-01 15:39:04 +08:00
wuyuxiangX
ea86f26af3
Feature/cloud upgrade (#388)
* feat: Updated the cloud service model list and fixed the error message in the training process service

* cloud serive add

* add deployed_name

* add name,deploy model

* add model,name

* feat: Update cloud model deployment information, add deployment status and related parameters

* remove qwen2.5

* feat: Updated the model name to Qwen3, adjusted related configurations and default values

* refactor: simplify chat data processing and update model training configuration

* Qwen 3

* feat: Add cloud service status check function to optimize model status management

* chore: update API endpoints and file paths for local development environment

* feat: store complete training parameters in local storage

* Fix/cloud service stop (#384)

* fix cloud service stop

* add pending status

* feature: Added pause status polling function and updated cloud training stop logic

* Stop logic modification

* feature: Added cloud training pause status check function to optimize training process control

* fix stop

* feature: Add language parameter to support multi-language training configuration

* add Chinese language, fix top

---------

Co-authored-by: wyx-hhhh <1360479992@qq.com>

* feat: update originPrompt to simplify response structure and enhance clarity

* load error

---------

Co-authored-by: yanmuyuan <2216646664@qq.com>
Co-authored-by: doubleBlack2 <108928143+doubleBlack2@users.noreply.github.com>
2025-06-23 14:21:23 +08:00
doubleBlack2
eaeac58c18
Fix progress bar display abnormality (#358) 2025-05-19 11:32:14 +08:00
doubleBlack2
899e2cb752
Provide a selection of Chinese mirror websites for Huggingface (#360)
* Provide a selection of Chinese mirror websites for Huggingface

* Remove default values
2025-05-16 11:55:27 +08:00
Xiang Ying
4f6dffc64d
Update utils.py for progress (#365) 2025-05-15 15:27:29 +08:00
Crabboss
166db04c22
feature: add support for multi deepseek api format (#352) 2025-05-13 16:12:42 +08:00
KKKKKKKevin
601f371f46
change log (#346) 2025-05-12 11:59:38 +08:00
Xiang Ying
a65f4a58fe
hotfix for strage problem which leads to the error during graphrag. (#347) 2025-05-12 11:59:35 +08:00
yingapple
da2b704ed4 fix(model tokenizer): just use the model tokenizer without anythink else. 2025-05-09 16:09:20 +08:00
yingapple
53dfdafc9b feat: up max seq length 2025-04-27 11:59:16 +08:00
KKKKKKKevin
3ae664fe09
add execute right (#289) 2025-04-25 17:20:07 +08:00
Zachary Pitroda
053090937d
Added CUDA support (#228)
* Add CUDA support

- CUDA detection
- Memory handling
- Ollama model release after training

* Fix logging issue

added cuda support flag so log accurately reflected cuda toggle

* Update llama.cpp rebuild

Changed llama.cpp to only check if cuda support is enabled and if so rebuild during the first build rather than each run

* Improved vram management

Enabled memory pinning and optimizer state offload

* Fix CUDA check

rewrote llama.cpp rebuild logic, added manual y/n toggle if user wants to enable cuda support

* Added fast restart and fixed CUDA check command

Added make docker-restart-backend-fast to restart the backend and reflect code changes without causing a full llama.cpp rebuild

Fixed make docker-check-cuda command to correctly reflect cuda support

* Added docker-compose.gpu.yml

Added docker-compose.gpu.yml to fix error on machines without nvidia gpu and made sure "\n" is added before .env modification

* Fixed cuda toggle

Last push accidentally broke cuda toggle

* Code review fixes

Fixed errors resulting from removed code:
- Added return save_path to end of save_hf_model function
- Rolled back download_file_with_progress function

* Update Makefile

Use cuda by default when using docker-restart-backend-fast

* Minor cleanup

Removed unnecessary makefile command and fixed gpu logging

* Delete .gpu_selected

* Simplified cuda training code

- Removed dtype setting to let torch automatically handle it
- Removed vram logging
- Removed Unnecessary/old comments

* Fixed gpu/cpu selection

Made "make docker-use-gpu/cpu" command work with .gpu_selected flag and changed "make docker-restart-backend-fast" command to respect flag instead of always using gpu

* Fix Ollama embedding error

Added custom exception class for Ollama embeddings, which seemed to be returning keyword arguments while the Python exception class only accepts positional ones

* Fixed model selection & memory error

Fixed training defaulting to 0.5B model regardless of selection and fixed "free(): double free detected in tcache 2" error caused by cuda flag being passed incorrectly
2025-04-25 10:20:36 +08:00
ryangyuan
9fe511f0f2
Feature/0416/add thinking mode (#264)
* fix: modify thinking_model loading configuration

* feat: realize thinkModel ui

* feat:store

* feat: add combined_llm_config_dto

* add thinking_model_config & database migration

* directly add thinking model to user_llm_config

* delete thinking model repo dto service

* delete thinkingmodel table migration

* add is_cot config

* feat: allow define  is_cot

* feat: simplify logs info

* feat: add training model

* feat: fix is_cot problem

* fix: fix chat message

* fix: fix progress error

* fix: disable no settings thinking

* feat: add thinking warning

* fix: fix start service error

* feat:fix init trainparams problem

* feat: change playGround prompt

* feat: Add Dimension Mismatch Handling for ChromaDB (#157) (#207)

* Fix Issue #157

Add chroma_utils.py to manage chromaDB and added docs for explanation

* Add logging and debugging process

- Enhanced the`reinitialize_chroma_collections` function in`chroma_utils.py` to properly check if collections exist before attempting to delete them, preventing potential errors when collections don't exist.
- Improved error handling in the`_handle_dimension_mismatch` method in`embedding_service.py` by adding more robust exception handling and verification steps after reinitialization.
- Enhanced the collection initialization process in`embedding_service.py` to provide more detailed error messages and better handle cases where collections still have incorrect dimensions after reinitialization.
- Added additional verification steps to ensure that collection dimensions match the expected dimension after creation or retrieval.
- Improved logging throughout the code to provide more context in error messages, making debugging easier.

* Change topics_generator timeout to 30 (#263)

* quick fix

* fix: shade -> shade_merge_info (#265)

* fix: shade -> shade_merge_info

* add convert array

* quick fix import error

* add log

* add heartbeat

* new strategy

* sse version

* add heartbeat

* zh to en

* optimize code

* quick fix convert function

* Feat/new branch management (#267)

* feat: new branch management

* feat: fix multi-upload

* optimize contribute management

---------

Co-authored-by: Crabboss Mr <1123357821@qq.com>
Co-authored-by: Ye Xiangle <yexiangle@mail.mindverse.ai>
Co-authored-by: Xinghan Pan <sampan090611@gmail.com>
Co-authored-by: doubleBlack2 <108928143+doubleBlack2@users.noreply.github.com>
Co-authored-by: kevin-mindverse <kevin@mindverse.ai>
Co-authored-by: KKKKKKKevin <115385420+kevin-mindverse@users.noreply.github.com>
2025-04-24 14:19:23 +08:00
Xiang Ying
834f391972
Feature/dpo support (#220)
* feat(DPO_support): add DPO workflow script and documentation

- Introduce dpo_pipeline.sh for automated DPO process execution.
- Add README with overview and getting started guide (auto & manual modes).
- Include steps for SFT model deployment, data synthesis, training, and LoRA weight merging.

* feat(DPO_support): update API key, global bio config, pipeline script, and README

- Enhanced security by refining API key management.
- Simplified global bio configuration process.
- Improved pipeline script initialization for better reliability.
- Updated README with comprehensive documentation.

* feat(feature/DPO_support): Translate Chinese comments and README to English

- Translated all Chinese comments in the script to English for better readability and consistency.
- Updated the project README to English to ensure clarity and accessibility for all contributors and users.

---------

Co-authored-by: mcx_gt <moral_compass24@163.com>
2025-04-14 15:18:42 +08:00
wiley
7caa368a9a
feat:Add the functionality to download from ModelScope when downloading from Hugging Face fails. (#213) 2025-04-14 13:22:42 +08:00
yexiangle
4cbcc946aa
Adjustable Training Parameters & Checkpoint/Restore (#191)
* feat(trainprocess):add receive & get training params

* feat: support low/standard option for L2 data generate

* feat:improve training script invocation with direct bash command and internationalize comments

* fix: restore code

* feat: add error handling for GraphRAG index and modify model save frequency(epoch -> steps)

* feat: support low/medium/high mode for L2 data generation

* feat: set defaut value

* feat: add train params

* feat: use ScriptExecutor for training process and check return code

* fix: fix params round

* feat:use subprocess instead of script_executor to keep logs

* feat:hot fix name 'monitor_result' is not defined

* fix: delete useless message

* fix: fix params status

* feat: add status suspended

* feat:fix stop status

* fix: fix resume status

* fix: disable error

---------

Co-authored-by: Crabboss Mr <1123357821@qq.com>
Co-authored-by: ryangyuan <ryangyuan@mail.mindverse.ai>
2025-04-11 16:23:12 +08:00
justcrab
a69d35a3fa
fix: hotfix for missing encoding_model_name in default_embedding_model(GraphRAG setting.yaml) (#169) 2025-04-08 13:46:04 +08:00
justcrab
c39e662562
feat: support LongCoT mode for DeepSeek-R1 data synthesis and model training (#126)
* feat: support LongCoT mode for DeepSeek-R1 data synthesis and model training

* fix: restore .env and setting.yaml configuration files

* fix: restore .env from L2 configuration files

---------

Co-authored-by: Xiang Ying <yingxiang835@gmail.com>
2025-04-07 10:11:23 +08:00
GoForceX
9a914c1529 fix: Invalid progress file path on Windows (#145) 2025-04-03 10:35:01 +08:00
justcrab
ff61385ac6
fix: support for non-OpenAI embedding model in graphrag_indexing() (#144)
* fix: increase case for chat_model_name in graphrag_indexing()

* fix: support for non-OpenAI embedding model in graphrag_indexing()
2025-04-02 17:46:58 +08:00
KKKKKKKevin
b77e49d5cb
fix/DockerWindowsCommandLineError (#138)
* fix/DockerWindowsCommandLineError

* translate
2025-04-02 11:47:46 +08:00
Xiang Ying
718d67f1c3
Feature/mlx training support new (#131)
* feat(mlx_training_support): init training pipeline with support for training, merging, serving, and testing

* feat(feature/mlx_training_support): Enhance data transformation script, modify training script, and encapsulate model training parameters in YAML file

- Improved the data conversion script to handle additional edge cases and ensure better data integrity.
- Updated the training script to support both YAML configuration and command-line parameters, with a preference for YAML for LoRA fine-tuning.
- Encapsulated model training parameters in a YAML file to simplify configuration and management.
- Added detailed instructions and explanations in the README.md file to guide users through the data conversion, training, and testing processes.

---------

Co-authored-by: mcx_gt <moral_compass24@163.com>
2025-04-01 10:31:09 +08:00
yexiangle
7ef6e482c0
Fix Merge Json (#127)
hotfix: Fix missing final data merge
2025-03-31 20:15:07 +08:00
KKKKKKKevin
27c76ae29c
Fix:Env detect & Fix Missing Merge Step (#113)
* hotfix: Fix missing final data merge & Fix Env Detect In Script Runner

---------

Co-authored-by: yingapple <yingxiang835@gmail.com>
2025-03-30 18:03:52 +08:00
KKKKKKKevin
f64ddc108b
feat: Add docker support (#99)
* feat:Add Docker Support

* translate
2025-03-30 15:15:32 +08:00
Xie Yanbo
3d0a8a776a
fix: download qwen model to the correct directory (#85) 2025-03-28 10:11:05 +08:00
omahs
ca01a9e73f
Fix typos (#60)
* fix typo

* fix typo

* fix typos

* fix typos

* fix typos

* fix typo

* fix typos

* fix typos

* fix typos
2025-03-27 10:18:39 +08:00
justcrab
e778ebf82f
feat(logging): separate training log (#83)
* desparate part of traing logs v1

* fix train.py log

* optimize logging manage && fix monitor log

* feat(logging): desparate part of training logs v2

* delete no use code

* merge conflic

* delete chinese

---------

Co-authored-by: Ye Xiangle <yexiangle@mail.mindverse.ai>
Co-authored-by: Crabboss Mr <crabbossmr@CrabbossdeMacBook-Air.local>
2025-03-27 10:12:11 +08:00
umutcrs
552ee09fce
security! (#62)
* Potential fix for code scanning alert no. 110: Uncontrolled data used in path expression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 109: Uncontrolled data used in path expression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-03-26 10:13:34 +08:00
Mahdi Rahimi
423f6a45e3
Refactor: Implement 'with' statement for file handling to ensure proper resource management (#74) 2025-03-26 10:09:07 +08:00
yingapple
047bbc254c fix: add default embedding model to support none openai model 2025-03-21 12:05:59 +08:00
yingapple
f8b1cdd5be add config file 2025-03-20 01:03:28 +08:00
Kevin
7f7d64210e Initial commit 2025-03-20 00:37:54 +08:00