docs(openspec): propose creating an Outfit from a Hugging Face ref - #74
Draft
outofcoffee wants to merge 1 commit into
Draft
docs(openspec): propose creating an Outfit from a Hugging Face ref#74outofcoffee wants to merge 1 commit into
outofcoffee wants to merge 1 commit into
Conversation
Add the add-hf-outfit-command change: an `outfit hf <ref>` command that reads a Hugging Face model repo and writes the Outfit for it, inferring the provider from the repo's files, the quantisation from its GGUF names, and the context window from its published config. The local Hugging Face and llama.cpp caches are read so an already-downloaded model is named by its path rather than downloaded a second time; outfit itself never transfers weights. An optional token is resolved from the usual places for gated and private repos. Covers two new capabilities, huggingface-hub and huggingface-outfits, with the design and task breakdown behind them.
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.
An OpenSpec change proposing
outfit hf <ref>, a command that turns a Hugging Face model reference into a working Outfit.Summary
outfit hf <ref>: reads a Hugging Face model repo and writes the Outfit for it, so a pasted model reference becomes a working config without hunting through the model page for the quantisation, the engine and the context window.PROVIDERfrom the repo's files (GGUF → llamacpp, MLX → omlx, safetensors → vllm), the quantisation from the GGUF filenames,CONTEXTfrom the publishedconfig.json, andALIASfrom the repo name. The reasoning goes to stderr so stdout stays a clean Outfit.HF_TOKEN,HUGGING_FACE_HUB_TOKENor the CLI's token file, so gated and private repos work for a logged-in user. It is never written or printed.--output-file/-owrites the file (refusing to clobber without--force),--applydresses the harness in the same step, and--no-cacheforces the portable repo-reference form.huggingface-hub(reference forms, Hub reads, token, cache lookup) andhuggingface-outfits(the command and its inference rules).Implementation details
Two decisions are worth a reviewer's attention.
No Go SDK. The closest thing is
gomlx/go-huggingface, which does share the Python cache layout, but its module requires gomlx, parquet-go, protobuf, sentencepiece and lipgloss — a machine-learning framework's dependency graph for a CLI with three direct dependencies. The other candidates are downloader-shaped, and the download path is exactly what this change does not want.internal/hfis stdlib-only: two JSON endpoints and a documented directory layout. The package boundary is where a library could slot in later if the write path is ever wanted.The two caches are separate.
llama-server -hfwrites intoLLAMA_CACHE, not the Hugging Face cache, so a model downloaded byoutfit serveis invisible to the HF layout and vice versa — both are checked. llama.cpp's filename convention is not a documented contract, so that lookup requires the owner, the repo name and the quant to all match; a false negative just falls back to the repo reference, which is what would have been written anyway.One consequence worth naming: a cached-path
MODELdescribes one machine's disk, and Outfits do get committed. The narration says so at the moment it happens, and--no-cacheproduces the shareable form.