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::RerankHead;
use crate::registry::DtypeSupport;
use crate::registry::Family;
use crate::registry::Support;
use crate::registry::WeightsFormat;
use crate::registry::rerank::RerankInput;
use crate::registry::rerank::entry::RerankEntry;
use crate::registry::t4::T4_BF16_UNTESTED;
use crate::rerank::ScoreActivation;
use crate::tokenizer::PairTruncationPolicy;

/// `BAAI/bge-reranker-v2-m3`: a stock `XLMRobertaForSequenceClassification` with bge-m3's encoder, scored with
/// `FlagReranker`'s defaults: 512 tokens although its tokenizer declares 8192. F16 misses its CPU ceiling.
pub(super) const BGE_RERANKER_V2_M3: RerankEntry = RerankEntry {
  id: "BAAI/bge-reranker-v2-m3",
  family: Family::XlmRoberta,
  head: RerankHead::RobertaClassificationHead,
  default_max_length: 512,
  score_activation: ScoreActivation::Identity,
  input: RerankInput::Pair {
    truncation: PairTruncationPolicy::PreserveQueryToThreeQuarters,
  },
  alibi_variant: None,
  position_scheme: None,
  default_dtype: DType::F32,
  cpu: Support::Verified,
  metal: Support::Verified,
  cuda: Support::Verified,
  dtypes: DtypeSupport::verified(),
  license: "Apache-2.0",
  size_gb: 2.27,
  phase: 5,
  weights: WeightsFormat::Safetensors,
  gated: false,
  accel_only_dtypes: &[DType::F16],
  cell_exceptions: T4_BF16_UNTESTED,
};