Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix documentation using non-existent config option #1367

Open
RedEtherbloom opened this issue Feb 12, 2025 · 4 comments
Open

Nix documentation using non-existent config option #1367

RedEtherbloom opened this issue Feb 12, 2025 · 4 comments

Comments

@RedEtherbloom
Copy link

RedEtherbloom commented Feb 12, 2025

Describe the Issue
The documentation for how to run KoboldCpp under NixOS uses a non-existent config option, nixpkgs.config.cudaArches
How to reproduce:

  1. Add NixOS example configuration from KoboldCpp Nix documentation to configuration.nix
  2. Rebuild System
  3. Attempt to run KoboldCpp with FlashAttention(a feature requiring a higher arch than the lowest default cudaArch for Nix, "sm_60" iirc)
    Result:
    KoboldCpp crashes due to it being compiled with sm_60, instead of sm_75 as specified:
    ggml/src/ggml-cuda/template-instances/../fattn-wmma-f16.cuh:422: ERROR: CUDA kernel flash_attn_ext_f16 has no device code compatible with CUDA arch 600. ggml-cuda.cu was compiled for: 600

Additional Information:
GPU: Nvidia GeForce RTX 2070 Super
System Information:

 - system: `"x86_64-linux"`
 - host os: `Linux 6.12.12, NixOS, 25.05 (Warbler), 25.05.20250204.799ba5b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.92.0
System type: x86_64-linux
Additional system types: aarch64-linux, i686-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: REDACTED
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/9vcw1xs4znwaf01mjr7zd3zcxr173qyl-lix-2.92.0/share`
 - channels(root): `""`
 - nixpkgs: `/nix/store/k8nkf470zpidpa5nh76lh2x6rxfzpwa4-source

Potential solutions:

  1. Override the cudaArch that koboldcpp is supposed to be built with, either in package list or in overlay:
    koboldcpp.override { cudaArches = ["sm_75"]; }
  2. Set cudaCapabilities:
    nixpkgs.config.cudaCapabilities = ["7.5"];
@LostRuins
Copy link
Owner

Pinging @DontEatOreo

@RedEtherbloom
Copy link
Author

Update: Both solutions have now been tested locally and seem to resolve this

@RedEtherbloom
Copy link
Author

Ping @DontEatOreo

@DontEatOreo
Copy link

Sorry for the delay! I've had a bunch of other notifications and this slipped
through; I'll take a look

DontEatOreo added a commit to DontEatOreo/koboldcpp that referenced this issue Mar 2, 2025
DontEatOreo added a commit to DontEatOreo/koboldcpp that referenced this issue Mar 2, 2025
DontEatOreo added a commit to DontEatOreo/koboldcpp that referenced this issue Mar 2, 2025
LostRuins pushed a commit that referenced this issue Mar 3, 2025
* nix_example.md: add override example

* nix_example.md: drop graphics example, already basic nixos knowledge

* nix_example.md: format

* nix_example.md: Vulkan is disabled on macOS

Disabled in: NixOS/nixpkgs@1ccd253

* nix_examples.md: nixpkgs.config.cuda{Arches -> Capabilities}

Fixes: #1367
LostRuins pushed a commit that referenced this issue Mar 4, 2025
Squashed commit:

[b8362da] updated lite

[ed6c037] move nsigma into the regular sampler stack

[ac5f61c] relative filepath fixed

[05fe96a] export template

[ed0a5a3] nix_example.md: refactor (#1401)

* nix_example.md: add override example

* nix_example.md: drop graphics example, already basic nixos knowledge

* nix_example.md: format

* nix_example.md: Vulkan is disabled on macOS

Disabled in: NixOS/nixpkgs@1ccd253

* nix_examples.md: nixpkgs.config.cuda{Arches -> Capabilities}

Fixes: #1367

[675c62f] AutoGuess: Phi 4 (mini) (#1402)

[4bf5698] phrasing

[b8c0df0] Add Rep Pen to Top N Sigma sampler chain (#1397)

- place after nsigma and before xtc
LostRuins added a commit that referenced this issue Mar 4, 2025
…epo size

added dpe colab (+8 squashed commit)

Squashed commit:

[b8362da] updated lite

[ed6c037] move nsigma into the regular sampler stack

[ac5f61c] relative filepath fixed

[05fe96a] export template

[ed0a5a3] nix_example.md: refactor (#1401)

* nix_example.md: add override example

* nix_example.md: drop graphics example, already basic nixos knowledge

* nix_example.md: format

* nix_example.md: Vulkan is disabled on macOS

Disabled in: NixOS/nixpkgs@1ccd253

* nix_examples.md: nixpkgs.config.cuda{Arches -> Capabilities}

Fixes: #1367

[675c62f] AutoGuess: Phi 4 (mini) (#1402)

[4bf5698] phrasing

[b8c0df0] Add Rep Pen to Top N Sigma sampler chain (#1397)

- place after nsigma and before xtc (+3 squashed commit)

Squashed commit:

[87c52b9] disable VMM from HIP

[ee8906f] edit description

[e85c0e6] Remove Unnecessary Rep Counting (#1394)

* stop counting reps

* fix range-based initializer

* strike that - reverse it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants