candding 0.1.0

Pure candle embeddings for Rust with no ONNX: dense, sparse, multi-vector and rerank models today, image models on the roadmap
Documentation
use candle_core::DType;

use crate::models::SparseHead;
use crate::registry::DtypeSupport;
use crate::registry::Family;
use crate::registry::Support;
use crate::registry::WeightsFormat;
use crate::registry::sparse::entry::SparseComputation;
use crate::registry::sparse::entry::SparseEntry;
use crate::registry::t4::T4_BF16_UNTESTED;

/// `BAAI/bge-m3`'s `sparse_linear.pt`, a relu'd `Linear(1024, 1)` per token; F16 misses its CPU ceiling. The
/// reference uses the published `tokenizer.json`, which a live FlagEmbedding call can differ from by one token.
pub(super) const BGE_M3_SPARSE: SparseEntry = SparseEntry {
  id: "BAAI/bge-m3",
  family: Some(Family::XlmRoberta),
  head: SparseHead::M3Linear,
  vocab_size: 250002,
  default_max_length: 8192,
  cpu: Support::Verified,
  metal: Support::Verified,
  cuda: Support::Verified,
  dtypes: DtypeSupport {
    f32: Support::Verified,
    f16: Support::Verified,
    bf16: Support::Verified,
  },
  license: "MIT",
  size_gb: 2.27,
  phase: 3,
  weights: WeightsFormat::Pickle,
  gated: false,
  accel_only_dtypes: &[DType::F16],
  head_source: None,
  head_revision: None,
  computation: SparseComputation::Encoded,
  cell_exceptions: T4_BF16_UNTESTED,
};