CI / test (push) Successful in 9m37s
FreeToken (FlashML-org/FreeToken) serves mixture-of-experts models several times a card's size from one card, experts in RAM, from Hugging Face safetensors checkpoints. Installed like vLLM, from PyPI by uv, on every node it runs on: compute capability 8.0+, driver 580+, x86-64, and the CUDA 13 toolkit it compiles kernels with. Older cards are passed over: on cuda01's Quadro RTX 6000 (7.5) 0.2.1 had no kernel image for the first prefill, and in fp16 hit an illegal memory access on its first request. ft serve gets the model, address, card and served name; the key goes in FREETOKEN_API_KEY. Flags that read files or fetch are refused, as are FREETOKEN_ variables naming paths or the agent's own settings. ctl model context sets --max-seq-len-override. Readiness now also waits for an engine whose /health answers 200 while its body says "loading", as FreeToken's does from the moment its HTTP server is up. FreeToken is followed release by release: a weekly workflow fails when PyPI has a version newer than DefaultEngines installs (scripts/engine_releases.py). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.4 KiB
Go
49 lines
1.4 KiB
Go
package discovery
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
func toolkit(t *testing.T, root, name, version string) string {
|
|
t.Helper()
|
|
d := filepath.Join(root, name)
|
|
put(t, d, "bin/nvcc", "#!/bin/sh")
|
|
if version != "" {
|
|
put(t, d, "version.json", `{"cuda":{"name":"CUDA SDK","version":"`+version+`"}}`)
|
|
}
|
|
return d
|
|
}
|
|
|
|
func TestTheNewestToolkitOfTheMajorVersionAskedForIsFound(t *testing.T) {
|
|
root := t.TempDir()
|
|
toolkit(t, root, "cuda-12.8", "12.8.1")
|
|
toolkit(t, root, "cuda-13.4", "13.4.0")
|
|
want := toolkit(t, root, "cuda-13.10", "13.10.0")
|
|
// /usr/local/cuda is a 12: a toolkit of the wrong major version is not
|
|
// one torch built for 13 can load what it compiles.
|
|
toolkit(t, root, "cuda", "12.8.1")
|
|
if got := cudaToolkitIn(13, "", root); got != want {
|
|
t.Errorf("got %q, want %q", got, want)
|
|
}
|
|
if got := cudaToolkitIn(12, "", root); got != filepath.Join(root, "cuda") {
|
|
t.Errorf("12: got %q", got)
|
|
}
|
|
// CUDA_HOME first, when it is one.
|
|
home := toolkit(t, t.TempDir(), "mine", "13.0.2")
|
|
if got := cudaToolkitIn(13, home, root); got != home {
|
|
t.Errorf("CUDA_HOME: got %q", got)
|
|
}
|
|
if got := cudaToolkitIn(14, "", root); got != "" {
|
|
t.Errorf("14: got %q", got)
|
|
}
|
|
// A directory without nvcc is not a toolkit.
|
|
if err := os.MkdirAll(filepath.Join(root, "cuda-13.99"), 0o755); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if got := cudaToolkitIn(13, "", root); got != want {
|
|
t.Errorf("with an empty cuda-13.99: got %q", got)
|
|
}
|
|
}
|