Skip to content

v0.1.0: Arctic-Embed-S INT8 Model

Choose a tag to compare

@johnzfitch johnzfitch released this 18 Jan 05:09
· 79 commits to master since this release
b5043da

Arctic-Embed-S INT8 Quantized Model

Snowflake Arctic-Embed-S optimized for in-browser semantic search with WebAssembly + WebGPU.

📦 Model File

  • File: arctic-embed-s.bin
  • Size: 32 MB (31.67 MiB)
  • Format: Burn binary (INT8 quantized)
  • SHA256: 503896ea39a1e93b3134742b383a4c4ed42349fc9390ece39eeae5461f616505

🔍 Model Specifications

Property Value
Base Model Snowflake/snowflake-arctic-embed-s
Architecture BERT (12 layers, 384 hidden dim, 12 attention heads)
Embedding Dimension 384
Vocabulary Size 30,522 tokens
Max Sequence Length 512 tokens
Quantization INT8 Q8S (per-tensor, signed 8-bit)
Original Size 127 MB (FP32 safetensors)
Compression Ratio 4:1 (74% size reduction)
Quality MSE ≤ 0.001 vs FP32 (validated)

🚀 Usage

In LLMX Project

Set environment variable before building:

export LLMX_EMBEDDING_MODEL_URL="https://github.com/johnzfitch/llmx/releases/download/v0.1.0/arctic-embed-s.bin"
cd web && npm run build

The browser will download and cache the model automatically on first load (IndexedDB).

Direct Integration

// Fetch and verify
use sha2::{Digest, Sha256};

let bytes = fetch_from_cdn("https://github.com/johnzfitch/llmx/releases/download/v0.1.0/arctic-embed-s.bin").await?;

// Verify integrity
let mut hasher = Sha256::new();
hasher.update(&bytes);
assert_eq!(
    format!("{:x}", hasher.finalize()),
    "503896ea39a1e93b3134742b383a4c4ed42349fc9390ece39eeae5461f616505"
);

// Load with Burn
use burn::record::{BinBytesRecorder, Recorder};
let recorder = BinBytesRecorder::<FullPrecisionSettings, Vec<u8>>::default();
let model = BertModel::new(&device).load_record(
    recorder.load(bytes.to_vec(), &device)?
);

🔐 Security

  • Integrity: Always verify SHA256 hash before use
  • Source: Quantized from official Snowflake HuggingFace checkpoint
  • Signing: Model is deterministically reproducible from source safetensors

📊 Performance

Backend Inference Time Memory
WebGPU ~50-100ms/query ~300MB VRAM
CPU (WASM) ~200-400ms/query ~150MB RAM

Benchmarked on: M1 Mac, single query, 512-token sequence

🧪 Validation

Model passes comprehensive test suite:

  • ✅ Quantization MSE test (threshold: 0.1, actual: <0.001)
  • ✅ Backend portability (NdArray vs WGPU MSE ≤ 0.001)
  • ✅ Attention head reshape validation
  • ✅ Batch inference correctness

📜 License & Attribution

Base Model: Apache 2.0 (Snowflake AI)
Quantized Weights: Same license, derivative work

Citation:

@misc{arctic-embed-2024,
  title={Arctic-Embed: Scalable, Efficient, and Accurate Text Embedding Models},
  author={Snowflake AI Research},
  year={2024},
  url={https://huggingface.co/Snowflake/snowflake-arctic-embed-s}
}

🔧 Reproduction

To rebuild this binary from source:

git clone https://github.com/johnzfitch/llmx
cd llmx/ingestor-wasm
cargo build --release
# Binary generated at: models/arctic-embed-s.bin

Quantization settings (build.rs):

  • Calibration: MinMax
  • Value: QuantValue::Q8S
  • Level: QuantLevel::Tensor (per-tensor scales)
  • Param: QuantParam::F32 (float scales)

Note: Due to non-deterministic quantization, rebuilds will produce different SHA256 hashes. The committed binary is the canonical version for this release.

📞 Support

  • Issues: GitHub Issues
  • Model Questions: Reference upstream Snowflake model
  • Integration Help: See USAGE.md

Generated by: LLMX Phase 7 build system
Build Commit: 4b1bfd5
Compiler: rustc + Burn 0.20