Finetuner allows one to tune the weights of any deep neural network for better embedding on search tasks.
Project description
Finetuning any deep neural network for better embedding on neural search tasks
Finetuner allows one to tune the weights of any deep neural network for better embedding on search tasks. It accompanies Jina to deliver the last mile of performance-tuning for neural search applications.
🎛 Designed for finetuning: a machine learning-powered human-in-the-loop tool for leveling up your pretrained models in neural search applications.
🔱 Powerful yet intuitive: all you need is finetuner.fit()
- a one-liner that unlocks rich features such as
siamese/triplet network, interactive labeling, layer trimming, weights freezing, dimensionality reduction.
⚛️ Framework-agnostic: promise an identical API experience on Pytorch , Keras or PaddlePaddle deep learning backends.
🧈 Jina integration: buttery smooth integration with Jina, reducing the cost of context-switch between experimenting and production.
How does it work
Install
Make sure you have Python 3.7+ and one of Pytorch, Keras or PaddlePaddle installed on Linux/MacOS.
pip install finetuner
Documentation
Usage
🪄 Usage | Do you have an embedding model? | ||
---|---|---|---|
Yes | No | ||
Do you have labeled data? | Yes | 1️⃣ | 3️⃣ |
No | 2️⃣ | 4️⃣ |
1️⃣ Have embedding model and labeled data
Perfect! Now embed_model
and labeled_data
are given by you already, simply do:
import finetuner
finetuner.fit(
embed_model,
train_data=labeled_data
)
2️⃣ Have embedding model and unlabeled data
You have an embed_model
to use, but no labeled data for finetuning this model. No worry, that's good enough already!
You can use Finetuner to interactive label data and train embed_model
as below:
import finetuner
finetuner.fit(
embed_model,
train_data=unlabeled_data,
interactive=True
)
3️⃣ Have general model and labeled data
You have a general_model
which does not output embeddings. Luckily you provide some labeled_data
for training. No
worry, Finetuner can convert your model into an embedding model and train it via:
import finetuner
finetuner.fit(
general_model,
train_data=labeled_data,
to_embedding_model=True,
output_dim=100
)
4️⃣ Have general model and unlabeled data
You have a general_model
which is not for embeddings. Meanwhile, you don't have labeled data for training. But no
worries, Finetuner can help you train an embedding model with interactive labeling on-the-fly:
import finetuner
finetuner.fit(
general_model,
train_data=unlabeled_data,
interactive=True,
to_embedding_model=True,
output_dim=100
)
Support
- Use Discussions to talk about your use cases, questions, and support queries.
- Join our Slack community and chat with other Jina community members about ideas.
- Join our Engineering All Hands meet-up to discuss your use case and learn Jina's 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.