Repository navigation
ios: add Core ML Cleanup Tagger v2 container-app pipeline - #3075
Merged
Merged
Conversation
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.
Container-app dictation on iPhone can now run the four-head Core ML Cleanup Tagger v2 with full Rust parity and zero extra keyboard extension memory.
Before: iOS only ran the v1 single-head deletion tagger (
CleanupTagger), without v2'spunct_afterpunctuation restoration,casehead, BIO span ITN, Round 4 paired-phrase guard, or Cleanup v2.1 post-passes.After:
HEXMobileincludes a complete Swift port of desktopsrc/dictation/cleanup/v2/behind a Labs toggle (off by default) that runs strictly in the container app'sDictationControllerand falls back cleanly when the 32.7 MB model bundle isn't installed.Key details
HEXKeyboard: all Cleanup v2 code lives inios/HEXMobile/CleanupV2/(not compiled intoHEXKeyboard).HEXShared/DictationPipeline.swiftonly accepts an optionalcleanupOverrideclosure.CleanupV2ModelStoreloads from the container app'sApplication Support/models/cleanup-v2/(CleanupTaggerV2.mlpackageor pre-compiledCleanupTaggerV2.mlmodelc,tokenizer.json, optionalruntime.json), excluded from iCloud backups. Next step: host the 32.7 MB INT8 bundle (e.g. GitHub Release asset with SHA-256 manifest, matchingParakeetUltraModel) and add a Settings › Labs download button.Settings › Labs › Clean up what I say v2defaults to off and stays disabled until the local bundle is installed; missing model, errors, or budget timeouts returnniland fall back cleanly.Verification
HEXMobileTests/CleanupV2Tests(17 tests, incl. 600/600render-parity.json& allmodel-parity.json)HEXMobileTestssuite (iOS Simulator)scripts/code-shape.pyRead:
ios/HEXMobile/CleanupV2/CleanupV2Engine.swiftandios/HEXMobile/DictationController.swiftfor lifecycle, budget gating, and fallback;CleanupV2Decoder.swift/CleanupV2ITN.swift/CleanupV2Post.swiftare a direct port ofsrc/dictation/cleanup/v2/.