Instructions to use moncefem/memory-lora-gemma4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use moncefem/memory-lora-gemma4 with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Commit History
-
Clean the model mirror
Removes ~11.6GB of weights that should not be published: - sixview_v1/v2 checkpoints. sixview_v2 is the pre-standardisation head that scored WORSE than applying no adapter (and worse than random noise); leaving it downloadable invites someone to use it. Their metrics.jsonl stay for provenance. - duplicate all_lora/head.best.pt (same bytes as all_lora_best_cpt.pth) and a stray h200_best/ copy. - 49 files of snapshot_download bookkeeping under data/**/.cache/. Keeps the two checkpoints worth having: all_lora_best_cpt.pth (merged corpus, best) and h200_run/head.best.pt (prose-only, fallback). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>930bb27 -
Add side-by-side base vs adapted demo
El-Mouden Moncif +1: Claude Opus 5One resident model answers both sides: serve_fallback loads base+adapter and routes on the request's model id, toggling via PeftModel.disable_adapter(). Serving a merged copy instead would need a second ~10GB model just to have something to compare against. - /compare: repo URL -> build -> two chat columns from the same server, so the only variable is whether the adapter is on. - pipeline now defaults to the un-merged path (also skips a ~10GB artifact). - config picks the newest checkpoint that actually beats the baseline. sixview_v2 was the default and scored WORSE than no adapter, so every demo built so far used an adapter that made the model worse. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>cf42de0 -
Fix hypernetwork input collapse; add serving app + H100 deploy kit
El-Mouden Moncif +1: Claude Opus 5The trained head emitted a near-identical adapter for every repo (pairwise cosine 0.96) and scored worse than random noise on held-out repo text. Cause: ~64% of each 6-view embedding is a constant vector shared by all repos, which dominated the trunk (input cosine 0.73 -> 0.978 after the trunk). - MemoryLoRAHead: standardize the conditioning input via input_mean/input_std buffers fitted on train docs only and stored in the checkpoint, so training and inference apply the same transform. After 40 steps the emitted-adapter cosine dropped 0.96 -> 0.21. - Training: log the no-adapter baseline and delta_vs_baseline every eval, plus diag/adapter_cosine. Tracking only the adapted loss is why the collapse went unnoticed. - app/: Next.js app serving repo-personalized models over OpenAI- and Anthropic-compatible APIs for coding CLIs. - deploy/h100/: provisioning + training scripts for a single-GPU cloud run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>f17edea