Skip to content

feat(vocabulary): load the slot model from the parrotflow-syrinx package - #392

Merged
znat merged 1 commit into
mainfrom
feat/parrotflow-syrinx-slot
Nov 3, 2026
Merged

znat merged 1 commit into
mainfrom
feat/parrotflow-syrinx-slot

Conversation

@znat

@znat znat commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

The vocabulary slot gate now loads its model from znaat/parrotflow-syrinx-coreml at fcf309cf, as parrotflow-syrinx-fp16.mlpackage. That package is one fp16 Core ML program with three functions: parse, ner and mask. mask is today's mmBERT-small-64 program, added unchanged, so the gate answers exactly as before. parse and ner share the same weights and ride along, so a later parser change needs only its small heads file, not a second big download.

For users: one download of 283 MB in place of 282 MB, shown as "ParrotFlow Syrinx" on the setup and download screens. Once the new model has loaded, the old models/mmbert-small-64 folder (282 MB) is deleted. Nothing else changes: every check script and every gate decision is identical to main.

Review first: SlotModel.swift (repository, revision, functionName = "mask", the cache name) and the prune call after the first successful load.

What changed in the code: SlotModel, RetiredModels, one script, docs
  • SlotModel: new repository and pinned revision. One cacheName, parrotflow-syrinx-fp16, names the package, the cache folder, the compiled .mlmodelc and the lock. A new folder, because isCached only checks that files exist. parrotflow-syrinx was not reused: in the HF repository and in old dev caches that name holds the earlier fp32 parse-only package. load() sets functionName = "mask", because the package's default function is parse.
  • After the first successful load, SlotModel.prepare calls RetiredModels.prune(.mmBERTSmall, ...). It takes the old mmbert-small-64.lock first, as the ModernBERT prune already does, so an older build still fetching into that folder is left alone.
  • RetiredModels takes the cache to prune (Cache.modernBERT, Cache.mmBERTSmall) instead of a hard-coded name. Launch still prunes ModernBERT.
  • The download row: name "ParrotFlow Syrinx", 283 MB, peak 584 MB (package 283 + compiled 283 + tokenizer 18, measured on the fresh download). Onboarding reads this row: the setup screen, the launch panel and the failure note all draw SlotModel.download, so no other place names the model.
  • scripts/check-slot-tokenizer.sh fetches from the new repository and revision, and reads the new cache folder. tokenizer.json is the same file (same sha256), so tests/slot-tokenizer-cases.json is unchanged.
  • Sizes in comments and docs: 269 MB to 283 MB. The credits line "mmBERT-small, MIT" stays: it names the upstream weights.
  • Swift identifiers keep their names (SlotModel, slot download id).
The HF upload: one new commit, nothing existing changed

Commit fcf309cf35dad30cbbb92ddfb3f3c09a5961fd87 on znaat/parrotflow-syrinx-coreml added:

  • parrotflow-syrinx-fp16.mlpackage/ (Manifest.json, model.mlmodel 906,561 B, weight.bin 282,433,408 B)
  • config.json and tokenizer_config.json, the same blobs as znaat/mmbert-small-coreml at a983542
  • README.md: the three functions and their inputs, the sources, the tool versions (torch 2.7.0, coremltools 9.0, transformers 4.48.3)

tokenizer.json was already there and is the same file. The old parrotflow-syrinx.mlpackage, syrinx.safetensors and cut-filter.safetensors are untouched.

The parse function takes the G and S LoRA adapters as fp16 inputs, so a new adapter fine-tune needs no re-export. Its outputs are bit-equal to the adapters-as-constants build on 200 of 200 rows.

Checks: 12 scripts, output identical to main line for line

Each script ran twice in scratch homes: on main's release binary with today's mmBERT-small-64, and on this branch with the new package. No live config or app folder was used.

Script This branch Diff to main
check-slot-tokenizer 21/21 none
check-slot-gap all pass none (same gaps)
check-slot-gate 0 wrong applies, 0 wrong declines none
check-word-gate pass none
check-portrait pass none
check-counter-portrait pass none
check-word-vector pass none
check-vocabulary-config 63/63 none
check-pipeline-config 90/90 none
check-possessive 35/35 none
check-lowercase-refused 13/13 none
check-term-uses pass none

check-slot-tokenizer also passed from an empty home, fetching the tokenizer files from the new revision as CI does.

Fresh download and the old folder: 15 s end to end, old folder removed

In an empty scratch HOME, --slot-model on this branch's release binary downloaded the package from HF, compiled it and loaded mask in 15.1 s. It reports inputs input_ids, attention_mask [1, 64] and output logits [1, 64, 256000]. The cache holds the compiled model and the three tokenizer files; no staging folder or .mlpackage is left. A second run loads from cache in 0.1 s.

Then a copy of an old mmbert-small-64 folder and its lock were put beside it. The next --slot-model loaded the new model and logged models: removed the retired mmBERT-small cache, about 282 MB. The folder and the lock were gone.

The app's own onboarding fetch (Transcriber.warmSlotModel) calls the same SlotModel.prepare. It was not driven here: from the command line it only runs inside --warm-models, which also downloads Parakeet.

Live gate: every decision and output identical to main

syrinx_full/app.py (bench and French harness), main's release binary at 0a3023b0 with today's mmBERT-small-64 against this branch with the new package, same session, fresh scratch homes.

