feat: adopt local GGUFs into the hub with mba migrate - #22
Merged
Conversation
Scan a folder or fuzzy-find weights, copy or hardlink into the model store, and finish the same house as pull. Drop the one-shot migrate-paths helper; the service owns the write via POST /models/adopt.
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
mba migrate(models [dir]/find [query]) to scan local GGUFs and copy or hardlink them into the model hub, then finish the same house as pull (POST /models/adopt).--moveskips the ask and removes,--yes/--jsonkeep the source unless--moveis set.mba migrate-paths(the old~/.mba/ adapters move). Hub skip is path or inode so a hardlinked adopt does not show up again.Test plan
mba migrate --helplists models, find,--from,--move, and the TTY askmba migrate models <dir>lists new GGUFs, multi-select, confirm id/family, ask remove-source, printADOPTEDmba migrate find <query>ranks matches under HF hub /~/models(or--from)--yes --jsonadopts without prompts;--movedeletes the source; inplace adopt never deletes the hub filemba s boot <id>works on an adopted modelnpx vitest run packages/core/src/model/model-pull.test.ts packages/core/src/model/gguf-scan.test.ts packages/core/src/service/server-model-adopt.test.ts packages/core/src/cli/route.test.tsMade with Cursor