stephantulkens commited on
Commit
531ffe6
1 Parent(s): ab2720a

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +24 -13
  2. model.safetensors +3 -0
README.md CHANGED
@@ -4,17 +4,15 @@ language:
4
  - en
5
  library_name: model2vec
6
  license: mit
7
- model_name: M2V_base_glove
8
  tags:
9
  - embeddings
10
  - static-embeddings
11
  ---
12
 
13
- # M2V_base_glove Model Card
14
-
15
- Model2Vec distills a Sentence Transformer into a small, static model.
16
- This model is ideal for applications requiring fast, lightweight embeddings.
17
 
 
18
 
19
 
20
  ## Installation
@@ -25,10 +23,14 @@ pip install model2vec
25
  ```
26
 
27
  ## Usage
28
- A StaticModel can be loaded using the `from_pretrained` method:
29
  ```python
30
  from model2vec import StaticModel
31
- model = StaticModel.from_pretrained("minishlab/M2V_base_output")
 
 
 
 
32
  embeddings = model.encode(["Example sentence"])
33
  ```
34
 
@@ -52,16 +54,25 @@ Model2vec creates a small, fast, and powerful model that outperforms other stati
52
 
53
  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.
54
 
55
- ## Citation
56
-
57
- Please cite the [Model2Vec repository](https://github.com/MinishLab/model2vec) if you use this model in your work.
58
-
59
  ## Additional Resources
60
 
 
61
  - [Model2Vec Repo](https://github.com/MinishLab/model2vec)
62
  - [Model2Vec Results](https://github.com/MinishLab/model2vec?tab=readme-ov-file#results)
63
  - [Model2Vec Tutorials](https://github.com/MinishLab/model2vec/tree/main/tutorials)
64
 
65
- ## Model Authors
 
 
 
 
66
 
67
- Model2Vec was developed by the [Minish Lab](https://github.com/MinishLab) team consisting of Stephan Tulkens and Thomas van Dongen.
 
 
 
 
 
 
 
 
 
4
  - en
5
  library_name: model2vec
6
  license: mit
7
+ model_name: minishlab/M2V_base_glove
8
  tags:
9
  - embeddings
10
  - static-embeddings
11
  ---
12
 
13
+ # minishlab/M2V_base_glove Model Card
 
 
 
14
 
15
+ This [Model2Vec](https://github.com/MinishLab/model2vec) model is a distilled version of the [BAAI/bge-base-en-v1.5](https://huggingface.co/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.
16
 
17
 
18
  ## Installation
 
23
  ```
24
 
25
  ## Usage
26
+ Load this model using the `from_pretrained` method:
27
  ```python
28
  from model2vec import StaticModel
29
+
30
+ # Load a pretrained Model2Vec model
31
+ model = StaticModel.from_pretrained("minishlab/M2V_base_glove")
32
+
33
+ # Compute text embeddings
34
  embeddings = model.encode(["Example sentence"])
35
  ```
36
 
 
54
 
55
  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.
56
 
 
 
 
 
57
  ## Additional Resources
58
 
59
+ - [All Model2Vec models on the hub](https://huggingface.co/models?library=model2vec)
60
  - [Model2Vec Repo](https://github.com/MinishLab/model2vec)
61
  - [Model2Vec Results](https://github.com/MinishLab/model2vec?tab=readme-ov-file#results)
62
  - [Model2Vec Tutorials](https://github.com/MinishLab/model2vec/tree/main/tutorials)
63
 
64
+ ## Library Authors
65
+
66
+ Model2Vec was developed by the [Minish Lab](https://github.com/MinishLab) team consisting of [Stephan Tulkens](https://github.com/stephantul) and [Thomas van Dongen](https://github.com/Pringled).
67
+
68
+ ## Citation
69
 
70
+ Please cite the [Model2Vec repository](https://github.com/MinishLab/model2vec) if you use this model in your work.
71
+ ```
72
+ @software{minishlab2024model2vec,
73
+ authors = {Stephan Tulkens, Thomas van Dongen},
74
+ title = {Model2Vec: Turn any Sentence Transformer into a Small Fast Model},
75
+ year = {2024},
76
+ url = {https://github.com/MinishLab/model2vec},
77
+ }
78
+ ```
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:154f39f40fd8b35055983cd0ba86798313c92b96987a13c905b70e98280fcc18
3
+ size 409602136