Commit graph

9 commits

Author SHA1 Message Date
doubleBlack2
f3e4d289e6
Feature/cloud service (#383)
* Enhance GGUF model handling with timestamps, metadata and memory training status

* Check if is_trained exists

* fix

* cloud service

* Change the data type of the is_trained field to boolean and update the related logic to reflect this change

* Change the data type of the is_trained field to boolean and update the related logic to reflect this change

* Add gguf path to json file

* Added model selection function, updated model list acquisition logic, and enhanced model information display

* Update the model service startup logic, add integrity check for the model path, and support obtaining the model path from different fields

* Service Change

* full cloud service

* feat: implement async cloud training process with job tracking and API key management

* Progress bar modification

* feat: Add Local and Cloud Training Configuration Components

- Introduced LocalTrainingConfig component for configuring local training parameters.
- Updated TrainingConfiguration component to include tabs for Local and Cloud training configurations.
- Added API functions for setting and getting cloud service API keys.
- Created useCloudProviderStore for managing cloud provider configurations.
- Enhanced event utility to include a new event for showing cloud provider modal.

* Refactor cloud provider and training configuration components

- Updated CloudProviderModal to handle cloud service API key management.
- Replaced API key handling with model configuration updates in CloudProviderModal.
- Enhanced CloudTrainingConfig to manage cloud models based on API key availability.
- Introduced new cloud service functions for listing available models and managing training jobs.
- Modified LocalTrainingConfig to ensure default model selection and synchronization.
- Updated TrainingConfiguration to manage model switching between local and cloud environments.
- Refactored useCloudProviderStore to integrate cloud service API key handling.
- Adjusted useTrainingStore to prioritize model name selection based on the active environment.

* Stream Output

* feat: Enhance training configuration and progress components

- Updated LocalTrainingConfig to improve default model handling and avoid unnecessary updates.
- Introduced LocalTrainingProgress component to manage local training progress display.
- Refactored TrainingConfiguration to support both local and cloud training types, including updated button text and actions.
- Modified TrainingProgress to conditionally render local or cloud training progress based on the selected training type.
- Added cloud service functions for starting training and managing job information.
- Adjusted training parameter interfaces to ensure consistency across local and cloud models.

* Stream response change

* feat: Enhance cloud training and inference capabilities

- Updated TrainingProgress component to handle cloud training progress data and job ID.
- Modified trainExposureModel to allow nullable path and added optional stageName.
- Enhanced useSSE hook to support cloud model inference with new parameters.
- Introduced CloudProgressData type to align cloud training progress with local training structure.
- Implemented cloud inference request handling with local knowledge retrieval in cloudService.
- Added utility functions for managing active cloud model state in cloudModelUtils.
- Updated cloud inference endpoint to support local knowledge retrieval before cloud inference.
- Refactored advanced chat service to utilize new message structure for cloud inference.
- Enhanced prompt strategies to incorporate knowledge retrieval based on user messages.

* feat: Delete the training parameter debugging information component

* Resume training at breakpoint

* Repair data redundancy

* Stop system modification

* fix error: reset training

* fix stop and reset

* Change chat reply format

* Enhance cloud and local service management with status tracking and improved progress reporting

- Implemented service status file management in cloud and local services to track active status and model information.
- Added endpoints to start and stop cloud services, including validation for existing services.
- Enhanced local service management with status checks and progress updates during document processing and chunk embedding.
- Introduced real-time progress tracking for document embedding and chunk processing, allowing for incremental updates.
- Improved error handling and logging throughout the service management processes.
- Refactored chat request handling to intelligently route between local and cloud services based on current status.

* feat:Cleaned up code comment

* translate Chinese comments to English in cloud service modules

* translate into chinese

* feat: Enhance cloud provider configuration and training management with API key handling and tab switching logic

* bug fix

* Add is_trained field modification in the cloud

* feat: Refactor training parameters management to separate local and cloud configurations

* feat: Update training parameter types to improve type safety and consistency

* feat: Add data synthesis mode to cloud training parameters and update related components

* feat: The document embedding part is restored to its original state

* refactor: optimize cloud training process with improved stop handling and file path updates

* feat: Update the default values and merging logic of cloud training parameters to ensure parameter consistency

* feat: Add API key preloading function to optimize the loading experience when the modal box is opened

* feat: Optimize CloudProviderModal component, add API key preloading and state management

* fix: Simplify cloud provider display by removing conditional rendering for Alibaba Cloud

* feat: Update .gitignore to include job_id.json and add .gitkeep for gguf directory

---------

Co-authored-by: wyx-hhhh <1360479992@qq.com>
2025-06-04 19:52:14 +08:00
wuyuxiangX
1f257184bd
Feature/fix duplicate files (#363)
* feat: file display and deletion related

* fix: file saving logic
2025-05-15 15:30:34 +08:00
KKKKKKKevin
5ceed311bf
Feature/add hint (#361)
* optimize doc

* better code

---------

Co-authored-by: kevinaimonster <kevinaimonster@gmail.com>
2025-05-14 20:26:45 +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
kevin-mindverse
e4f4fb695d print stack 2025-04-17 16:40:00 +08:00
doubleBlack2
2483288348
Feature/embedding strategy (#235)
* Optimization of files Local Chat API.md and Public Chat API.md

* MCP sever

* Embedding strategy

* change name

* drop mcp files

* llm.py change
2025-04-16 19:40:11 +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
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
Kevin
7f7d64210e Initial commit 2025-03-20 00:37:54 +08:00