Downloads · 30 days
36
7% of all-time downloads
bhavnicksm/brown-beetle-tiny-v1
brown-beetle-tiny-v1 is a machine learning model from bhavnicksm. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for model2vec. The card lists the license as mit.
<div align="center" <img width="75%" alt="Beetle logo" src="./assets/beetlelogo.png" </div
Downloads · 30 days
36
7% of all-time downloads
All-time downloads
535
Public
Parameters
3.8M
15.1 MB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors15.1 MB · 93%
From the Hugging Face model README
[!TIP] Beetles are some of the most diverse and interesting creatures on Earth. They are found in every environment, from the deepest oceans to the highest mountains. They are also known for their ability to adapt to a wide range of habitats and lifestyles. They are small, fast and powerful!
The beetle series of models are made as good starting points for Static Embedding training (via TokenLearn or Fine-tuning), as well as decent Static Embedding models. Each beetle model is made to be an improvement over the original M2V_base_output model in some way, and that's the threshold we set for each model (except the brown beetle series, which is the original model).
This model has been distilled from baai/bge-base-en-v1.5, with PCA with 128 dimensions and applying Zipf.
[!NOTE] The brown beetle series is made for convinience in loading and using the model instead of having to run it, though it is pretty fast to reproduce anyways. If you want to use the original model by the folks from the Minish Lab, you can use the M2V_base_output model.
Install model2vec using pip:
pip install model2vec
Load this model using the from_pretrained method:
from model2vec import StaticModel
# Load a pretrained Model2Vec model
model = StaticModel.from_pretrained("bhavnicksm/brown-beetle-tiny-v1")
# Compute text embeddings
embeddings = model.encode(["Example sentence"])
Read more about the Model2Vec library here.
To reproduce this model, you must install the model2vec[distill] package and use the following code:
from model2vec.distill import distill
# Distill the model
m2v_model = distill(
model_name="bge-base-en-v1.5",
pca_dims=128,
apply_zipf=True,
)
# Save the model
m2v_model.save_pretrained("brown-beetle-tiny-v1")
Coming soon...
This model is made using the Model2Vec library. Credit goes to the Minish Lab team for developing this library.
Please cite the Model2Vec repository if you use this model in your work.
@software{minishlab2024model2vec,
authors = {Stephan Tulkens, Thomas van Dongen},
title = {Model2Vec: Turn any Sentence Transformer into a Small Fast Model},
year = {2024},
url = {https://github.com/MinishLab/model2vec},
}