pub const DIMENSIONS: usize = 384;
pub const SOURCE_REPO: &str = "Qdrant/all-MiniLM-L6-v2-onnx";
pub const SOURCE_REVISION: &str = "5f1b8cd78bc4fb444dd171e59b18f3a3af89a079";
pub fn onnx() -> &'static [u8] {
include_bytes!(concat!(env!("OUT_DIR"), "/model.onnx"))
}
pub fn tokenizer_json() -> &'static [u8] {
include_bytes!(concat!(env!("OUT_DIR"), "/tokenizer.json"))
}
pub fn config_json() -> &'static [u8] {
include_bytes!(concat!(env!("OUT_DIR"), "/config.json"))
}
pub fn special_tokens_map_json() -> &'static [u8] {
include_bytes!(concat!(env!("OUT_DIR"), "/special_tokens_map.json"))
}
pub fn tokenizer_config_json() -> &'static [u8] {
include_bytes!(concat!(env!("OUT_DIR"), "/tokenizer_config.json"))
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn all_files_present_and_nonempty() {
assert!(onnx().len() > 1_000_000, "onnx looks too small");
assert!(!tokenizer_json().is_empty());
assert!(!config_json().is_empty());
assert!(!special_tokens_map_json().is_empty());
assert!(!tokenizer_config_json().is_empty());
}
}