theroot commited on
Commit
6bb5213
·
verified ·
1 Parent(s): 3f52ffe

Clarify normalization and folded linear head loading

Browse files
Files changed (1) hide show
  1. README.md +8 -0
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`.