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
//! Why `CanddingError::UnsupportedOnDevice` refuses a dtype on a backend.

use candle_core::DType;

use crate::registry::Backend;

/// candle has no CPU BF16 matmul for any model; any other refusal is the catalog's cell for this checkpoint.
pub(super) fn refusal(backend: &Backend, dtype: &DType) -> String {
  match (backend, dtype) {
    (Backend::Cpu, DType::BF16) => "bf16 matmul".to_string(),
    (Backend::Cpu, dtype) => format!(
      "{} matmul for this checkpoint (it is accelerator-only there)",
      dtype.as_str()
    ),
    (_, dtype) => format!(
      "{} for this checkpoint (its registry cell reads unsupported there)",
      dtype.as_str()
    ),
  }
}