Downloads · 30 days
0
oswaldoludwig/kappaTune
kappaTune is a machine learning model from oswaldoludwig. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A PyTorch-based optimizer wrapper for continual learning via selective fine-tuning, guided by the condition number ($\kappa$) of model tensors. KappaTune identifies and updates only the least anisotropic parameters to…
Downloads · 30 days
0
Access
Public
Updated Dec 30, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py14.6 KB · 77%
From the Hugging Face model README
A PyTorch-based optimizer wrapper for continual learning via selective fine-tuning, guided by the condition number ($\kappa$) of model tensors. KappaTune identifies and updates only the least anisotropic parameters to preserve pre-trained knowledge and mitigate catastrophic forgetting.
Please cite the following paper if you use this code or ideas derived from it in your publications: (arxiv.org/abs/2506.16289)
kappaTune is designed to address the challenge of catastrophic forgetting in continual learning scenarios. By analyzing the condition numbers of a neural network's weight matrices, it selects a subset of parameters to fine-tune. This approach updates only tensors with the smallest condition numbers due to a synergy of factors: their inherent numerical stability makes them less susceptible to training noise, and their less specialized nature allows for robust adaptation without overwriting critical, highly specific pre-training knowledge, thereby effectively mitigating catastrophic forgetting of foundational capabilities, as shown in the paper.
kappaTune helps preserve pre-trained knowledge, making it suitable for continual learning and domain adaptation tasks.pip package managerYou can install the required libraries using pip:
pip install torch transformers datasets numpy