mirror of
https://github.com/mudler/LocalAI.git
synced 2026-07-30 09:57:57 -04:00
ci(gallery): propose variant groupings for review on a schedule A gallery entry may declare `variants:`, references to other entries that are alternative builds of the same weights, and auto-selection then installs the best build for the host. Those families exist only because humans curated them in two manual sweeps. The gallery agent dedupes on the HuggingFace repo URL and picks one quantization per model, so it never adds a second build of a repo it already has, and consequently never creates a family and never joins one. A model published across two repos lands as two unrelated standalone entries. The grouping decays as the gallery grows and nothing notices. Add a scheduled job, in the same shape as the checksum checker: compute offline, edit the index textually, open a pull request against ci-forks. It proposes and never decides. Grouping is a judgement call that has gone wrong in both directions, so the value is catching drift and surfacing candidates with their evidence. Three grouping signals, taken from the manual sweeps: same name once quantization markers are stripped, the `:` config-suffix convention, and the same primary weight filename once quantization markers are stripped. The third requires the same upstream repository. Excluding auxiliary files is not enough on its own: bert-embeddings, an ultravox audio model and a roleplay finetune all declare a primary file called llama-3.2-1b-instruct-q4_k_m.gguf, and grouping on that is the same error that linked four wan-2.1 entries and Z-Image-Turbo to qwen3-4b. Add gallery/variant-exclusions.yaml, a checked-in rejection ledger. A job that re-proposes declined candidates every night becomes noise and gets ignored. Declining a proposal is one flow-mapping line a reviewer adds inside the proposal pull request itself. Seeded with the six -abliterated pairs whose base is also in the gallery, the mistral-small multimodal pair, the whisper-1 alias, the kokoros language set, and the recurring finetune tokens. qat and apex are deliberately not on it: they are quantization techniques. Proposals refuse to nest, to let two parents claim one target, to target an entry that installs nothing, and to touch a merge anchor, since a variants key added to an anchor is inherited by every merging child. The anchor refusal names every entry that would inherit, which is the worklist a human needs. Run against the pre-sweep gallery, the job rediscovers 12 of the 19 groupings the second manual sweep made, with no false positives. The rest it reports as refusals or ledger declines rather than missing silently. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
55 lines
2.0 KiB
YAML
55 lines
2.0 KiB
YAML
name: Propose gallery variant groupings
|
|
on:
|
|
schedule:
|
|
- cron: 0 4 * * 1
|
|
workflow_dispatch:
|
|
jobs:
|
|
variant_proposals:
|
|
if: github.repository == 'mudler/LocalAI'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: false
|
|
|
|
# The heuristics are the risky part of this job. A regression in them
|
|
# produces confident, wrong proposals, which is worse than no job at all.
|
|
- name: Test the proposer
|
|
run: go test ./.github/ci/variantproposals/
|
|
|
|
- name: Propose groupings 🔧
|
|
id: propose
|
|
run: |
|
|
rm -f /tmp/variant-proposals-body.md
|
|
go run ./.github/ci/variantproposals \
|
|
-index gallery/index.yaml \
|
|
-ledger gallery/variant-exclusions.yaml \
|
|
-body-out /tmp/variant-proposals-body.md \
|
|
-apply
|
|
if [ -s /tmp/variant-proposals-body.md ]; then
|
|
echo "have_proposals=true" >> "$GITHUB_OUTPUT"
|
|
{
|
|
echo 'body<<VARIANT_PROPOSAL_BODY_EOF'
|
|
cat /tmp/variant-proposals-body.md
|
|
echo VARIANT_PROPOSAL_BODY_EOF
|
|
} >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "have_proposals=false" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
# No body file means the proposer found nothing. Opening an empty pull
|
|
# request every run is how a proposal job gets muted by its reviewers.
|
|
- name: Create Pull Request
|
|
if: steps.propose.outputs.have_proposals == 'true'
|
|
uses: peter-evans/create-pull-request@v8
|
|
with:
|
|
token: ${{ secrets.UPDATE_BOT_TOKEN }}
|
|
push-to-fork: ci-forks/LocalAI
|
|
commit-message: 'chore(model-gallery): propose variant groupings'
|
|
title: 'chore(model-gallery): propose variant groupings for review'
|
|
branch: "propose/variant-groupings"
|
|
body: ${{ steps.propose.outputs.body }}
|
|
signoff: true
|