Skip to content

0.3.0

Choose a tag to compare

@github-actions github-actions released this 11 Sep 07:38
· 27 commits to main since this release

Changes since the last Release

Changed

  • Update llama.cpp to v0.4.0 (from v0.3.0); whisper.cpp and stable-diffusion.cpp unchanged. Two upstream signature changes, both caught at compile time. llm_ffn_exps_block_regex(i) became llm_ffn_block_regex(i, ffn_regex) when upstream generalised the MoE offload helpers to cover dense FFN tensors too (--n-cpu-ffn); --n-cpu-moe now passes LLM_FFN_EXPS_REGEX explicitly. The sibling llm_add_n_cpu_ffn_overrides() was not adopted: it parks the pattern strings in a function-local static std::list that grows on every call, which is fine for a process that loads one model and wrong for a library whose load_* entrypoints can be called repeatedly; chimera already owns the storage in ModelExtras. mtmd_helper_bitmap_init_from_file() gained a fourth mtmd_helper_init_opt argument carrying the video decode parameters; the two call sites pass mtmd_helper_init_opt_default(), since --video-fps/--video-timestamp-ms/--ffmpeg-dir reach the decoder through mtmd_helper_video_init() on the explicit --video path, not through image loading.

    Runtime-visible without a code change: LLAMA_SESSION_VERSION 9 -> 10 and LLAMA_STATE_SEQ_VERSION 2 -> 3, so slot state written by an earlier chimera (--slot-save-path) is rejected on load. Not wrapped: llama_model_params::lazy_mode (on-demand tensor reads) and upstream's new --n-cpu-ffn.

Fixed

  • An embedding input longer than the context aborted the process. Embedder::embed() tokenized with add_special and handed the result straight to llama_decode, but the encoder path asserts GGML_ASSERT(cparams.n_ubatch >= n_tokens && "encoder requires n_ubatch >= n_tokens") -- an abort() inside llama.cpp, not a return code, so there was nothing downstream to turn into a clean exit. chimera embed on any text past the model's context died this way, and so did chimera index ingest at its default settings: the chunkers clamp chunk_tokens to Embedder::n_ctx(), which counts content tokens only, so add_special then adds the model's [CLS]/[SEP] on top and a full-width chunk arrives over the line. With bge-small-en -- whose 512-token training context is also the default chunk window -- that is the first full chunk of the first file, so ingesting a README with a default-configured collection never worked. -c/--ctx-size was no escape; n_ubatch is not derived from it. embed() now clamps to min(n_ctx, n_ubatch), the same clamp rather than fail policy the two guards in chimera_serve.cpp already applied on the server paths, and re-seats the trailing separator token after the resize -- cls and last pooling both read the ends of the sequence, so dropping it would change what those two pool over. The first truncation per Embedder warns on stderr; later ones are silent, since ingest drives thousands of chunks through one instance. The chunk_by_tokens docs claimed the opposite invariant ("chunks always fit through embed(text) without truncation") and have been corrected to describe the special-token headroom rather than promise it.

Added

  • scripts/rat.py ("run artifact tests"), a smoke-test runner for build artifacts. make test tests the tree you just built; nothing tested the binary CI produces, which is the one that gets released. rat.py checks it before release: --bin takes a bare executable (a downloaded CI artifact or a local build), --asset a local archive or URL, and rat.py install --cuda resolves a GitHub release (default /releases/latest), picks the asset from the backend plus the host -- --cuda on Linux is chimera-<version>-linux-x86_64-cuda.tar.gz -- and unpacks the binary into build/rat/; rat.py test test-all then drives that binary's CLI across embeddings, transcription, generation, the vector store and image generation, and run is install + test + clean in one command. Two things the suite knows that a hand-run CLI does not: --gpu-layers is not optional (chimera's llama-side subcommands default to 0, so a GPU release tested without it would pass every case while measuring nothing but the CPU path), and every case passes --db/--cache-db explicitly or points $CHIMERA_DB into its own output directory, so a smoke run never creates collections in the user's real store. Its entire footprint is one directory, build/rat/ (the binary, downloads/ for the archives it came from, out/ for everything a run produces; --build-dir, defaulting to the Makefile's BUILD_DIR) -- already gitignored, already what make clean sweeps -- except models/, which stays at the root shared with make test rather than re-downloading tens of GiB after every clean. Ported from cyllama's wheel tester, with the virtualenv machinery dropped -- a static binary has no interpreter to indirect through and no compile-time backend env to set -- and backend detection replaced by parsing chimera info's built:/loaded: lines, which also surfaces the case worth catching: a GPU build whose runtime brought up only CPU. A --bin without its exec bits is chmod +x'd before use, because a binary downloaded as a GitHub Actions artifact arrives zipped with its POSIX mode stripped. See docs/dev/rat.md.

  • scripts/case/*.sh are now cases in that suite. The twelve one-off shell scripts are gone; each survives as a rat.py test target, so they share one model registry, one timeout, one PASS/FAIL summary and one place that knows about --gpu-layers. The z_turbo*.sh scripts became test-sd-{1..3} -- te-on-cpu + vae-tiling, cpu-offload + vae-on-cpu, and cfg-1 + offload + flash-attn -- mirroring the three cases in cyllama's rwt.py so the two projects' results compare directly. All three fit an 8 GiB card; the all-on-GPU baseline (~9.4 GiB of weights) and the flash-attn-only variants were dropped, since the baseline OOMs there by construction. run --fast now runs test-sd-3 in place of the old test-sd-4. The two rag-chat-qwen3*.sh variants became test-rag-{1,2} -- which is what found the ingest abort above, since they run at chimera's default chunk window rather than one picked to avoid it.