Skip to content

Conversation

qnixsynapse
Copy link
Contributor

@qnixsynapse qnixsynapse commented Jul 25, 2025

The n_gpu_layers (NGL) setting in the llama.cpp extension was incorrectly preventing users from disabling GPU layers by automatically defaulting to 100 when set to 0.

This was caused by a condition that only pushed cfg.n_gpu_layers if it was greater than 0 (cfg.n_gpu_layers > 0).

This commit updates the condition to cfg.n_gpu_layers >= 0, allowing 0 to be a valid and accepted value for NGL. This ensures that users can effectively disable GPU offloading when desired.

Fixes Issues


Important

Fixes issue in index.ts allowing n_gpu_layers to be set to 0, enabling GPU layer disabling.

This description was created by Ellipsis for 23e2a32. You can customize this summary. It will automatically update as commits are pushed.

The `n_gpu_layers` (NGL) setting in the llama.cpp extension was incorrectly preventing users from disabling GPU layers by automatically defaulting to 100 when set to 0.

This was caused by a condition that only pushed `cfg.n_gpu_layers` if it was greater than 0 (`cfg.n_gpu_layers > 0`).

This commit updates the condition to `cfg.n_gpu_layers >= 0`, allowing 0 to be a valid and accepted value for NGL. This ensures that users can effectively disable GPU offloading when desired.
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 7cc408a in 48 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. extensions/llamacpp-extension/src/index.ts:1185
  • Draft comment:
    Updated condition: using '>= 0' now properly accepts 0 as a valid value (disabling GPU layers) instead of defaulting to 100. This resolves #5899 if negative values are meant to fall back to 100.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, explaining a change in the code logic and its impact. It does not provide a suggestion, ask for confirmation, or request a test. It seems to be explaining the resolution of an issue, which is not within the guidelines for useful comments.

Workflow ID: wflow_kJ4lQLxAZLIl5EBZ

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

github-actions bot commented Jul 25, 2025

Barecheck - Code coverage report

Total: 37.41%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@louis-menlo louis-menlo added this to the v0.6.6 milestone Jul 25, 2025
@louis-menlo louis-menlo moved this to Todo in Jan Jul 25, 2025
@louis-menlo louis-menlo moved this from Todo to Needs Review in Jan Jul 25, 2025
Copy link
Member

@Minh141120 Minh141120 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Changes requested ❌

Reviewed 23e2a32 in 2 minutes and 0 seconds. Click for details.
  • Reviewed 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_XK3q5aBxBsLv5jc2

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@qnixsynapse qnixsynapse merged commit 3982ed4 into release/v0.6.6 Jul 25, 2025
19 of 20 checks passed
@qnixsynapse qnixsynapse deleted the fix/5899 branch July 25, 2025 10:54
@github-project-automation github-project-automation bot moved this from Needs Review to QA in Jan Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

bug: NGL layers auto-switches from 0 to 100 when set to 0
4 participants