diff options
| author | Vineet Kumar <git@vineetk.net> | 2026-04-25 21:26:05 -0400 |
|---|---|---|
| committer | Vineet Kumar <git@vineetk.net> | 2026-04-25 21:27:58 -0400 |
| commit | fbe53e38551475f585c36faed4b3924bdb47975c (patch) | |
| tree | b59eaa617ae95738cc4acdf912a855a93254ab5e | |
| parent | 31253c985da70c72b8997ffe99d180ab57ba82e8 (diff) | |
packages/machine-learning: add llama-swap package
| -rw-r--r-- | epistemia/packages/machine-learning.scm | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/epistemia/packages/machine-learning.scm b/epistemia/packages/machine-learning.scm index b3e121b..30f89ff 100644 --- a/epistemia/packages/machine-learning.scm +++ b/epistemia/packages/machine-learning.scm | |||
| @@ -1,9 +1,15 @@ | |||
| 1 | (define-module (epistemia packages machine-learning) | 1 | (define-module (epistemia packages machine-learning) |
| 2 | #:use-module (guix packages) | 2 | #:use-module (guix packages) |
| 3 | #:use-module (guix build-system go) | ||
| 3 | #:use-module (guix download) | 4 | #:use-module (guix download) |
| 4 | #:use-module (guix utils) | 5 | #:use-module (guix utils) |
| 5 | #:use-module (guix git-download) | 6 | #:use-module (guix git-download) |
| 6 | #:use-module (guix gexp) | 7 | #:use-module (guix gexp) |
| 8 | #:use-module ((guix licenses) #:prefix license:) | ||
| 9 | #:use-module (gnu packages base) | ||
| 10 | #:use-module (gnu packages golang-check) | ||
| 11 | #:use-module (gnu packages golang-web) | ||
| 12 | #:use-module (gnu packages golang-xyz) | ||
| 7 | #:use-module (gnu packages llvm) | 13 | #:use-module (gnu packages llvm) |
| 8 | #:use-module (gnu packages machine-learning) | 14 | #:use-module (gnu packages machine-learning) |
| 9 | #:use-module (gnu packages rocm) | 15 | #:use-module (gnu packages rocm) |
| @@ -81,3 +87,45 @@ | |||
| 81 | hipblas | 87 | hipblas |
| 82 | hipblas-common | 88 | hipblas-common |
| 83 | rocblas))))) | 89 | rocblas))))) |
| 90 | |||
| 91 | (define-public llama-swap | ||
| 92 | (package | ||
| 93 | (name "llama-swap") | ||
| 94 | ;; after this is using react and then svelte instead of plain | ||
| 95 | ;; html. also no longer using google/shlex after this. | ||
| 96 | (version "115") | ||
| 97 | (source | ||
| 98 | (origin | ||
| 99 | (method git-fetch) | ||
| 100 | (uri (git-reference | ||
| 101 | (url "https://github.com/mostlygeek/llama-swap") | ||
| 102 | (commit (string-append "v" version)))) | ||
| 103 | (file-name (git-file-name name version)) | ||
| 104 | (sha256 | ||
| 105 | (base32 "0g8shkyihfg5nan34fi3nyaww2a4mxvwy4w0drxd3ipfrxglj8ms")))) | ||
| 106 | (build-system go-build-system) | ||
| 107 | (arguments | ||
| 108 | (list | ||
| 109 | #:import-path "github.com/mostlygeek/llama-swap" | ||
| 110 | #:install-source? #f | ||
| 111 | #:phases | ||
| 112 | #~(modify-phases %standard-phases | ||
| 113 | (add-before 'check 'simple-responder | ||
| 114 | (lambda _ | ||
| 115 | (with-directory-excursion "src/github.com/mostlygeek/llama-swap" | ||
| 116 | (invoke "make" "simple-responder"))))))) | ||
| 117 | (native-inputs (list gnu-make)) | ||
| 118 | (propagated-inputs (list go-github-com-fsnotify-fsnotify | ||
| 119 | go-github-com-gin-gonic-gin | ||
| 120 | go-github-com-google-shlex | ||
| 121 | go-github-com-tidwall-gjson | ||
| 122 | go-github-com-tidwall-sjson | ||
| 123 | go-github-com-stretchr-testify | ||
| 124 | go-gopkg-in-yaml-v3)) | ||
| 125 | (home-page "https://github.com/mostlygeek/llama-swap") | ||
| 126 | (synopsis "llama-swap") | ||
| 127 | (description | ||
| 128 | "llama-swap is an @code{OpenAI} API compatible server that gives you complete | ||
| 129 | control over how you use your hardware. It automatically swaps to the | ||
| 130 | configuration of your choice for serving a model.") | ||
| 131 | (license license:expat))) | ||
