minishlab / M2V_base_glove_subword

huggingface.co
Total runs: 437
24-hour runs: 0
7-day runs: 21
30-day runs: -25
Model's Last Updated: January 22 2025

Introduction of M2V_base_glove_subword

Model Details of M2V_base_glove_subword

M2V_base_glove_subword Model Card

This Model2Vec model is a distilled version of the BAAI/bge-base-en-v1.5 Sentence Transformer. It uses static embeddings, allowing text embeddings to be computed orders of magnitude faster on both GPU and CPU. It is designed for applications where computational resources are limited or where real-time performance is critical.

Installation

Install model2vec using pip:

pip install model2vec
Usage

Load this model using the from_pretrained method:

from model2vec import StaticModel

# Load a pretrained Model2Vec model
model = StaticModel.from_pretrained("M2V_base_glove_subword")

# Compute text embeddings
embeddings = model.encode(["Example sentence"])

Alternatively, you can distill your own model using the distill method:

from model2vec.distill import distill

# Choose a Sentence Transformer model
model_name = "BAAI/bge-base-en-v1.5"

# Distill the model
m2v_model = distill(model_name=model_name, pca_dims=256)

# Save the model
m2v_model.save_pretrained("m2v_model")
How it works

Model2vec creates a small, fast, and powerful model that outperforms other static embedding models by a large margin on all tasks we could find, while being much faster to create than traditional static embedding models such as GloVe. Best of all, you don't need any data to distill a model using Model2Vec.

It works by passing a vocabulary through a sentence transformer model, then reducing the dimensionality of the resulting embeddings using PCA, and finally weighting the embeddings using zipf weighting. During inference, we simply take the mean of all token embeddings occurring in a sentence.

Additional Resources
Library Authors

Model2Vec was developed by the Minish Lab team consisting of Stephan Tulkens and Thomas van Dongen .

Citation

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},
}

Runs of minishlab M2V_base_glove_subword on huggingface.co

437
Total runs
0
24-hour runs
6
3-day runs
21
7-day runs
-25
30-day runs

More Information About M2V_base_glove_subword huggingface.co Model

More M2V_base_glove_subword license Visit here:

https://choosealicense.com/licenses/mit

M2V_base_glove_subword huggingface.co

M2V_base_glove_subword huggingface.co is an AI model on huggingface.co that provides M2V_base_glove_subword's model effect (), which can be used instantly with this minishlab M2V_base_glove_subword model. huggingface.co supports a free trial of the M2V_base_glove_subword model, and also provides paid use of the M2V_base_glove_subword. Support call M2V_base_glove_subword model through api, including Node.js, Python, http.

M2V_base_glove_subword huggingface.co Url

https://huggingface.co/minishlab/M2V_base_glove_subword

minishlab M2V_base_glove_subword online free

M2V_base_glove_subword huggingface.co is an online trial and call api platform, which integrates M2V_base_glove_subword's modeling effects, including api services, and provides a free online trial of M2V_base_glove_subword, you can try M2V_base_glove_subword online for free by clicking the link below.

minishlab M2V_base_glove_subword online free url in huggingface.co:

https://huggingface.co/minishlab/M2V_base_glove_subword

M2V_base_glove_subword install

M2V_base_glove_subword is an open source model from GitHub that offers a free installation service, and any user can find M2V_base_glove_subword on GitHub to install. At the same time, huggingface.co provides the effect of M2V_base_glove_subword install, users can directly use M2V_base_glove_subword installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

M2V_base_glove_subword install url in huggingface.co:

https://huggingface.co/minishlab/M2V_base_glove_subword

Url of M2V_base_glove_subword

M2V_base_glove_subword huggingface.co Url

Provider of M2V_base_glove_subword huggingface.co

minishlab
ORGANIZATIONS

Other API from minishlab