https://github.com/jonhue/activeft
PyTorch library for Active Fine-Tuning
https://github.com/jonhue/activeft
active-fine-tuning active-inference active-learning artificial-intelligence data-loader data-retrieval deep-learning fine-tuning machine-learning python pytorch
Last synced: 2 months ago
JSON representation
PyTorch library for Active Fine-Tuning
- Host: GitHub
- URL: https://github.com/jonhue/activeft
- Owner: jonhue
- License: mit
- Created: 2024-02-16T09:58:35.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-27T11:39:34.000Z (4 months ago)
- Last Synced: 2025-10-04T17:57:03.468Z (3 months ago)
- Topics: active-fine-tuning, active-inference, active-learning, artificial-intelligence, data-loader, data-retrieval, deep-learning, fine-tuning, machine-learning, python, pytorch
- Language: Python
- Homepage: https://jonhue.github.io/activeft/
- Size: 367 KB
- Stars: 92
- Watchers: 3
- Forks: 9
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Active Fine-Tuning
A library for automatic data selection in active fine-tuning of large neural networks.
**[Website](https://jonhue.github.io/activeft)** | **[Documentation](https://jonhue.github.io/activeft/docs)**
Please cite our work if you use this library in your research ([bibtex below](#citation)):
- [Efficiently Learning at Test-Time: Active Fine-Tuning of LLMs](https://arxiv.org/abs/2410.08020)
- [Transductive Active Learning: Theory and Applications](https://arxiv.org/abs/2402.15898) (Section 4)
## Installation
```
pip install activeft
```
## Usage Example
```python
from activeft.sift import Retriever
# Load embeddings
embeddings = np.random.rand(1000, 512)
query_embeddings = np.random.rand(1, 512)
index = faiss.IndexFlatIP(d)
index.add(embeddings)
retriever = Retriever(index)
indices = retriever.search(query_embeddings, N=10)
```
## Development
### CI checks
* The code is auto-formatted using `black .`.
* Static type checks can be run using `pyright`.
* Tests can be run using `pytest test`.
### Documentation
To start a local server hosting the documentation run ```pdoc ./activeft --math```.
### Publishing
1. update version number in `pyproject.toml` and `activeft/__init__.py`
2. build: `poetry build`
3. publish: `poetry publish`
4. push version update to GitHub
5. create new release on GitHub
## Citation
```bibtex
@article{hubotter2024efficiently,
title = {Efficiently Learning at Test-Time: Active Fine-Tuning of LLMs},
author = {H{\"u}botter, Jonas and Bongni, Sascha and Hakimi, Ido and Krause, Andreas},
year = 2024,
journal = {arXiv preprint arXiv:2410.08020}
}
@inproceedings{hubotter2024transductive,
title = {Transductive Active Learning: Theory and Applications},
author = {H{\"u}botter, Jonas and Sukhija, Bhavya and Treven, Lenart and As, Yarden and Krause, Andreas},
year = 2024,
booktitle = {Advances in Neural Information Processing Systems}
}
```