feat: make every adapter reproducible from a PEFT or Unsloth recipe - #40
Merged
Merged
Conversation
Add a reviewed recipe per catalog adapter, check recipes against the catalog in CD, render the PEFT and Unsloth arguments a run would get, and register a finished adapter only after it passes the artifact scan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
Closes the adapter half of the model lifecycle in the spec (§6, §7.5): "PEFT/Unsloth creates LoRA or QLoRA adapters" from "immutable base-model revisions".
How
config/adapters/<id>.yaml: one reviewed recipe per catalog adapter, holding the base commit, dataset version and LoRA hyperparameters.llm_router.adapters:checkfails when a catalog adapter has no recipe, or a recipe names a different base, dataset, domain or quantization than its catalog entry. CD runs it.planprints the exact arguments PEFT (LoraConfig,BitsAndBytesConfig) or Unsloth (from_pretrained,get_peft_model) would be given.trainruns the job with whichever framework the recipe selects.registerruns the artifact scan on a finished adapter and prints its catalog entry: stagedevelopment, no measured gain, revision equal to the artifact's digest.Tests
tests/unit/test_adapters.py(22 tests): committed recipes agree with the catalog; each kind of disagreement is reported; unreproducible or unservable recipes are rejected; PEFT and Unsloth arguments; scan-gated registration; CLI. 100% coverage of everything excepttrain.Limits
trainhas never been executed. It needs a GPU and thetrainingextra; it is written against the documented PEFT, Transformers and Unsloth interfaces and excluded from coverage.hf_repoandhf_revisionin the committed recipes are placeholders, because the catalog's base models are mocks.🤖 Generated with Claude Code