Fix: dedupe model/quantization types, buffer downloads, GGUF offsets and device scanner isolation#4
Open
NightVibes33 wants to merge 8 commits into
Open
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.
Motivation
QuantizationErrorenums that caused build errors and runtime mismatches.FileHandle.@unchecked Sendableusage and potential reentrancy issues.Description
ModelTypes.swiftand removed duplicate declarations fromModelQuantizer.swift, keepingModelQuantizerfocused on orchestration.ModelQuantizer.downloadModelandHuggingFaceAPI.downloadModelFilewith a 64KB buffer and ensured destination files are created before openingFileHandle./api/models/{id}/tree/main) and added a privategetAuthToken()accessor into the HF API extension.GGUFBuilderoffsets by writing tensor-info into a temporary buffer before emitting tensor data and removed duplicate integer-to-data extensions.QuantizationEnginebehavior by inferring architecture fromconfig.jsonmodel_type, clamping/offsetting Q4 quantized nibbles into[-8,7] + 8, computing block sizes withceil(i.e.(numElements+31)/32 * elementSize), and changingq5_0/q5_1to explicitly error until correctly implemented.DeviceScannerby making it@MainActorfinal(removed@unchecked Sendable), replacingTimerwith a cancellableTaskloop, addingdeviceIdentifierto the profile, and adding simulator passthrough for model identifier parsing.iphone.gen3SF symbol usage with the saferiphonefallback in views for broader compatibility.Testing
git diff --checkto verify whitespace/formatting issues and it returned no problems.swift --versionis available in this environment but an iOS build could not be executed becausexcodebuildis not present (xcodebuild: command not found).Codex Task