6481 Commits

Author SHA1 Message Date
Nguyen Ngoc Minh
75396dbd06
Merge pull request #6600 from menloresearch/docs/update-redirects
docs: update redirects
2025-09-25 13:57:09 +00:00
Minh141120
20c8991f55 docs: update redirects 2025-09-25 20:53:43 +07:00
Faisal Amir
d806c4719e
Merge pull request #6586 from menloresearch/feat/thread-project-org
feat: thread organization folder
2025-09-25 20:21:02 +07:00
Nguyen Ngoc Minh
978565e7f0
Merge pull request #6599 from menloresearch/docs/add-redirect
docs: add redirects
2025-09-25 11:48:10 +00:00
Minh141120
9fb3171d82 docs: remove duplicate redirect url 2025-09-25 18:21:31 +07:00
Minh141120
9923c6028e docs: add redirects 2025-09-25 18:10:58 +07:00
Faisal Amir
d690e0fa87 chore: max height project list on left panel 2025-09-25 17:29:38 +07:00
Low Keng Hoong, Warren
0fb6413368
Merge pull request #6596 from menloresearch/feat/kernel-benchmarking
feat: Add kernel benchmarking blogpost
2025-09-25 18:28:54 +08:00
Faisal Amir
a8b9e1f147 chore: fix navigartion thread from project 2025-09-25 16:24:55 +07:00
DESU CLUB
374a1f9771 feat: Fix image links 2025-09-25 17:10:59 +08:00
DESU CLUB
97af43cadb feat: Fix image links 2025-09-25 17:05:40 +08:00
DESU CLUB
2aead28c9b feat: Add kernel benchmarking blogpost 2025-09-25 16:58:27 +08:00
Akarshan Biswas
11b3a60675
fix: refactor, fix and move gguf support utilities to backend (#6584)
* feat: move estimateKVCacheSize to BE

* feat: Migrate model planning to backend

This commit migrates the model load planning logic from the frontend to the Tauri backend. This refactors the `planModelLoad` and `isModelSupported` methods into the `tauri-plugin-llamacpp` plugin, making them directly callable from the Rust core.

The model planning now incorporates a more robust and accurate memory estimation, considering both VRAM and system RAM, and introduces a `batch_size` parameter to the model plan.

**Key changes:**

- **Moved `planModelLoad` to `tauri-plugin-llamacpp`:** The core logic for determining GPU layers, context length, and memory offloading is now in Rust for better performance and accuracy.
- **Moved `isModelSupported` to `tauri-plugin-llamacpp`:** The model support check is also now handled by the backend.
- **Removed `getChatClient` from `AIEngine`:** This optional method was not implemented and has been removed from the abstract class.
- **Improved KV Cache estimation:** The `estimate_kv_cache_internal` function in Rust now accounts for `attention.key_length` and `attention.value_length` if available, and considers sliding window attention for more precise estimates.
- **Introduced `batch_size` in ModelPlan:** The model plan now includes a `batch_size` property, which will be automatically adjusted based on the determined `ModelMode` (e.g., lower for CPU/Hybrid modes).
- **Updated `llamacpp-extension`:** The frontend extension now calls the new Tauri commands for model planning and support checks.
- **Removed `batch_size` from `llamacpp-extension/settings.json`:** The batch size is now dynamically determined by the planning logic and will be set as a model setting directly.
- **Updated `ModelSetting` and `useModelProvider` hooks:** These now handle the new `batch_size` property in model settings.
- **Added new Tauri commands and permissions:** `get_model_size`, `is_model_supported`, and `plan_model_load` are new commands with corresponding permissions.
- **Consolidated `ModelSupportStatus` and `KVCacheEstimate`:** These types are now defined in `src/tauri/plugins/tauri-plugin-llamacpp/src/gguf/types.rs`.

This refactoring centralizes critical model resource management logic, improving consistency and maintainability, and lays the groundwork for more sophisticated model loading strategies.

* feat: refine model planner to handle more memory scenarios

This commit introduces several improvements to the `plan_model_load` function, enhancing its ability to determine a suitable model loading strategy based on system memory constraints. Specifically, it includes:

-   **VRAM calculation improvements:**  Corrects the calculation of total VRAM by iterating over GPUs and multiplying by 1024*1024, improving accuracy.
-   **Hybrid plan optimization:**  Implements a more robust hybrid plan strategy, iterating through GPU layer configurations to find the highest possible GPU usage while remaining within VRAM limits.
-   **Minimum context length enforcement:** Enforces a minimum context length for the model, ensuring that the model can be loaded and used effectively.
-   **Fallback to CPU mode:** If a hybrid plan isn't feasible, it now correctly falls back to a CPU-only mode.
-   **Improved logging:** Enhanced logging to provide more detailed information about the memory planning process, including VRAM, RAM, and GPU layers.
-   **Batch size adjustment:** Updated batch size based on the selected mode, ensuring efficient utilization of available resources.
-   **Error handling and edge cases:**  Improved error handling and edge case management to prevent unexpected failures.
-   **Constants:** Added constants for easier maintenance and understanding.
-   **Power-of-2 adjustment:** Added power of 2 adjustment for max context length to ensure correct sizing for the LLM.

These changes improve the reliability and robustness of the model planning process, allowing it to handle a wider range of hardware configurations and model sizes.

* Add log for raw GPU info from tauri-plugin-hardware

* chore: update linux runner for tauri build

* feat: Improve GPU memory calculation for unified memory

This commit improves the logic for calculating usable VRAM, particularly for systems with **unified memory** like Apple Silicon. Previously, the application would report 0 total VRAM if no dedicated GPUs were found, leading to incorrect calculations and failed model loads.

This change modifies the VRAM calculation to fall back to the total system RAM if no discrete GPUs are detected. This is a common and correct approach for unified memory architectures, where the CPU and GPU share the same memory pool.

Additionally, this commit refactors the logic for calculating usable VRAM and RAM to prevent potential underflow by checking if the total memory is greater than the reserved bytes before subtracting. This ensures the calculation remains safe and correct.

* chore: fix update migration version

* fix: enable unified memory support on model support indicator

* Use total_system_memory in bytes

---------

Co-authored-by: Minh141120 <minh.itptit@gmail.com>
Co-authored-by: Faisal Amir <urmauur@gmail.com>
2025-09-25 12:17:57 +05:30
Faisal Amir
ba768d46e6 chore: update dialog test case 2025-09-25 13:24:06 +07:00
Louis
7fe58d6bee
fix: allow users cancel backend download (#6582)
* fix: allow users cancel backend download

* fix: should not redownload on cancel
2025-09-25 13:19:14 +07:00
Faisal Amir
8479b7c105 chore: update rename and delete thread from dynamic project screen 2025-09-25 13:12:33 +07:00
Nguyen Ngoc Minh
d994bc8f6a
Merge pull request #6589 from menloresearch/ci/update-package-version-tauri-plugin
ci: update package version for tauri plugin
2025-09-25 12:46:01 +07:00
Minh141120
45590e3188 ci: fix path for tauri plugins 2025-09-25 12:10:51 +07:00
Faisal Amir
e0781677ad
Merge pull request #6590 from menloresearch/enhancement/responsive-footer-web
enhancement: update responsive footer and copy hero section
2025-09-25 11:35:57 +07:00
Faisal Amir
1b120712d4 enhancement: update responsive footer and copy hero section 2025-09-25 11:26:15 +07:00
Minh141120
8205c33176 ci: update package version for tauri plugin 2025-09-25 10:55:10 +07:00
Faisal Amir
b0bca2ac1f
Update web-app/src/routes/project/index.tsx
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-09-25 10:19:18 +07:00
Faisal Amir
d0f62fa634 chore: fix missing classname 2025-09-25 10:18:21 +07:00
Faisal Amir
e7a1a06395 feat: thread organization folder 2025-09-25 10:12:08 +07:00
Vanalite
814024982e feat: Experiment removing hardware permission 2025-09-25 00:49:14 +07:00
Nguyen Ngoc Minh
3dcf522224
Merge pull request #6583 from menloresearch/chore/separate-windows-install-script
chore: separate windows install script
2025-09-24 20:12:13 +07:00
Minh141120
23f14ebbb7 fix: window dependencies not downloaded during tests 2025-09-24 19:02:18 +07:00
Minh141120
e322e46e4b chore: separate windows install script 2025-09-24 18:29:03 +07:00
Louis
57110d2bd7
fix: allow users to download the same model from different authors (#6577)
* fix: allow users to download the same model from different authors

* fix: importing models should have author name in the ID

* fix: incorrect model id show

* fix: tests

* fix: default to mmproj f16 instead of bf16

* fix: type

* fix: build error
2025-09-24 17:57:10 +07:00
Nguyen Ngoc Minh
fe05478336
Merge pull request #6578 from menloresearch/feat/windows-installer-cleanup
feat: add cleanup logic for windows installer
2025-09-24 16:12:26 +07:00
Vanalite
b2c5063e0b Merge remote-tracking branch 'origin/dev' into mobile/dev
# Conflicts:
#	src-tauri/src/core/server/proxy.rs
#	src-tauri/tauri.conf.json
#	web-app/src/containers/LeftPanel.tsx
#	web-app/src/containers/__tests__/ChatInput.test.tsx
#	web-app/src/lib/platform/const.ts
#	yarn.lock
2025-09-24 16:01:33 +07:00
Minh141120
9568ff12e8 feat: add cleanup logic for windows installer 2025-09-24 15:47:46 +07:00
Nghia Doan
7780fb3edd
Merge pull request #6549 from menloresearch/enhancement/layout-mobile
enhancement: base layout mobile
2025-09-24 15:08:14 +07:00
Vanalite
6747a0e9e2 Merge branch 'mobile/dev' into enhancement/layout-mobile
# Conflicts:
#	package.json
2025-09-24 15:07:49 +07:00
Vanalite
b8da32c14e fix: Add frontendDist to ios configuration 2025-09-24 14:31:13 +07:00
Nguyen Ngoc Minh
4f7236d72a
Merge pull request #6576 from menloresearch/docs/clean-output-dir
docs: add clean output dir step
2025-09-24 12:16:47 +07:00
Minh141120
91e30d3c19 docs: add clean output dir step 2025-09-24 12:12:41 +07:00
hiento09
4dc55fc43b
chore: fix docs (#6575) 2025-09-24 10:56:01 +07:00
Nguyen Ngoc Minh
0cf2ffd32d
Merge pull request #6574 from menloresearch/docs/add-cache-control
docs: add cache control
2025-09-24 10:40:31 +07:00
Minh141120
db35d045b8 docs: add cache control 2025-09-24 10:35:10 +07:00
Faisal Amir
a8dee4a95d
Merge pull request #6572 from menloresearch/fix/missing-url-in-article
fix: missing url on article
2025-09-24 09:52:46 +07:00
Faisal Amir
5b59c7a18a
Merge pull request #6560 from menloresearch/fix/layout-downlod-management
fix: download management ui and double refresh model
2025-09-24 09:48:42 +07:00
Faisal Amir
78fc5a8184 chore: fix double desktop 2025-09-24 09:48:08 +07:00
Faisal Amir
dc097eaef9 fix: missing url on article 2025-09-24 09:45:27 +07:00
Nguyen Ngoc Minh
4d43841ae3
Merge pull request #6571 from menloresearch/docs/update-redirect-page
docs: update redirect page
2025-09-24 09:01:11 +07:00
Minh141120
8102ca24e5 chore: wipe out _redirects page 2025-09-24 08:56:06 +07:00
Akarshan Biswas
38ad8deae2
feat: normalize LaTeX fragments in markdown rendering (#6488)
* feat: normalize LaTeX fragments in markdown rendering

Added a preprocessing step that converts LaTeX delimiters `\[…\]` to `$$…$$` and `\(...\)` to `$…$` before rendering. The function skips code blocks, inline code, and HTML tags to avoid unintended transformations. This improves authoring experience by supporting common LaTeX syntax without requiring explicit `$` delimiters.

* fix: correct inline LaTeX normalization replacement

The replacement function for inline math (`\(...\)`) incorrectly accepted a fourth
parameter (`post`) and appended it to the result, which could introduce stray
characters or `undefined` into the rendered output. Updated the function to
use only the captured prefix and inner content and removed the extraneous
`${post}` interpolation, ensuring clean LaTeX conversion.

* feat: optimize markdown rendering with LaTeX caching and memoized code blocks

- Added cache to normalizeLatex to avoid reprocessing repeated content
- Introduced CodeComponent with stable IDs and memoization to reduce re-renders
- Replaced per-render code block ID mapping with hash-based IDs
- Memoized copy handler and normalized markdown content
- Simplified plugin/component setup with stable references
- Added custom comparison for RenderMarkdown memoization to prevent unnecessary updates

* refactor: memoize content only

---------

Co-authored-by: Louis <louis@jan.ai>
2025-09-24 07:19:32 +05:30
Minh141120
1c1993fbd7 docs: update redirect page 2025-09-24 08:44:37 +07:00
Nguyen Ngoc Minh
c46e13b8b1
Merge pull request #6545 from menloresearch/chore/standardize-build-windows
chore: use default nsis template
2025-09-23 22:23:17 +07:00
Minh141120
8ba0342337 chore: update download folder to libDir 2025-09-23 21:14:49 +07:00