Skip to content

Commit 19e70b9

Browse files
authored
fix: Updated config (#63)
* Updated config * Updated shape
1 parent 75ef00a commit 19e70b9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

model2vec/distill/distillation.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,13 @@ def distill_from_model(
125125

126126
model_name = getattr(model, "name_or_path", "")
127127

128-
config = {"tokenizer_name": model_name, "apply_pca": pca_dims, "apply_zipf": apply_zipf}
128+
config = {
129+
"tokenizer_name": model_name,
130+
"apply_pca": pca_dims,
131+
"apply_zipf": apply_zipf,
132+
"hidden_dim": embeddings.shape[1],
133+
"seq_length": 1000000, # Set this to a high value since we don't have a sequence length limit.
134+
}
129135
# Get the language from the model card
130136
info = model_info(model_name)
131137
language = info.cardData.get("language")

0 commit comments

Comments
 (0)