The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
feat(neuron): the vector tool ships with Linux too
purple09d925145395
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 33e8f3f2..c442a72f 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -264,10 +264,11 @@ jobs:*) touch "src-tauri/bin/lu-llama-server-$triple" ;;esac# The Neuron tweaker's vector tool (3.0.9, P11) is a second- # externalBin on Windows (tauri.windows.conf.json), so it needs its- # stub too. Linux does not ship it.+ # externalBin on Windows and Linux (tauri.windows.conf.json,+ # tauri.linux.conf.json), so it needs its stub too.case "$triple" in*-windows-*) touch "src-tauri/bin/lu-llama-cvector-generator-$triple.exe" ;;+ *) touch "src-tauri/bin/lu-llama-cvector-generator-$triple" ;;esacls -la src-tauri/bin/# K1 (3.0.1): tauri.windows.conf.json / tauri.linux.conf.json now@@ -525,10 +526,11 @@ jobs:*) touch "src-tauri/bin/lu-llama-server-$triple" ;;esac# The Neuron tweaker's vector tool (3.0.9, P11) is a second- # externalBin on Windows (tauri.windows.conf.json), so it needs its- # stub too. Linux does not ship it.+ # externalBin on Windows and Linux (tauri.windows.conf.json,+ # tauri.linux.conf.json), so it needs its stub too.case "$triple" in*-windows-*) touch "src-tauri/bin/lu-llama-cvector-generator-$triple.exe" ;;+ *) touch "src-tauri/bin/lu-llama-cvector-generator-$triple" ;;esacls -la src-tauri/bin/# K1 (3.0.1): this job runs a REAL `tauri build`, which resolvesdiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex fc1d191e..80df17c8 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -368,6 +368,13 @@ jobs:*-windows-*) test -f "src-tauri/bin/lu-llama-server-${{ matrix.sidecar_triple }}.exe" ;;*) test -x "src-tauri/bin/lu-llama-server-${{ matrix.sidecar_triple }}" ;;esac+ # The Neuron tweaker's vector tool (3.0.9, P11) ships on every+ # desktop platform (FEHLER-P11 #7): without it the ready-made and+ # own sliders cannot be computed, so a build without it is not one.+ case "${{ matrix.sidecar_triple }}" in+ *-windows-*) test -f "src-tauri/bin/lu-llama-cvector-generator-${{ matrix.sidecar_triple }}.exe" ;;+ *) test -x "src-tauri/bin/lu-llama-cvector-generator-${{ matrix.sidecar_triple }}" ;;+ esacls -la src-tauri/bin/# review-k1-avx.md R1-R6: dumpbin.exe (the Windows half of the guard@@ -536,6 +543,44 @@ jobs:esacecho "OK: sidecar boots from $moved, loads a real model, /health answers, and has a libggml-cpu-*.so from $moved/llama mapped, nowhere near the build directory it was compiled in"+ # FEHLER-P11 #7: the vector tool links the same libllama/libggml*/+ # libllama-common the server does, and the app starts it the way it+ # starts the server (cwd and LD_LIBRARY_PATH on the companions+ # directory, engine.rs prepare_tool_command). Same moved-directory+ # proof as above, with a real run: two example lines each way through+ # the tiny model, and the control vector it writes must be there.+ - name: "Vector tool computes from a moved directory (P11)"+ if: matrix.sidecar_triple == 'x86_64-unknown-linux-gnu'+ shell: bash+ timeout-minutes: 5+ run: |+ set -euo pipefail+ moved="$RUNNER_TEMP/moved-cvector"+ rm -rf "$moved"+ mkdir -p "$moved"+ cp "src-tauri/bin/lu-llama-cvector-generator-${{ matrix.sidecar_triple }}" "$moved/"+ cp -r "src-tauri/resources/llama/${{ matrix.sidecar_triple }}" "$moved/llama"+ chmod +x "$moved/lu-llama-cvector-generator-${{ matrix.sidecar_triple }}"+ export LD_LIBRARY_PATH="$moved/llama${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"+ model="$RUNNER_TEMP/stories260K.gguf"+ if [ ! -f "$model" ]; then+ curl -fsSL --retry 3 --max-time 60 -o "$model" \+ "https://huggingface.co/ggml-org/models/resolve/${STORIES260K_REVISION}/tinyllamas/stories260K.gguf"+ fi+ echo "${STORIES260K_SHA256} $model" | sha256sum -c - \+ || { echo "FAIL: stories260K.gguf did not match the pinned sha256" >&2; exit 1; }+ printf 'Once upon a time there was a happy dog.\nThe sun was bright and everyone smiled.\n' > "$moved/more.txt"+ printf 'Once upon a time there was a sad dog.\nThe rain fell and everyone cried.\n' > "$moved/less.txt"+ ( cd "$moved/llama" && "$moved/lu-llama-cvector-generator-${{ matrix.sidecar_triple }}" -m "$model" \+ --positive-file "$moved/more.txt" --negative-file "$moved/less.txt" \+ -o "$moved/direction.gguf" --method mean -c 256 ) >/tmp/cvector.log 2>&1 || {+ cat /tmp/cvector.log+ echo "FAIL: lu-llama-cvector-generator exited non-zero from $moved" >&2+ exit 1+ }+ [ -s "$moved/direction.gguf" ] || { cat /tmp/cvector.log; echo "FAIL: no control vector written" >&2; exit 1; }+ echo "OK: the vector tool computes a control vector from $moved, nowhere near the build directory"+# Nachbesserung N5 (review-sidecar.md, Runde 2): before this step,# release.yml had no real model-load proof for EITHER platform (the# only place that existed was sidecar-windows.yml, a different@@ -923,6 +968,11 @@ jobs:done[ "$missing" -eq 0 ] || exit 1echo "OK: every staged sidecar companion is present inside the built AppImage ($extracted_llama_dir)"+ for exe in lu-llama-server lu-llama-cvector-generator; do+ [ -x "$workdir/squashfs-root/usr/bin/$exe" ] \+ || { echo "FAIL: usr/bin/$exe is missing from the built AppImage (FEHLER-P11 #7)" >&2; exit 1; }+ done+ echo "OK: lu-llama-server and lu-llama-cvector-generator are in the AppImage's usr/bin"# GH #191: .DirIcon and the .desktop file at the AppImage's root are# symlinks, and they must be RELATIVE. The bundler before# @tauri-apps/cli 2.11.4 wrote the build machine's absolute path@@ -976,6 +1026,11 @@ jobs:done[ "$missing" -eq 0 ] || exit 1echo "OK: every staged sidecar companion is present inside the built .deb ($extracted_llama_dir)"+ for exe in lu-llama-server lu-llama-cvector-generator; do+ [ -x "$workdir/usr/bin/$exe" ] \+ || { echo "FAIL: usr/bin/$exe is missing from the built .deb (FEHLER-P11 #7)" >&2; exit 1; }+ done+ echo "OK: lu-llama-server and lu-llama-cvector-generator are in the .deb's usr/bin"# ── Dry run: the judged files, and no release ────────────────────────# Last, so that only a build that passed every check above is handed@@ -1262,6 +1317,8 @@ jobs:set -euo pipefailbin="src-tauri/bin/lu-llama-server-$SIDECAR_TRIPLE"test -x "$bin"+ # The Neuron tweaker's vector tool ships here too (FEHLER-P11 #7).+ test -x "src-tauri/bin/lu-llama-cvector-generator-$SIDECAR_TRIPLE"ls -la src-tauri/bin/file "$bin" | grep -q 'arm64' || { echo "FAIL: the sidecar is not an arm64 binary" >&2; exit 1; }minos="$(otool -l "$bin" | awk '/LC_BUILD_VERSION/{f=1} f && /minos/ && !done {print $2; done=1}')"diff --git a/scripts/build-llama.sh b/scripts/build-llama.shindex 70d858bf..a99055fc 100755--- a/scripts/build-llama.sh+++ b/scripts/build-llama.sh@@ -226,17 +226,20 @@ quantize_out_name_for() {echo "lu-llama-quantize-$1"}-# llama-cvector-generator (3.0.9, P11 Neuron tweaker) ships on macOS and-# Windows: it turns two short lists of example prompts into a control vector-# for the model the user has, which llama-server then applies with-# --control-vector. Same pinned source tree, same flags as the server. On-# Windows it links the same llama/ggml/llama-common DLLs the server already-# stages beside the exe, so it needs nothing of its own. Linux does not ship-# it yet (AppImage/deb library layout is a separate check).+# llama-cvector-generator (3.0.9, P11 Neuron tweaker) ships on all three+# desktop platforms: it turns two short lists of example prompts into a+# control vector for the model the user has, which llama-server then applies+# with --control-vector. Same pinned source tree, same flags as the server.+# On Windows and Linux it links the same llama/ggml/llama-common libraries+# the server already has staged in resources/llama/<triple>/ (every .dll/.so+# cmake writes beside the binaries goes there, see+# stage_dynamic_isa_companions), and the app starts it with the server's own+# library path (engine.rs prepare_tool_command), so it needs nothing of its+# own. FEHLER-P11 #7: everything a feature needs must come with the install.cvector_ships_for() {case "$1" in- *-apple-darwin | x86_64-pc-windows-msvc) return 0 ;;- *) return 1 ;;+ *-apple-darwin | x86_64-pc-windows-msvc | x86_64-unknown-linux-gnu) return 0 ;;+ *) return 1 ;;esac}diff --git a/src-tauri/src/commands/neuron/mod.rs b/src-tauri/src/commands/neuron/mod.rsindex b928307c..e5f9346a 100644--- a/src-tauri/src/commands/neuron/mod.rs+++ b/src-tauri/src/commands/neuron/mod.rs@@ -407,7 +407,7 @@ pub fn tool_failure(stderr: &str) -> String {/// Runs the generator on the example pairs and returns the direction.fn generate(app: &tauri::AppHandle, model_path: &str, plus: &[String], minus: &[String], work: &Path) -> Result<cvec::ControlVector, String> {- let binary = generator_binary(app).ok_or("This build of LU has no vector tool (lu-llama-cvector-generator). On Linux it comes in a later version.")?;+ let binary = generator_binary(app).ok_or("This install of LU is missing its vector tool (lu-llama-cvector-generator). Reinstall LU to bring it back.")?;std::fs::create_dir_all(work).map_err(|e| crate::os_error::english(&e))?;let pos = work.join("more.txt");let neg = work.join("less.txt");@@ -608,7 +608,7 @@ pub async fn neuron_info(app: tauri::AppHandle, model_path: String) -> Result<Vapub fn neuron_build(app: tauri::AppHandle, args: BuildArgs) -> Result<Value, String> {let facts = model::facts(&args.model_path)?;if generator_binary(&app).is_none() {- return Err("This build of LU has no vector tool (lu-llama-cvector-generator). Feature sliders still work where the model has an SAE.".into());+ return Err("This install of LU is missing its vector tool (lu-llama-cvector-generator). Reinstall LU to bring it back. Feature sliders still work where the model has an SAE.".into());}let (id, kind, name, left, right, plus, minus) = match &args.preset {Some(pid) => {diff --git a/src-tauri/tauri.linux.conf.json b/src-tauri/tauri.linux.conf.jsonindex 5d0b6a17..ba75e892 100644--- a/src-tauri/tauri.linux.conf.json+++ b/src-tauri/tauri.linux.conf.json@@ -17,6 +17,10 @@]},"bundle": {+ "externalBin": [+ "bin/lu-llama-server",+ "bin/lu-llama-cvector-generator"+ ],"resources": {"resources/whisper_server.py": "resources/whisper_server.py","resources/voice_loop/lu_voice_loop/*.py": "resources/voice_loop/lu_voice_loop/",diff --git a/src/components/neuron/NeuronView.tsx b/src/components/neuron/NeuronView.tsxindex ea66f43d..6d195df4 100644--- a/src/components/neuron/NeuronView.tsx+++ b/src/components/neuron/NeuronView.tsx@@ -250,7 +250,7 @@ export function NeuronView() {<Section title="Sliders">{info && !info.generator && (- <Hinweis className="mb-2">This build has no vector tool, so ready-made and own sliders cannot be computed here (Linux: later version). Feature sliders work where the model has one.</Hinweis>+ <Hinweis className="mb-2">This install is missing its vector tool, so ready-made and own sliders cannot be computed. Reinstall LU to bring it back. Feature sliders still work where the model has one.</Hinweis>)}<div className="space-y-2" data-testid="neuron-presets">{presets.map((p) => {diff --git a/src/components/neuron/__tests__/neuron-view-steers-the-engine.test.tsx b/src/components/neuron/__tests__/neuron-view-steers-the-engine.test.tsxindex df6b662e..69b314c5 100644--- a/src/components/neuron/__tests__/neuron-view-steers-the-engine.test.tsx+++ b/src/components/neuron/__tests__/neuron-view-steers-the-engine.test.tsx@@ -83,7 +83,7 @@ describe('Neuron tweaker view', () => {const button = (await screen.findByTestId('neuron-compute-creative')) as HTMLButtonElement// Locked until the model's info says the vector tool is there; a click// before that does nothing, as it should.- expect(screen.queryByText(/This build has no vector tool/)).toBeNull()+ expect(screen.queryByText(/missing its vector tool/)).toBeNull()await waitFor(() => expect(button.disabled).toBe(false))fireEvent.click(button)await waitFor(() => expect(buildPreset).toHaveBeenCalledWith('/models/qwen.gguf', 'creative'))diff --git a/src/lib/__tests__/vektorwerkzeug-in-jedem-desktop-paket.test.ts b/src/lib/__tests__/vektorwerkzeug-in-jedem-desktop-paket.test.tsnew file mode 100644index 00000000..0fc03854--- /dev/null+++ b/src/lib/__tests__/vektorwerkzeug-in-jedem-desktop-paket.test.ts@@ -0,0 +1,50 @@+/**+ * Das Vektorwerkzeug des Neuron tweakers (lu-llama-cvector-generator, 3.0.9+ * P11) kommt mit jedem Desktop-Paket: Mac, Windows, Linux.+ *+ * FEHLER-P11 #7 (I1, Davids Vorgabe vom 29.10.: "alles was man braucht muss+ * in app installierbar sein. mac linux windows."): Linux baute es nicht, das+ * Overlay fuehrte es nicht, ohne es gehen fertige und eigene Regler nicht.+ * Ein Overlay mit eigener externalBin-Liste ersetzt die des Basis-Configs,+ * also muss jedes es selbst nennen, und der Bau muss es fuer jedes Ziel+ * bauen. release.yml prueft je Plattform, dass es da ist.+ *+ * Gegenprobe: ohne die Zeile in tauri.linux.conf.json oder ohne+ * x86_64-unknown-linux-gnu in cvector_ships_for ist der Fall rot.+ *+ * Lauf: npx vitest run src/lib/__tests__/vektorwerkzeug-in-jedem-desktop-paket.test.ts+ */+import { describe, it, expect } from 'vitest'+import { readFileSync } from 'node:fs'+import { resolve } from 'node:path'++const ROOT = resolve(__dirname, '../../..')+const read = (p: string) => readFileSync(resolve(ROOT, p), 'utf8')+const conf = (name: string) => JSON.parse(read(`src-tauri/${name}`))+const TOOL = 'bin/lu-llama-cvector-generator'++describe('das Vektorwerkzeug steht in jedem Desktop-Paket', () => {+ for (const name of ['tauri.macos.conf.json', 'tauri.windows.conf.json', 'tauri.linux.conf.json']) {+ it(name, () => {+ const bins: string[] = conf(name).bundle.externalBin+ expect(bins).toContain('bin/lu-llama-server')+ expect(bins).toContain(TOOL)+ })+ }++ it('der Bau baut es fuer alle drei Ziele', () => {+ const fn = read('scripts/build-llama.sh').split('cvector_ships_for() {')[1].split('}')[0]+ for (const triple of ['*-apple-darwin', 'x86_64-pc-windows-msvc', 'x86_64-unknown-linux-gnu']) {+ expect(fn).toContain(triple)+ }+ })++ it('der Release prueft es je Plattform und rechnet unter Linux echt', () => {+ const release = read('.github/workflows/release.yml')+ expect(release).toContain('test -f "src-tauri/bin/lu-llama-cvector-generator-${{ matrix.sidecar_triple }}.exe"')+ expect(release).toContain('test -x "src-tauri/bin/lu-llama-cvector-generator-${{ matrix.sidecar_triple }}"')+ expect(release).toContain('test -x "src-tauri/bin/lu-llama-cvector-generator-$SIDECAR_TRIPLE"')+ expect(release).toContain('Vector tool computes from a moved directory (P11)')+ expect(release.match(/for exe in lu-llama-server lu-llama-cvector-generator; do/g)).toHaveLength(2)+ })+})