Skip to content

chore: faster builds, fzf lua - #74

Merged
harivansh-afk merged 1 commit into
mainfrom
improvements
Apr 18, 2026
Merged

chore: faster builds, fzf lua#74
harivansh-afk merged 1 commit into
mainfrom
improvements

Conversation

@harivansh-afk

@harivansh-afk harivansh-afk commented Apr 18, 2026

Copy link
Copy Markdown
Owner
  • fzf lua ui improvements
  • new keybinds nvim grep
  • faster builds with justfile leveraging
  • fix forward arrow in insert mode when using autocomplete

Open in Devin Review

@harivansh-afk
harivansh-afk merged commit 0db4171 into main Apr 18, 2026
1 check failed

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@harivansh-afk
harivansh-afk deleted the improvements branch May 1, 2026 23:43
harivansh-afk added a commit that referenced this pull request May 15, 2026
The 121B Step-Flash-REAP model loaded with `-ngl 99` and `-c 131072` pinned ~76 GiB of GPU plus large NVIDIA-driver host pages on spark, exhausting host RAM and making forgejo (and everything else on the box) thrash on zram swap.

Disable the service so it does not auto-start at boot. Run `systemctl start llama-cpp` manually when actually needed.

Reviewed-on: https://git.harivan.sh/harivansh-afk/nix/pulls/74
Co-authored-by: Harivansh Rathi <rathiharivansh@gmail.com>
Co-committed-by: Harivansh Rathi <rathiharivansh@gmail.com>
harivansh-afk added a commit that referenced this pull request May 16, 2026
## Summary

Re-enable the llama-cpp service on spark but with auto-sleep so it stops pinning ~76 GiB of VRAM and NVIDIA driver host pages 24/7. That was the original reason the service was disabled in #74.

## Changes

- `enable = true` so the systemd unit has a real `ExecStart` again
- `-c 32768` (was `131072`): shrinks KV cache from ~6.5 GiB to ~1.6 GiB on GPU
- `--sleep-idle-seconds 600`: weights + KV cache unload from VRAM after 10 min idle; next request reloads transparently (flag is present in the current nixpkgs llama-cpp build, verified via `llama-server --help`)
- `OOMScoreAdjust = 1000` on the unit: llama-server is the first kill target if memory pressure ever spikes, protecting forgejo

## How the auto-sleep works

`--sleep-idle-seconds` (PR ggml-org/llama.cpp#18228) keeps the server process alive at near-zero footprint after the timeout, then lazy-reloads on the next request. Different from `--standby-timeout`, which kills the whole server process. Sleep is the better fit here because pi keeps a long-lived OpenAI-compatible client against `127.0.0.1:8080`.

## Test plan

- [ ] `nixos-rebuild switch --flake .#spark` on spark
- [ ] `systemctl status llama-cpp` shows `active (running)`
- [ ] `curl -s http://127.0.0.1:8080/health` returns `{"status":"ok"}`
- [ ] First completion request loads the model; `nvidia-smi` shows VRAM usage climb to ~70 GiB
- [ ] Wait ~11 minutes idle; `nvidia-smi` shows VRAM drop back to near-zero, process still alive
- [ ] Next request reloads model and serves a completion
- [ ] Pi (`dots/pi/models.json`) routes through unchanged
- [ ] `systemctl status forgejo` shows no degradation while idle

Reviewed-on: https://git.harivan.sh/harivansh-afk/nix/pulls/87
Co-authored-by: Harivansh Rathi <rathiharivansh@gmail.com>
Co-committed-by: Harivansh Rathi <rathiharivansh@gmail.com>
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

Successfully merging this pull request may close these issues.

1 participant