Downloads · 30 days
112
18% of all-time downloads
chkrishna2001/psm-memory-qwen0.5b
psm-memory-qwen0.5b is a machine learning model from chkrishna2001. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
Three task-specific LoRA adapters trained on Qwen/Qwen2.5-0.5B-Instruct for the PSM ("memory as a cognitive skill") project, plus a production ONNX export with all three adapters as swappable deltas over one shared ba…
Downloads · 30 days
112
18% of all-time downloads
All-time downloads
616
Public
Repo size
5.7 GB
Likes
1
Public
Click a slice to open those files.
.onnx2 GB · 33%
From the Hugging Face model README
Three task-specific LoRA adapters trained on Qwen/Qwen2.5-0.5B-Instruct for the PSM
("memory as a cognitive skill") project, plus a production ONNX export with all three adapters
as swappable deltas over one shared base graph.
| Task | Directory | Gate score | LoRA config |
|---|---|---|---|
| Storage decision (store/ignore/update/etc.) | lora/storage/ | 0.84 (100-case coding-agent gate) | r=16, alpha=32 |
| Retrieval-plan (recall/context planning) | lora/retrieval_plan/ | 0.935 | r=16, alpha=32 |
| Consolidation (merge/update/conflict resolution) | lora/consolidation/ | 0.826 | r=16, alpha=32 |
All three share identical LoRA config (target_modules: q/k/v/o/gate/up/down_proj), which is what
allows them to share one base ONNX graph in onnx/.
onnx/)onnx/model.onnx is the base model traced with LoRA branches kept genuinely separate (not merged),
via Olive's --use_dynamo_exporter + ExtractAdapters pass. onnx/adapters/*.onnx_adapter are the
three swappable adapter deltas. Confirmed via Microsoft.ML.OnnxRuntimeGenAI
(Adapters.LoadAdapter / Generator.SetActiveAdapter) at exact parity with the PyTorch baseline
(0.84 on the storage gate, parse_valid_rate 1.00).
Produced by the repeatable conversion pipeline at
psm-model/scripts/convert_adapters_onnx.py in the source repo — see that script for the exact
Olive/transformers version pinning required (Olive 0.13.0 needs transformers==4.48.3 for its
dynamo-exporter Cache-compatibility patch; this machine's default transformers 5.x will silently
break the export otherwise).
import onnxruntime_genai as og
model = og.Model("onnx")
tokenizer = og.Tokenizer(model)
adapters = og.Adapters(model)
adapters.load("onnx/adapters/storage.onnx_adapter", "storage")
params = og.GeneratorParams(model)
params.set_search_options(do_sample=False, max_length=4096)
generator = og.Generator(model, params)
generator.set_active_adapter(adapters, "storage")
# ... encode prompt, generate ...
lora/)Standard PEFT adapter directories (adapter_config.json + adapter_model.safetensors), loadable via
peft.PeftModel.from_pretrained(base_model, "lora/storage") etc. against the base
Qwen/Qwen2.5-0.5B-Instruct model.