Skip to content

Releases

v0.1.1 — security fix (CWE-502 RCE in checkpoint load)

Choose a tag to compare

@opensource-SantanderAI opensource-SantanderAI released this 01 Jul 09:45

Security

Fixes arbitrary code execution when loading adapter checkpoints (CWE-502).

  • LinearAdapter.load() now uses torch.load(..., weights_only=True) so a crafted .pt file can no longer execute code on load.
  • Raised the minimum torch to >=2.10.0 to cover CVE-2025-32434 and CVE-2026-24747.
  • Added a regression test and documented the checkpoint trust boundary.

Reported by Ian Hudson (EPAM Systems) via coordinated disclosure. Thank you.

Full changelog: https://github.com/SantanderAI/linear-adapter-trainer/blob/main/CHANGELOG.md

v0.1.0 — Initial public release

Choose a tag to compare

@opensource-SantanderAI opensource-SantanderAI released this 17 Jun 16:49

First public release of LinearAdapterTrainer by Santander AI Lab.

LinearAdapterTrainer trains a small linear embedding adapter with triplet loss to align retrieval embeddings with your queries — improving RAG retrieval without retraining or replacing the underlying embedding model.

Highlights

  • Module 1 — triplet dataset generator: template/LLM query generation, negative mining (random, semantic_opposite, hard, mixed) and a leakage-free train/val split.
  • Module 2 — linear adapter trainer: residual/identity-initialized adapter, triplet margin loss (cosine/euclidean), early stopping on a validation retrieval metric.
  • Evaluation: precision@k, recall@k, hit_rate@k, MRR, nDCG and a base-vs-adapted comparison.
  • Pluggable embedding backends: HashingEmbedder (offline), SentenceTransformer, OpenAI.
  • Offline-first, fully typed (py.typed), TOML-driven CLI (linear-adapter generate|train|evaluate|run).

Licensed under Apache-2.0. Copyright (c) 2026 Santander Group. Originally authored by Pedro Martin Minguez (Santander AI Lab).