model2vec 0.2.3__py3-none-any.whl → 0.2.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,6 @@ from typing import Literal
3
3
 
4
4
  import numpy as np
5
5
  from huggingface_hub import model_info
6
- from huggingface_hub.utils._errors import RepositoryNotFoundError
7
6
  from sklearn.decomposition import PCA
8
7
  from tokenizers.models import BPE, Unigram
9
8
  from transformers import AutoModel, AutoTokenizer, PreTrainedModel, PreTrainedTokenizerFast
@@ -16,6 +15,14 @@ from model2vec.distill.tokenizer import add_tokens, preprocess_vocabulary, remov
16
15
  from model2vec.distill.utils import select_optimal_device
17
16
  from model2vec.model import StaticModel
18
17
 
18
+ try:
19
+ # For huggingface_hub>=0.25.0
20
+ from huggingface_hub.errors import RepositoryNotFoundError
21
+ except ImportError:
22
+ # For huggingface_hub<0.25.0
23
+ from huggingface_hub.utils._errors import RepositoryNotFoundError
24
+
25
+
19
26
  logger = logging.getLogger(__name__)
20
27
 
21
28
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: model2vec
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: Distill a Small Fast Model from any Sentence Transformer
5
5
  Author-email: Stéphan Tulkens <stephantul@gmail.com>, Thomas van Dongen <thomas123@live.nl>
6
6
  License: MIT License
@@ -4,12 +4,12 @@ model2vec/model_card_template.md,sha256=rQo4bE3VPXH3XB9OUCe7FCenhBc4wv6L1sNURVT4
4
4
  model2vec/utils.py,sha256=gS4-_Lno3iDG0k1B1tbcAhqyINZeTOFDJ6gP46YPkTc,8227
5
5
  model2vec/distill/__init__.py,sha256=M5kp6RGYBsKQ6tqnoZiguPZomaR093cj-oxkV3Sdp1k,116
6
6
  model2vec/distill/__main__.py,sha256=syBzxZz1zQi3UUD7KQAM0wG0W9oqHcKlAT5RX92tn0A,1738
7
- model2vec/distill/distillation.py,sha256=DBcY2QITNjVGGsjZgdZZfl6Fab9M6Z_9FejlYH82KjE,10789
7
+ model2vec/distill/distillation.py,sha256=iTApiheYzN6rPSvAVTehhN3P8HORhTrRyjksp4qqI1M,10950
8
8
  model2vec/distill/inference.py,sha256=z8dK546imn_YatB3qLASOjnhSoryV1zk30djIGe0KM0,5475
9
9
  model2vec/distill/tokenizer.py,sha256=rUE599Zk1wxBrKqW8D5Oi3Thtgvhyjm3y188GXoI8_g,4405
10
10
  model2vec/distill/utils.py,sha256=a7PVyKHYZlowYOTHL1-CoVc76OJ0jukDnRquN_nnwLQ,685
11
- model2vec-0.2.3.dist-info/LICENSE,sha256=sCFPFI7OrnOfkWIJ54z-FXEsS4EMi8nUS2wtHRYWqrY,1074
12
- model2vec-0.2.3.dist-info/METADATA,sha256=nzUrcBDi-HL5UXRYcQSQ4INlPeTB5_5VzLUP0VxWy58,21605
13
- model2vec-0.2.3.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
14
- model2vec-0.2.3.dist-info/top_level.txt,sha256=cprhxJcbtkFiydp0BGvdCVNupTWg07-3p93jFStc78g,10
15
- model2vec-0.2.3.dist-info/RECORD,,
11
+ model2vec-0.2.4.dist-info/LICENSE,sha256=sCFPFI7OrnOfkWIJ54z-FXEsS4EMi8nUS2wtHRYWqrY,1074
12
+ model2vec-0.2.4.dist-info/METADATA,sha256=MvlUOjHfr1EwLuqBLiXitAP_iib4EWKW4QGdi5ivkss,21605
13
+ model2vec-0.2.4.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
14
+ model2vec-0.2.4.dist-info/top_level.txt,sha256=cprhxJcbtkFiydp0BGvdCVNupTWg07-3p93jFStc78g,10
15
+ model2vec-0.2.4.dist-info/RECORD,,