Skip to content

recipe: llama-cpp-python 0.3.36 - #131

Merged
ndonkoHenri merged 1 commit into
flet-dev:mainfrom
ndonkoHenri:llama-cpp-python-0.3.36
Nov 2, 2026
Merged

ndonkoHenri merged 1 commit into
flet-dev:mainfrom
ndonkoHenri:llama-cpp-python-0.3.36

Conversation

@ndonkoHenri

@ndonkoHenri ndonkoHenri commented Nov 2, 2026 •

Copy link
Copy Markdown

What

llama-cpp-python 0.3.32 → 0.3.36, which vendors llama.cpp 0c1e57098.

Why

Requested in flet-dev/flet#7033, and the recipe was four releases behind.

This does not add LFM3 support, which is what the discussion asks for. LFM3 needs llama.cpp b11960 (v0.8.0), and 0.3.36, like upstream's main, vendors a commit 648 behind it with no lfm3 architecture. We deliberately do not swap the vendored llama.cpp: the bindings hand-write the C structs, and b11960 adds moe_cache_size in the middle of llama_context_params, so every later field would be misread without an error. LFM3 waits for an upstream release that vendors b11960 or newer.

Changes

  • meta.yaml: version 0.3.36, build 1.
  • patches/mobile.patch: regenerated against the new sdist. The libllama hunk now targets LLAMA_VERSION_BASE/LLAMA_VERSION_MAJOR; the other changes carry over.

Validation

  • Fork CI, Python 3.12, 3.13 and 3.14 on Android and iOS: all 6 builds pass and each on-device run exits 0 (run). That test only proves the libraries load and answer; it never loads a model.
  • hand-built-gguf example from examples-and-docs, built locally with Python 3.14 and Flet 1.0.5: writes a model, loads it, generates, and matches a numpy forward pass (PASS).
    • iOS simulator: 2 of 2 launches.
    • Android arm64-v8a emulator: 5 of 6. The first launch, right after the emulator booted, hung on its spinner with RuntimeError: cannot schedule new futures after shutdown from Flet's thread pool. It did not recur across 3 relaunches and 2 fresh installs. The cause is not established and a launch right after boot was not retried. Published 0.3.32 passed once as a control, on an emulator already up.
  • Wheels checked for Android arm64-v8a and iOS arm64 simulator: the same four libraries, 16 KB LOAD alignment on all four Android ones, unversioned sonames, libllama is MH_DYLIB.
  • Not checked: a real LFM3 or other large GGUF on a device.

Consumer notes

Apps pick this up with a rebuild. It gives Flet apps the newer llama.cpp's model support, but not LFM3. Consumer guidance is in recipes/llama-cpp-python/README.md and the hand-built-gguf example on the examples-and-docs branch; the example's 0.3.32 pin and the page's measured wheel sizes still need updating there.

Vendors llama.cpp 0c1e57098. mobile.patch is regenerated against the new
sdist: the libllama hunk moved to LLAMA_VERSION_BASE/LLAMA_VERSION_MAJOR, the
other changes carry over.
@ndonkoHenri
ndonkoHenri merged commit c3edb2a into flet-dev:main Nov 2, 2026
6 of 12 checks passed
@ndonkoHenri
ndonkoHenri deleted the llama-cpp-python-0.3.36 branch November 2, 2026 23:31
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