Bump default tokenBatchSize from 1 to 4#25
Merged
Merged
Conversation
ProgressAggregator actor and KVO on countOfBytesReceived.\n- Add GitHub Actions CI running Biome lint, TypeScript typecheck, and Bun tests on push/PR (#24).\n- Update Biome to 2.4.12, exclude generated/native folders, and reformat touched TS files.\n- Bump default tokenBatchSize from 1 to 4 in HybridLLM for faster generation out of the box.\n- Throttle download-modal re-renders to visible progress changes (>=0.5%) to avoid UI thrash.\n\n## Testing\n- bun typescript — Not run\n- bun test — Not run\n- bunx biome ci . — Not run\n- iOS model download end-to-end with progress callback — Not run"}
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.
Summary
tokenBatchSizefrom1to4inHybridLLMso streaming emits ~4× fewerTokenEvents, JSON encodes, and JS bridge crossings out of the box, with negligible chunking at typical on-device generation speeds.load()reset,unload()reset) plus the fallback whenoptions.tokenBatchSizeis omitted.Test plan
tokenBatchSize: 1still produces per-token eventstokenBatchSize: 8still produces 8-token batches