Set Rows Differ main rw/ww/rl/wl/offer branch
Slot calls: slot-gap 16, French 135, judge 59, bench 165 (--slot-gap, --word-gate) 375 0
Bench static, 0.85 165 0 32/4/90/34/5 32/4/90/34/5
Bench chrono, 0.85 165 0 41/4/90/20/10 41/4/90/20/10
Bench static, 0.60 165 0 37/6/80/17/25 37/6/80/17/25
Bench chrono, 0.60 165 0 46/5/79/8/27 46/5/79/8/27
French dictations (821 scored places) 573 0 100/3/633/49/36 100/3/633/49/36

"Differ" compares whole rows: the decision, the slot-call count, and for French the output text, the vocabulary log lines and every pipeline variable except timings.

Before upload, the package's mask was checked against the shipped mmBERT-small-64 on 641 probes: bit-equal 641/641, top 60 identical 641/641.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WfxPEjc1EEGqG2rHoJcLJ2

The slot model now comes from znaat/parrotflow-syrinx-coreml at
fcf309cf, as parrotflow-syrinx-fp16.mlpackage. It is one fp16 package
with three functions: parse, ner and mask. mask is the mmBERT-small-64
program added unchanged. SlotModel loads it with functionName "mask".
parse and ner ride along for a later change.

The cache moves to models/parrotflow-syrinx-fp16. Once the new model
has loaded, the old models/mmbert-small-64 folder (282 MB) is removed
through RetiredModels, which now takes the cache to prune.

The download row reads "ParrotFlow Syrinx", 283 MB, peak 584 MB.
check-slot-tokenizer.sh fetches from the new repository and revision.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WfxPEjc1EEGqG2rHoJcLJ2
Signed-off-by: Nathan Zylbersztejn <[email protected]>
@greptile-apps

greptile-apps Bot commented Nov 3, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

The slot model now fetches the pinned ParrotFlow Syrinx package and selects its mask function. Its cache paths and tokenizer-check references use Syrinx-specific values. Retired-model pruning now supports ModernBERT and mmBERT-small caches. Launch cleanup targets ModernBERT, and successful slot-model loading triggers pruning of mmBERT-small. Related size statements and documentation are updated.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • znat/parrotflow#386: Changes SlotModel, SlotModelCommand, the tokenizer check script, and retired-model pruning, which overlap directly with this PR.
  • znat/parrotflow#367: Changes the slot-model tokenizer files and cache check, which overlap with this PR’s Syrinx tokenizer source and check-script updates.
Merge Risk: Moderate · up to a445f

Offline upgrades may lose the vocabulary slot gate despite retaining the old model, and cleanup may remove that cache before the replacement gate is ready. Resolve these migration paths before merging.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title "feat(vocabulary): load the slot model from the parrotflow-syrinx package" matches the main change. The PR switches the vocabulary slot gate to load the parrotflow-syrinx-fp16 package from a…
Docstring Coverage Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentati…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description covers what changes and why: a model swap to the parrotflow-syrinx package, the pruning of the retired mmBERT-small cache, and the download-row and size updates. It also reports verifi…
Full details: Title check

Explanation

The title "feat(vocabulary): load the slot model from the parrotflow-syrinx package" matches the main change. The PR switches the vocabulary slot gate to load the parrotflow-syrinx-fp16 package from a pinned revision, and the changeset reflects this in SlotModel, RetiredModels, the tokenizer script, and the docs. It is a Conventional Commits title with a feat type, which is correct for a minor bump. The title names the package but not the cache move or the retired-model prune, which is acceptable for a title.

Full details: Docstring Coverage

Explanation

Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 7 functions across 13 files. (3 skipped: 3 unsupported.)

Full details: Description check

Explanation

The description covers what changes and why: a model swap to the parrotflow-syrinx package, the pruning of the retired mmBERT-small cache, and the download-row and size updates. It also reports verification, with check-script and live-gate results. It does not follow the template's three-to-six-sentence overview with no headings. The template's checklist items are not addressed explicitly: make test is not mentioned, and the signed-off commit requirement is not confirmed. The prompt/pattern scoring block is arguably relevant because the change alters model behavior, and the author provides live gate numbers and per-script results, so it is likely satisfied. Its setting note is also missing: the template asks to name any setting and its default, and this change adds no setting, so that is not required.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8343a7d4-4c07-4288-8114-631f04ff998d
Commits

Reviewing files that changed from the base of the PR and between 0a3023b and a445f7a.

Files selected for processing: 16
  • .github/workflows/checks.yml
  • Sources/ParrotFlow/AppDelegate.swift
  • Sources/ParrotFlow/Config.swift
  • Sources/ParrotFlow/Pipeline.swift
  • Sources/ParrotFlow/RetiredModels.swift
  • Sources/ParrotFlow/SentenceGate.swift
  • Sources/ParrotFlow/SlotModel.swift
  • Sources/ParrotFlow/SlotModelCommand.swift
  • Sources/ParrotFlow/Transcriber.swift
  • docs/cli.md
  • docs/pipelines.md
  • scripts/check-portrait.sh
  • scripts/check-slot-gap.sh
  • scripts/check-slot-gate.sh
  • scripts/check-slot-tokenizer.sh
  • scripts/slot-probe-reference.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fix comments: Fix CodeRabbit comments on this PR

Comment thread Sources/ParrotFlow/SlotModel.swift Resolved
Comment thread Sources/ParrotFlow/SlotModel.swift Resolved
@znat
znat merged commit a680dd6 into main Nov 3, 2026
6 checks passed
@znat
znat deleted the feat/parrotflow-syrinx-slot branch November 3, 2026 22:19
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