Repository navigation
1bit OS: the image carries the new Lemonade, and its NPU registers say so the way the server reads it - #523
Merged
Conversation
…he new server reads it
On the Lemonade this image now carries (fork main after the #3771 server refactor), a top-level
"onebit_backend" in user_models.json is not read. Measured with a wrapper around the engine binary:
lemond passed `serve -m <dir> --port 8001 --device auto --alias ... --ctx-size 32768` for a register
that carried "onebit_backend": "npu", so the directory only reached the NPU because the engine's own
routing recognised a .q4nx set. The catalog's NPU entries carry the option as
recipe_options.onebit_backend, and that is what the server reads, so register the stick's directories
the same way.
Also notes in the comment that Lemonade's own catalog carries the three NPU entries by name
(Qwen3-{0.6B,1.7B,4B}-NPU-1bit): they list from the image, and this registration makes the copy on the
stick loadable without the Hub.
Verified on the merged server separately (fork PR #21): with the option honoured the load reports
`1bit unified: loading ... on the NPU`, ready in 977 ms, and the chat answers `NPU OK.` at 52.8-69.0 tok/s
(90 W cap, PCM pad (23 Oct)). Image-level VMTEST follows once engine #520 (the pin bump) merges.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…NPU names, the guest tier
The VM test checked that the appliance boots and that Lemonade serves; it did not check the four things
this image exists to do, so a regression in any of them could ship green.
Added, in the order the owner meets them:
* the LIVE banner reaches the console (the serial line is the VM's screen - a blank screen is what made
the real appliance look dead);
* `1bit-selftest` runs from the image and reports the LIVE mode; the VM has no Radeon GPU and no XDNA
NPU, so the NPU line is reported as it comes out rather than required to pass - the NPU PASS belongs
to the real boot;
* Lemonade lists the three catalog NPU entries by name (Qwen3-{0.6B,1.7B,4B}-NPU-1bit). Listing only:
the NPU cannot run under QEMU, and the check says so;
* the Guest tier still behaves as upstream v2026.43.3 defines it: with the engine binary moved aside,
a second lemond reports 0 onebit entries, and the binary is put back afterwards.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ctually be seen
Two of the assertions I added were wrong, and the first VM run said so:
* "the live banner reaches the console" matched grub's own menu line ("1bit OS v2026.43 ..."), not
init's banner - grub says "1bit OS" too. It now matches init's live-mode line ("LIVE. You are root,
on RAM"), which say() writes to /dev/console (this serial line in the VM) and to tty1, and it falls
back to the /etc/1bit/live marker rather than passing on the wrong line.
* "Lemonade lists the three NPU entries" cannot pass under QEMU: this Lemonade hides every onebit model
when the machine has no AMD GPU and no NPU - the stick's own onebit register answered model_not_found
in the VM, not just the catalog entries. The check now reads the IMAGE's own catalog
(/opt/lemonade/bin/resources/server_models.json) for the three names and for
recipe_options.onebit_backend: npu, which is what "carries them by name" actually means, and prints a
line saying why the listing cannot show them here.
The rest of the run was good: SSH, the data partition, the HRX JIT cache, Lemonade's backends on the stick
(11 of them, no download), the API key refusing an unauthenticated request, a CPU chat answering "Paris.",
and the Guest tier reporting 0 onebit entries with the engine binary moved aside.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…e way the file spells it
Two leftovers from the previous commit, both caught by running it:
* the banner check looked for a string that only ever goes to tty1, so it could not see it over the
serial console. init's menu banner - "1bit OS v2026.43 - LIVE: runs from RAM, nothing is installed,
disks are never touched", written through mc() to /dev/console and tty1 - is the line that actually
appears on the VM's screen.
* the recipe_options check used a case pattern whose quoting did not survive into the script, so it
failed against a catalog that does carry "recipe_options": {"onebit_backend": "npu"}. It greps the
catalog text now.
VMTEST PASS on the pinned Lemonade (27abcc24), 90 W cap, PCM pad (23 Oct):
SSH up 27 s after a UEFI boot from the USB image; web app HTTP 200 text/html (the prefix now builds it
with the nvm node); KaTeX font 200 woff2; 401 without the key; the stick's GGUF lists and answers
"Paris." on llamacpp:vulkan; 0 downloads (the backends came from the stick); the live banner is on the
console; 1bit-selftest runs and reports the LIVE mode, with the NPU line reported as FAIL because QEMU
has no NPU (the NPU PASS is the real boot's); the image's catalog carries Qwen3-{0.6B,1.7B,4B}-NPU-1bit
with recipe_options.onebit_backend: npu; the Guest tier reports 0 onebit entries with the engine hidden.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
PR Reviewer Guide 🔍(Review updated until commit 86a4c06)Here are some key observations to aid the review process:
|
|
Persistent review updated to latest commit 86a4c06 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
1bit OS is Lemonade on its own, with the 1bit engine embedded: the fork's
lemond, our engine with the HRXHIP kernels and the sealed NPU sets, one image (os/README.md). Two things were wrong at the image level:
The image was built against the old Lemonade pin (
a98f3e23): 271 models and a single NPU entry(
Qwen3.6-35B-A3B-NPU-1bit), so the three Qwen3 NPU catalog entries could not be addressed by name in ashipped image.
os/mini/init.shregistered an NPU model directory with a top-level"onebit_backend": "npu". TheLemonade server as of the #3771 refactor does not read that. Measured on the box with a wrapper around
the engine binary: for such a register lemond passed
i.e. no device at all — the directory reached the NPU only because the engine's own routing recognised a
.q4nxset. The catalog says it the way the server reads it:recipe_options.onebit_backend.What changes
os/mini/init.shrecipe onebitplusrecipe_options.onebit_backend: npu, the shape the merged server reads. The comment also records that the catalog carries the three NPU entries by name.os/mini/vmtest.sh1bit-selftestruns and reports the LIVE mode; Lemonade listsQwen3-{0.6B,1.7B,4B}-NPU-1bitby name; the Guest tier still hides onebit when the engine binary is moved aside (a second lemond on 13399 must report 0 entries, then the binary is restored).Both files keep their Apache-2.0 notices;
python3 tools/copyright.py --check-> rc=0.Evidence (labelled "90 W cap, PCM pad (23 Oct)")
b51c2e8(Lemonade pin27abcc24)~/wt/npupkg-wrun/os-k/1bit-os.img, 3,089,104,896 B; initramfs 91.3 MB; ESP = shim + signed grub + separate vmlinuz/initramfs + grub.cfg; 3 sealed NPU sets (30 kernels) on the data partition; HRX llama-server and the HSA runtime includedlemond 2026.45.0~1718.27abcc24— built from the pin itself, not reused from an earlier tree, so the version string names27abcc24. Web app present (41 files, 5.8 MB, built with the~/.nvmnode since the box has no system node/npm)/api/v1/modelsQwen3-0.6B-Q4_K_M)Paris.on thellamacpp:vulkanbackend1bit OS v2026.43 - LIVE: runs from RAM, nothing is installed, disks…1bit-selftestFAIL(no NPU in QEMU — see below)Qwen3-{0.6B,1.7B,4B}-NPU-1bitby name, each withrecipe_options.onebit_backend: npu~/wt/npupkg-wrun/out/1bit-os-v2026.43-pin27abcc24.img.zst— 921,992,337 B,sha256 dd2b41a73c8d0e483089dbc55c3dbe06b55088200b8c14c208217a9e03870a52What the VM proves, and what it cannot
The VM has no Radeon GPU and no XDNA NPU, so:
mounts, the LIVE banner is on the console,
1bit-selftestruns and reports the LIVE mode, Lemonade serveswith its key, the onebit entries and the three NPU catalog names are listed, and the Guest tier hides them
when the engine is absent.
a GPU/HRX chat.
1bit-selftestreports the NPU line as it comes out instead of requiring it to pass; theNPU PASS and the placement line belong to the real boot.
Owner's step (the real hardware boot — I did not write any device)
The writer refuses anything that is not a whole removable USB device, refuses a device that backs
/or/bootor has a mounted partition, and prints what it is about to destroy before doing it;--yesisrequired. Then boot the stick: on strixhalo the firmware keeps rewriting the USB entry into a dead
VenHwstub, so recreate and arm it in one step:On the booted stick: log in on the screen (
/ #on tty1), run1bit-selftest, and expectRESULT: PASSplus
RESULT-NPU: PASSwith the placement line in/data/selftest.log.One thing to decide before this ships: the image still reports v2026.43 in the banner and the grub menu
while it carries Lemonade
2026.45.0~1718.27abcc24. I did not rename a release on my own authority — theartifact is named
…-pin27abcc24so it cannot be confused with the previous one.🤖 Generated with Claude Code