Instructions to use fse/paragram-25 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- fse
How to use fse/paragram-25 with fse:
pip install "fse<2"
from fse import SIF, IndexedList, Vectors vectors = Vectors.from_pretrained("paragram-25") model = SIF(vectors) sentences = IndexedList([["hello", "world"], ["fast", "sentence", "embeddings"]]) model.train(sentences) vector = model.sv[0] - Notebooks
- Google Colab
- Kaggle
Paragram (25 dimensions)
25-dimensional Paragram word embeddings for 99,958 English words, from "Towards Universal Paraphrastic Sentence Embeddings".
This is a gensim model, packaged for fse (Fast Sentence Embeddings), which turns word vectors into sentence vectors with CBOW averaging, SIF and uSIF.
Usage
This repository uses the fse 1.x API and requires fse<2.
For fse 2.0, choose a finished encoder from the classic model catalog.
See the migration guide before upgrading.
pip install "fse<2"
from fse import SIF, IndexedList, Vectors
vectors = Vectors.from_pretrained("paragram-25")
model = SIF(vectors)
sentences = IndexedList([["hello", "world"], ["fast", "sentence", "embeddings"]])
model.train(sentences)
model.sv[0] # the vector of the first sentence
Vectors.from_pretrained("paragram-25", mmap="r") memory-maps the vectors instead of loading them into RAM.
Files
| File | Content |
|---|---|
paragram-25.model |
gensim KeyedVectors (vocabulary, metadata and the 99,958 ร 25 float32 vectors) |
Source and license
The vectors were published by John Wieting on his page at Carnegie Mellon University. The page states no license, so none is given here. This repository redistributes them in the gensim format.
- Wieting, Bansal, Gimpel and Livescu (2016), Towards Universal Paraphrastic Sentence Embeddings
About fse
fse is maintained by Dr. Oliver Borchers. Source code, documentation and the STS benchmark of all vector sets in this organization: github.com/oborchers/Fast_Sentence_Embeddings.
- Downloads last month
- 23