Skip to content

Commit 582da09

Browse files
authored
don't set weights for non-quantized models (#321)
1 parent 4f02616 commit 582da09

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

model2vec/distill/distillation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ def distill_from_model(
118118
else:
119119
# Post-process the embeddings.
120120
embeddings, weights = post_process_embeddings(np.asarray(embeddings), pca_dims, sif_coefficient=sif_coefficient)
121+
embeddings = embeddings * weights[:, None]
122+
weights = None
121123
token_mapping = None
122124
# Quantize the embeddings.
123125
embeddings = quantize_embeddings(embeddings, quantize_to)

0 commit comments

Comments
 (0)