Skip to content

Conversation

@qnixsynapse
Copy link
Contributor

Describe Your Changes

Introduces support for the fit parameter and its associated configurations (fit_target, fit_ctx) to allow automatic adjustment of arguments to device memory. This change spans the extension settings, guest-js types, and the Rust argument builder.

Key changes:

  • Settings & Types: Added fit, fit_target, and fit_ctx to settings.json and synchronized these fields across the TypeScript definitions and the Rust LlamacppConfig struct.

  • Logic Updates: * Implemented add_fit_settings in the ArgumentBuilder to handle --fit, --fit-target, and --fit-ctx flags.

  • Modified add_gpu_layers to use -1 as the default for loading all layers, while treating 100 as a manual override.

  • Updated several argument methods (batch size, context size, etc.) to only append flags if the values differ from the defaults, reducing command-line clutter.

  • Added a check to exclude fit settings when using the ik backend fork.

  • Testing: Significantly expanded the Rust test suite. Replaced basic assertions with dedicated helper functions (assert_arg_pair, assert_has_flag, assert_no_flag) and added comprehensive test cases for various configurations, including GPU layers, embedding mode, and backend-specific behavior.

Fixes Issues

  • Closes #
  • Closes #

Future Tasks

  • Remove in house auto optimize feature - we rely on llamacpp now
  • Adjust UX

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

…ent builder tests

Introduces support for the `fit` parameter and its associated configurations (`fit_target`, `fit_ctx`) to allow automatic adjustment of arguments to device memory. This change spans the extension settings, guest-js types, and the Rust argument builder.

**Key changes:**

* **Settings & Types:** Added `fit`, `fit_target`, and `fit_ctx` to `settings.json` and synchronized these fields across the TypeScript definitions and the Rust `LlamacppConfig` struct.
* **Logic Updates:** * Implemented `add_fit_settings` in the `ArgumentBuilder` to handle `--fit`, `--fit-target`, and `--fit-ctx` flags.
* Modified `add_gpu_layers` to use `-1` as the default for loading all layers, while treating `100` as a manual override.
* Updated several argument methods (batch size, context size, etc.) to only append flags if the values differ from the defaults, reducing command-line clutter.
* Added a check to exclude `fit` settings when using the `ik` backend fork.

* **Testing:** Significantly expanded the Rust test suite. Replaced basic assertions with dedicated helper functions (`assert_arg_pair`, `assert_has_flag`, `assert_no_flag`) and added comprehensive test cases for various configurations, including GPU layers, embedding mode, and backend-specific behavior.
@github-actions
Copy link
Contributor

Barecheck - Code coverage report

Total: 26.04%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants