添加 All-MiniLM-L6-v2-Embedding 模型

This commit is contained in:
273265088@qq.com
2026-03-26 13:40:24 +08:00
parent a74b67c93f
commit b6b970fd25
16 changed files with 1670 additions and 10 deletions
+33
View File
@@ -15,6 +15,39 @@ fn load_spec_auto_resolves_to_safetensors_default() {
assert!(spec.validate().is_ok());
}
#[test]
fn load_spec_all_minilm_accepts_onnx() {
let spec = LoadSpec {
model: WhichModel::AllMiniLML6V2,
artifact: ArtifactKind::Onnx,
paths: ModelPaths {
onnx_path: Some("D:/model_download/all-MiniLM-L6-v2/onnx".to_string()),
tokenizer_dir: Some("D:/model_download/all-MiniLM-L6-v2".to_string()),
..Default::default()
},
};
assert!(spec.validate().is_ok());
}
#[test]
fn load_spec_all_minilm_accepts_gguf() {
let spec = LoadSpec {
model: WhichModel::AllMiniLML6V2,
artifact: ArtifactKind::Gguf,
paths: ModelPaths {
gguf_path: Some(
"D:/model_download/All-MiniLM-L6-v2-Embedding-GGUF/all-MiniLM-L6-v2-ggml-model-f16.gguf"
.to_string(),
),
tokenizer_dir: Some("D:/model_download/all-MiniLM-L6-v2".to_string()),
..Default::default()
},
};
assert!(spec.validate().is_ok());
}
#[test]
fn load_spec_gguf_requires_gguf_path() {
let spec = LoadSpec {