Task-oriented finetuning for better embeddings on neural search.
Project description
Domain-specific fine-tuning for better embeddings on neural search tasks
Fine-tuning with domain specific data can improve the performance on neural search tasks. However, it is non-trivial as it requires a combination of expertise of deep learning and information retrieval.
Finetuner makes this procedure simpler, faster and performant by streamlining the workflow and handling all complexity and infrastructure on the cloud. With Finetuner, you can easily make pre-trained models more performant and production ready.
📈Performance boost: Finetuner delivers SOTA performance on domain specific neural search applications.
🔱 Simple yet powerful: Easily access features such as 40+ mainstream loss functions, 10+ optimisers, layer pruning, weights freezing, dimensionality reduction, hard-negative mining, cross modality fine-tuning, distributed training.
☁ All-in-cloud: Manage your runs, experiments and artifacts on Jina Cloud (for free!) without worrying about provisioning resources. You never have to worry about provisioning (cloud) resources! Finetuner handles all related complexity and infrastructure.
Documentation
Benchmark
The following table demonstrates what you can expect from Finetuner:
MODEL | TASK | METRIC | PRETRAINED | FINETUNED | DELTA |
---|---|---|---|---|---|
BERT | Quora Question Answering | mRR | 0.835 | 0.967 | :arrow_up_small: 15.8% |
Recall | 0.915 | 0.963 | :arrow_up_small: 5.3% | ||
ResNet | Visual similarity search on TLL | mAP | 0.102 | 0.166 | :arrow_up_small: 62.7% |
Recall | 0.235 | 0.372 | :arrow_up_small: 58.3% | ||
CLIP | Deep Fashion text-to-image search | mRR | 0.289 | 0.488 | :arrow_up_small: 69.9% |
Recall | 0.109 | 0.346 | :arrow_up_small: 217% |
[*] All metrics evaluation on k@20, trained 5 epochs using Adam optimizer with learning rate of 1e-5.
Install
Requires Python 3.7+.
pip install -U finetuner
Noted: Starting from 0.5.0, Finetuner becomes cloud-based. If you still want to use the last Finetuner release which runs locally, please install with:
pip install finetuner==0.4.1
We have backed up the 0.4.1 documentation in docs/docs_41/
folder.
Check this page to render Finetuner 0.4.1 documentation locally.
Get Started
The following code block describes how to fine-tune ResNet50 on Totally Looks Like dataset, which can be run as-is:
import finetuner
from finetuner.callback import EvaluationCallback
finetuner.login()
run = finetuner.fit(
model='resnet50',
run_name='resnet50-tll-run',
train_data='tll-train-da',
callbacks=[EvaluationCallback(query_data='tll-eval-da')],
)
Fine-tuning might take some time until finish. Once it is done, you can re-connect your run with:
import finetuner
finetuner.login()
run = finetuner.get_run('resnet50-tll-run')
print(run.status())
print(run.logs())
run.save_artifact('resnet-tll')
It has the following steps:
- Login to Finetuner: This is necessary if you'd like to run fine-tuning jobs with Finetuner in the cloud.
- Start fine-tuning run: Select backbone model, training and evaluation data for your evaluation callback.
- Monitor: Check the status and logs of the progress on your fine-tuning run.
- Save model: If your fine-tuning run has successfully completed, save it for further use and integration.
Next steps
- Take a look at the walk through documentation for an overview of how Finetuner works.
- Get started with our example use-cases:
Intrigued? That's only scratching the surface of what Finetuner is capable of. Read our docs to learn more.
Support
- Use Discussions to talk about your use cases, questions, and support queries.
- Join our Slack community and chat with other Jina AI community members about ideas.
- Join our Engineering All Hands meet-up to discuss your use case and learn Jina AI new features.
- When? The second Tuesday of every month
- Where? Zoom (see our public events calendar/.ical) and live stream on YouTube
- Subscribe to the latest video tutorials on our YouTube channel
Join Us
Finetuner is backed by Jina AI and licensed under Apache-2.0. We are actively hiring AI engineers, solution engineers to build the next neural search ecosystem in opensource.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.