dataDaemon commited on
Commit
39ff58c
·
verified ·
1 Parent(s): 06f069a

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +71 -0
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ tags:
6
+ - model2vec
7
+ - embeddings
8
+ - static-embeddings
9
+ - rust
10
+ - m2v
11
+ - int8
12
+ library_name: m2v
13
+ base_model:
14
+ - minishlab/blink-8M
15
+ - minishlab/blink-code-16M
16
+ - minishlab/potion-retrieval-32M
17
+ ---
18
+
19
+ # `dataDaemon/m2v-models`: Pre-Packed `.m2v` v1 Static Embeddings
20
+
21
+ Pre-packed, CRC32-verified `.m2v` v1 binary checkpoints for the [`m2v`](https://crates.io/crates/m2v) Rust runtime so that applications can run local semantic search and embedding without installing Python or PyTorch. Each binary stores a 64-byte header, an open-addressed FNV-1a vocabulary hash table, UTF-8 token strings, per-row `f32` scales, and 32-byte-aligned `i8` quantized weights.
22
+
23
+ ## Rust Quickstart
24
+
25
+ Download a model with `curl` and verify its payload CRC32 on open:
26
+
27
+ ```sh
28
+ curl -L -o blink-8m-256.m2v \
29
+ https://huggingface.co/dataDaemon/m2v-models/resolve/main/blink-8m-256.m2v
30
+ ```
31
+
32
+ ```rust
33
+ use m2v::{cosine, Embedder, OpenOptions};
34
+
35
+ fn main() -> Result<(), m2v::M2vError> {
36
+ let embedder = Embedder::<256>::open(
37
+ "blink-8m-256.m2v",
38
+ OpenOptions {
39
+ verify_checksum: true,
40
+ max_tokens: 256,
41
+ },
42
+ )?;
43
+
44
+ let mut a = [0.0f32; 256];
45
+ let mut b = [0.0f32; 256];
46
+ embedder.embed_into("zero-allocation static embeddings", &mut a);
47
+ embedder.embed_into("fast stack-allocated vector runtime", &mut b);
48
+
49
+ println!("cosine similarity: {:.4}", cosine(&a, &b));
50
+ Ok(())
51
+ }
52
+ ```
53
+
54
+ ## Available Artifacts
55
+
56
+ | File | Base Checkpoint | Dims | Size (Bytes) | Payload CRC32 | Target Workload |
57
+ | :--- | :--- | :---: | :---: | :---: | :--- |
58
+ | `blink-8m-256.m2v` | `minishlab/blink-8M` | `256` | `9,037,376` (`8.62 MiB`) | `0x6a345b86` | General English prose and queries |
59
+ | `blink-code-16m-256.m2v` | `minishlab/blink-code-16M` | `256` | `18,797,184` (`17.93 MiB`) | `0x5cd263bf` | Source code retrieval with camelCase and snake_case splitting |
60
+ | `potion-retrieval-32m-256.m2v` | `minishlab/potion-retrieval-32M` | `256` | `18,929,952` (`18.05 MiB`) | `0x28c72c2c` | High-recall 256-dim retrieval |
61
+
62
+ ## Overview and Limitations
63
+
64
+ - **Format**: `.m2v` v1 (`i8` symmetric per-row quantization, little-endian, 32-byte weight alignment).
65
+ - **Intended Use**: Local CPU and `wasm32` embedding for search, filtering, and small-to-medium vector catalogs via [`m2v`](https://crates.io/crates/m2v).
66
+ - **Limitations**: Static subword pooling trades away contextual cross-token attention in exchange for microsecond inference latency and single-digit megabyte footprints.
67
+ - **Tokenizer Flags**: `blink-8m-256.m2v` and `potion-retrieval-32m-256.m2v` use uncased WordPiece tokenization (`FLAG_LOWERCASE | FLAG_WORDPIECE`), while `blink-code-16m-256.m2v` adds `FLAG_SPLIT_CAMEL` for identifier splitting.
68
+
69
+ ## Verification
70
+
71
+ Every `.m2v` file in this repository was packed with `--dims 256 --verify`, checked against the source Model2Vec checkpoint via cosine parity, and opened with `OpenOptions { verify_checksum: true, max_tokens: 256 }` in Rust `m2v` `0.10.0`.