-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MLX Cleanup #187
Merged
Merged
MLX Cleanup #187
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2f3780f
update mlx-swift
jkrukowski fd52493
- reverted mlx version
jkrukowski c486bd8
reversed
jkrukowski 799fca7
fixed tests
jkrukowski c258a41
updated mlx-swift
jkrukowski dd65efe
updated makefile
jkrukowski 60cf3be
remove device change, fft can run on gpu now
jkrukowski 6e6d45d
updated readme, added tests
jkrukowski 65514fb
updated readme
jkrukowski 15d9b80
review changes
jkrukowski c728996
review changes
jkrukowski 2e56036
CI model cache path fix
jkrukowski 801e04a
tests failed
jkrukowski f4cedc5
Update package.swift
ZachNagengast a6b984e
Keep setupModels with adjustments
ZachNagengast d0bf45f
Test CI skip cache
ZachNagengast 95c2a1f
Test CI package name change
ZachNagengast 3808eb8
Test CI optional CLI settings
ZachNagengast aa1bbfa
Use correct logits size for MLX
ZachNagengast File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ DerivedData/ | |
**/*.xcscheme | ||
.netrc | ||
.env | ||
/.vscode | ||
|
||
# Core ML Model Files | ||
Models | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"pins" : [ | ||
{ | ||
"identity" : "mlx-swift", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/ml-explore/mlx-swift", | ||
"state" : { | ||
"revision" : "597aaa5f465b4b9a17c8646b751053f84e37925b", | ||
"version" : "0.16.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-argument-parser", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-argument-parser.git", | ||
"state" : { | ||
"revision" : "c8ed701b513cf5177118a175d85fbbbcd707ab41", | ||
"version" : "1.3.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-numerics", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/apple/swift-numerics", | ||
"state" : { | ||
"revision" : "0a5bc04095a675662cf24757cc0640aa2204253b", | ||
"version" : "1.0.2" | ||
} | ||
}, | ||
{ | ||
"identity" : "swift-transformers", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/huggingface/swift-transformers.git", | ||
"state" : { | ||
"revision" : "74b94211bdc741694ed7e700a1104c72e5ba68fe", | ||
"version" : "0.1.7" | ||
} | ||
} | ||
], | ||
"version" : 2 | ||
} |
6 changes: 3 additions & 3 deletions
6
...s/WhisperAX/WhisperAX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ setup-model-repo: | |
git clone https://huggingface.co/$(MODEL_REPO) $(MODEL_REPO_DIR); \ | ||
fi | ||
|
||
|
||
setup-mlx-model-repo: | ||
@echo "Setting up mlx repository..." | ||
@mkdir -p $(BASE_MODEL_DIR) | ||
|
@@ -109,21 +110,40 @@ download-mlx-model: setup-mlx-model-repo | |
@echo "Downloading mlx model $(MODEL)..." | ||
@cd $(MLX_MODEL_REPO_DIR) && \ | ||
git lfs pull --include="openai_whisper-$(MODEL)/*" | ||
@echo "MLX model $(MODEL) downloaded to $(MLX_MODEL_REPO_DIR)/openai_whisper-mlx-$(MODEL)" | ||
@echo "MLX model $(MODEL) downloaded to $(MLX_MODEL_REPO_DIR)/openai_whisper-$(MODEL)" | ||
|
||
|
||
build: | ||
@echo "Building WhisperKit..." | ||
@swift build -v | ||
@xcodebuild CLANG_ENABLE_CODE_COVERAGE=NO VALID_ARCHS=arm64 clean build \ | ||
-configuration Release \ | ||
-scheme whisperkit-Package \ | ||
-destination generic/platform=macOS \ | ||
-derivedDataPath .build/.xcodebuild/ \ | ||
-clonedSourcePackagesDirPath .build/ \ | ||
-skipPackagePluginValidation | ||
Comment on lines
+118
to
+124
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have to use |
||
|
||
|
||
build-cli: | ||
@echo "Building WhisperKit CLI..." | ||
@swift build -c release --product whisperkit-cli | ||
@xcodebuild CLANG_ENABLE_CODE_COVERAGE=NO VALID_ARCHS=arm64 clean build \ | ||
-configuration Release \ | ||
-scheme whisperkit-cli \ | ||
-destination generic/platform=macOS \ | ||
-derivedDataPath .build/.xcodebuild/ \ | ||
-clonedSourcePackagesDirPath .build/ \ | ||
-skipPackagePluginValidation | ||
|
||
|
||
test: | ||
@echo "Running tests..." | ||
@swift test -v | ||
@xcodebuild clean build-for-testing test \ | ||
-scheme whisperkit-Package \ | ||
-only-testing WhisperKitMLXTests/MLXUnitTests \ | ||
-only-testing WhisperKitTests/UnitTests \ | ||
-destination 'platform=macOS,arch=arm64' \ | ||
-skipPackagePluginValidation | ||
Comment on lines
-121
to
+145
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we have to use |
||
|
||
|
||
clean-package-caches: | ||
@trash ~/Library/Caches/org.swift.swiftpm/repositories | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is merged into single command
xcodebuild clean build-for-testing test