diff --git a/milli/src/vector/hf.rs b/milli/src/vector/hf.rs index e341a553e..4c3c0670c 100644 --- a/milli/src/vector/hf.rs +++ b/milli/src/vector/hf.rs @@ -87,11 +87,11 @@ impl Embedder { let config = api.get("config.json").map_err(NewEmbedderError::api_get)?; let tokenizer = api.get("tokenizer.json").map_err(NewEmbedderError::api_get)?; let (weights, source) = { - api.get("pytorch_model.bin") - .map(|filename| (filename, WeightSource::Pytorch)) + api.get("model.safetensors") + .map(|filename| (filename, WeightSource::Safetensors)) .or_else(|_| { - api.get("model.safetensors") - .map(|filename| (filename, WeightSource::Safetensors)) + api.get("pytorch_model.bin") + .map(|filename| (filename, WeightSource::Pytorch)) }) .map_err(NewEmbedderError::api_get)? };