Commit graph

27 commits

Author SHA1 Message Date
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
kevin-mindverse
39d0cce7a0 quick fix 2025-04-22 14:58:49 +08:00
Xinghan Pan
5868f94622
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.
2025-04-22 10:27:34 +08:00
kevin-mindverse
77cd46142d print stack 2025-04-17 16:37:36 +08:00
kevin-mindverse
2ab854cc19 feat:move train service into a seperated dir 2025-04-16 14:57:20 +08:00
kevin-mindverse
e50fbc5737 feat:split train progress into two different files 2025-04-16 14:54:32 +08:00
kevin-mindverse
0d6194179b rename class 2025-04-16 14:45:47 +08:00
yexiangle
64dc1bba78
feat: add step generate_biography (#243) 2025-04-16 14:07:42 +08:00
kevin-mindverse
85cb97a606 feat: rename from Progress to TrainProgressHolder 2025-04-15 20:45:48 +08:00
kevin-mindverse
5db93decab feat:remove default value of fault value 2025-04-15 20:39:21 +08:00
kevin-mindverse
fad736ea56 fix:remove default value 2025-04-15 20:34:52 +08:00
yexiangle
bd64514048
optimize trainprocess (#239)
Co-authored-by: kevin-mindverse <kevin@mindverse.ai>
2025-04-15 20:29:22 +08:00
ryangyuan
000b39ac60
Fix: optimize progress order (#182)
* change progress order

* feat: change progress frontend type

* feat: update _load_progress for progress's new format

* fix: fix formatUnderscoreToName

* fix:simplify TrainProgress with direct JSON structure and mapping

* fix:add necessary accessors (getters and setters) to maintain compatibility with existing code while adopting the new data structure.

* fix: train log jump

* fix: fix current step update failed

* fix:fix stop problem

* fix trainprogress has no attribute status problem

* fix: merge master

---------

Co-authored-by: Ye Xiangle <yexiangle@mail.mindverse.ai>
2025-04-14 16:38:13 +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
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
50bbfce464
fix: Invalid progress file path on Windows (#145) 2025-04-02 19:35:08 +08:00
yexiangle
dcf99e60fe
fix: optimize trainprocess (#141) 2025-04-02 15:50:08 +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
Airmomo
4fdc082a96
Previously, texts longer than 8000 characters were simply truncated when requesting embeddings, which led to loss of information. (#90)
This fix:
    - Add text chunking in LLMClient to handle long texts
    - Remove truncation in document_service.py
    - Add EMBEDDING_MAX_TEXT_LENGTH config to control chunk size
    - Average embeddings of chunks to maintain semantic representation

    The fix ensures that:
    1. No content is lost for long texts
    2. API requests don't fail due to text length
    3. Complete semantic information is preserved
2025-03-28 10:07:27 +08:00
yexiangle
8ca0c78355
fix(trian):fix generatel2 repeat problem (#89) 2025-03-27 19:15:53 +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
vijay kumar
f0da85a210
Fix model download step being skipped during training (#84)
* Fix model download step being skipped during training

* Fix ProcessStep enum in error case to use MODEL_DOWNLOAD instead of TRAIN
2025-03-27 10:09:33 +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
yexiangle
3f2a286e7e
Featrue/0324/fix start train (#50)
* fix: add train condition check

* feat: check if user upload new file before start train again
2025-03-24 11:40:44 +08:00
Kevin
7f7d64210e Initial commit 2025-03-20 00:37:54 +08:00