BorisTM commited on
Commit
22776cb
·
1 Parent(s): deccf82

Fix download tracking config for binary model

Browse files
README.md CHANGED
@@ -31,8 +31,8 @@ full Transformer encoder is too expensive to run at high throughput.
31
  > [!NOTE]
32
  > StaRSE has **61.51M logical embedding parameters** (`120,138 × 512`), stored
33
  > as binary sign bits plus one FP32 L2 norm per vocabulary entry, making
34
- > `model.safetensors` only **7.79 MiB**. The Safetensors badge shows incorrect
35
- > value.
36
 
37
  ![RuMTEB quality-latency trade-off](assets/rumteb_cpu_latency.png)
38
 
@@ -91,4 +91,4 @@ print(similarities)
91
  year = {2026},
92
  url = {https://huggingface.co/BorisTM/starse}
93
  }
94
- ```
 
31
  > [!NOTE]
32
  > StaRSE has **61.51M logical embedding parameters** (`120,138 × 512`), stored
33
  > as binary sign bits plus one FP32 L2 norm per vocabulary entry, making
34
+ > `model.safetensors` only **7.79 MiB**. The Safetensors badge shows **7.81M**
35
+ > packed tensor values, not the logical number of embedding weights.
36
 
37
  ![RuMTEB quality-latency trade-off](assets/rumteb_cpu_latency.png)
38
 
 
91
  year = {2026},
92
  url = {https://huggingface.co/BorisTM/starse}
93
  }
94
+ ```
binary_static_embedding.py CHANGED
@@ -10,7 +10,7 @@ On disk the model is ~30x smaller than the fp32 form. To use it via
10
  ``SentenceTransformer``, pass ``trust_remote_code=True``::
11
 
12
  from sentence_transformers import SentenceTransformer
13
- model = SentenceTransformer("BorisTM/starse-512", trust_remote_code=True)
14
  embeddings = model.encode(["пример"])
15
  """
16
 
@@ -42,7 +42,7 @@ class BinaryStaticEmbedding(InputModule):
42
 
43
  modalities: list[str] = ["text"]
44
  config_keys: list[str] = ["embedding_dim", "vocab_size"]
45
- config_file_name: str = "binary_static_embedding_config.json"
46
  weights_file_name: str = "model.safetensors"
47
  tokenizer_file_name: str = "tokenizer.json"
48
 
 
10
  ``SentenceTransformer``, pass ``trust_remote_code=True``::
11
 
12
  from sentence_transformers import SentenceTransformer
13
+ model = SentenceTransformer("BorisTM/starse", trust_remote_code=True)
14
  embeddings = model.encode(["пример"])
15
  """
16
 
 
42
 
43
  modalities: list[str] = ["text"]
44
  config_keys: list[str] = ["embedding_dim", "vocab_size"]
45
+ config_file_name: str = "config.json"
46
  weights_file_name: str = "model.safetensors"
47
  tokenizer_file_name: str = "tokenizer.json"
48
 
binary_static_embedding_config.json → config.json RENAMED
@@ -3,4 +3,4 @@
3
  "vocab_size": 120138,
4
  "packed_bit_order": "big",
5
  "scale": "norm / sqrt(embedding_dim)"
6
- }
 
3
  "vocab_size": 120138,
4
  "packed_bit_order": "big",
5
  "scale": "norm / sqrt(embedding_dim)"
6
+ }
starse_static_meta.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
- "repo_id": "BorisTM/starse-512",
3
- "model": "StaRSE-512",
4
  "dim": 512,
5
  "vocab_size": 120138,
6
  "encoding": "packed_sign_bits_with_per_token_l2_norm",
 
1
  {
2
+ "repo_id": "BorisTM/starse",
3
+ "model": "StaRSE",
4
  "dim": 512,
5
  "vocab_size": 120138,
6
  "encoding": "packed_sign_bits_with_per_token_l2_norm",