Commit
·
caccd81
1
Parent(s):
f59986c
Initial version
Browse files- .gitattributes +2 -0
- README.md +34 -0
- config.json +8 -0
- model.safetensors +3 -0
- vocab.json +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
model.sqlite filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
vocab.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-similarity
|
| 4 |
+
inference: false
|
| 5 |
+
license: apache-2.0
|
| 6 |
+
language: en
|
| 7 |
+
library_name: staticvectors
|
| 8 |
+
base_model:
|
| 9 |
+
- NeuML/word2vec
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Word2Vec StaticVectors model
|
| 13 |
+
|
| 14 |
+
This model is an export of these [Word2Vec Vectors](https://code.google.com/archive/p/word2vec/) for [`staticvectors`](https://github.com/neuml/staticvectors). `staticvectors` enables running inference in Python with NumPy. This helps it maintain solid runtime performance.
|
| 15 |
+
|
| 16 |
+
_This model is a quantized version of the base model. It's using 10x256 Product Quantization._
|
| 17 |
+
|
| 18 |
+
## Usage with StaticVectors
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
from staticvectors import StaticVectors
|
| 22 |
+
|
| 23 |
+
model = StaticVectors("neuml/word2vec")
|
| 24 |
+
model.embeddings(["word"])
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
Given that pre-trained embeddings models can get quite large, there is also a SQLite version that lazily loads vectors.
|
| 28 |
+
|
| 29 |
+
```python
|
| 30 |
+
from staticvectors import StaticVectors
|
| 31 |
+
|
| 32 |
+
model = StaticVectors("neuml/word2vec/model.sqlite")
|
| 33 |
+
model.embeddings(["word"])
|
| 34 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "staticvectors",
|
| 3 |
+
"storage": "safetensors",
|
| 4 |
+
"format": "text",
|
| 5 |
+
"source": "GoogleNews-vectors-negative300.txt",
|
| 6 |
+
"total": 3000000,
|
| 7 |
+
"dim": 300
|
| 8 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bba9a7b3e81279a7d475ac3a7c94fe75c1594c552120dc92144be87555c5e031
|
| 3 |
+
size 30307440
|
vocab.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:80eee12aacfcf214f386f2073eb2a2a5b4e385c260b9670a9bb7fc8a8dbced7f
|
| 3 |
+
size 79304287
|