Instructions to use dataDaemon/m2v-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Model2Vec
How to use dataDaemon/m2v-models with Model2Vec:
from model2vec import StaticModel model = StaticModel.from_pretrained("dataDaemon/m2v-models") embeddings = model.encode(["It's dangerous to go alone!", "It's a secret to everybody."]) print(embeddings.shape) - Notebooks
- Google Colab
- Kaggle
File size: 3,001 Bytes
39ff58c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | ---
language:
- en
license: apache-2.0
tags:
- model2vec
- embeddings
- static-embeddings
- rust
- m2v
- int8
library_name: m2v
base_model:
- minishlab/blink-8M
- minishlab/blink-code-16M
- minishlab/potion-retrieval-32M
---
# `dataDaemon/m2v-models`: Pre-Packed `.m2v` v1 Static Embeddings
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.
## Rust Quickstart
Download a model with `curl` and verify its payload CRC32 on open:
```sh
curl -L -o blink-8m-256.m2v \
https://huggingface.co/dataDaemon/m2v-models/resolve/main/blink-8m-256.m2v
```
```rust
use m2v::{cosine, Embedder, OpenOptions};
fn main() -> Result<(), m2v::M2vError> {
let embedder = Embedder::<256>::open(
"blink-8m-256.m2v",
OpenOptions {
verify_checksum: true,
max_tokens: 256,
},
)?;
let mut a = [0.0f32; 256];
let mut b = [0.0f32; 256];
embedder.embed_into("zero-allocation static embeddings", &mut a);
embedder.embed_into("fast stack-allocated vector runtime", &mut b);
println!("cosine similarity: {:.4}", cosine(&a, &b));
Ok(())
}
```
## Available Artifacts
| File | Base Checkpoint | Dims | Size (Bytes) | Payload CRC32 | Target Workload |
| :--- | :--- | :---: | :---: | :---: | :--- |
| `blink-8m-256.m2v` | `minishlab/blink-8M` | `256` | `9,037,376` (`8.62 MiB`) | `0x6a345b86` | General English prose and queries |
| `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 |
| `potion-retrieval-32m-256.m2v` | `minishlab/potion-retrieval-32M` | `256` | `18,929,952` (`18.05 MiB`) | `0x28c72c2c` | High-recall 256-dim retrieval |
## Overview and Limitations
- **Format**: `.m2v` v1 (`i8` symmetric per-row quantization, little-endian, 32-byte weight alignment).
- **Intended Use**: Local CPU and `wasm32` embedding for search, filtering, and small-to-medium vector catalogs via [`m2v`](https://crates.io/crates/m2v).
- **Limitations**: Static subword pooling trades away contextual cross-token attention in exchange for microsecond inference latency and single-digit megabyte footprints.
- **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.
## Verification
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`.
|