guixsd-config

GuixSD configs for my systems
Log | Files | Refs

commit fbe53e38551475f585c36faed4b3924bdb47975c
parent 31253c985da70c72b8997ffe99d180ab57ba82e8
Author: Vineet Kumar <git@vineetk.net>
Date:   Sat, 25 Apr 2026 21:26:05 -0400

packages/machine-learning: add llama-swap package

Diffstat:
Mepistemia/packages/machine-learning.scm | 48++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+), 0 deletions(-)

diff --git a/epistemia/packages/machine-learning.scm b/epistemia/packages/machine-learning.scm @@ -1,9 +1,15 @@ (define-module (epistemia packages machine-learning) #:use-module (guix packages) + #:use-module (guix build-system go) #:use-module (guix download) #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix gexp) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages base) + #:use-module (gnu packages golang-check) + #:use-module (gnu packages golang-web) + #:use-module (gnu packages golang-xyz) #:use-module (gnu packages llvm) #:use-module (gnu packages machine-learning) #:use-module (gnu packages rocm) @@ -81,3 +87,45 @@ hipblas hipblas-common rocblas))))) + +(define-public llama-swap + (package + (name "llama-swap") + ;; after this is using react and then svelte instead of plain + ;; html. also no longer using google/shlex after this. + (version "115") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mostlygeek/llama-swap") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0g8shkyihfg5nan34fi3nyaww2a4mxvwy4w0drxd3ipfrxglj8ms")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/mostlygeek/llama-swap" + #:install-source? #f + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'simple-responder + (lambda _ + (with-directory-excursion "src/github.com/mostlygeek/llama-swap" + (invoke "make" "simple-responder"))))))) + (native-inputs (list gnu-make)) + (propagated-inputs (list go-github-com-fsnotify-fsnotify + go-github-com-gin-gonic-gin + go-github-com-google-shlex + go-github-com-tidwall-gjson + go-github-com-tidwall-sjson + go-github-com-stretchr-testify + go-gopkg-in-yaml-v3)) + (home-page "https://github.com/mostlygeek/llama-swap") + (synopsis "llama-swap") + (description + "llama-swap is an @code{OpenAI} API compatible server that gives you complete +control over how you use your hardware. It automatically swaps to the +configuration of your choice for serving a model.") + (license license:expat)))