Feature Extraction
fse
Safetensors
English
static-embeddings
sentence-embeddings
gensim
paragram
word-embeddings
Instructions to use fse/paranmt-300-raw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- fse
How to use fse/paranmt-300-raw with fse:
pip install "fse>=2.0"
from fse import Encoder encoder = Encoder.from_pretrained("fse/paranmt-300-raw") vectors = encoder.encode(["A sentence.", "Another sentence."]) - Notebooks
- Google Colab
- Kaggle
Clarify normalization and folded linear head loading
Browse files
README.md
CHANGED
|
@@ -41,6 +41,14 @@ encoder = fse.Encoder.from_pretrained("fse/paranmt-300-raw")
|
|
| 41 |
vectors = encoder.encode(["A sentence."])
|
| 42 |
```
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
## Source and license
|
| 45 |
|
| 46 |
Converted from the gensim model fse/paranmt-300 at revision `a08e15771891207a22f840a3091a00a1657d888b`.
|
|
|
|
| 41 |
vectors = encoder.encode(["A sentence."])
|
| 42 |
```
|
| 43 |
|
| 44 |
+
The encoder normalizes every vector to unit length (the stored step `normalize@1`). To get the raw weighted mean instead, for example to fold a linear head into the table, load it with `normalize=False`:
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
encoder = fse.Encoder.from_pretrained("fse/paranmt-300-raw", normalize=False)
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
The suffix `-raw` means without SIF weighting, not without normalization. Both `-raw` and `-sif10` models load normalized by default.
|
| 51 |
+
|
| 52 |
## Source and license
|
| 53 |
|
| 54 |
Converted from the gensim model fse/paranmt-300 at revision `a08e15771891207a22f840a3091a00a1657d888b`.
|