mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-05 20:26:31 +00:00
Reintroduce changing the distance from Cosine to Cosine binary quantized
This commit is contained in:
committed by
Louis Dureuil
parent
f5f173e451
commit
900e8a0d9c
@ -166,20 +166,20 @@ impl VectorStore {
|
|||||||
// only happens once in the life of an embedder, it's not very performances
|
// only happens once in the life of an embedder, it's not very performances
|
||||||
// sensitive.
|
// sensitive.
|
||||||
if quantizing && !self.quantized {
|
if quantizing && !self.quantized {
|
||||||
// let writer = writer.prepare_changing_distance::<BinaryQuantizedCosine>(wtxn)?;
|
let writer = writer.prepare_changing_distance::<BinaryQuantizedCosine>(wtxn)?;
|
||||||
// writer
|
writer
|
||||||
// .builder(rng)
|
.builder(rng)
|
||||||
// .available_memory(hannoy_memory.unwrap_or(usize::MAX))
|
.available_memory(hannoy_memory.unwrap_or(usize::MAX))
|
||||||
// .progress(|step| progress.update_progress_from_hannoy(step))
|
// .progress(|step| progress.update_progress_from_hannoy(step))
|
||||||
// .cancel(cancel)
|
.cancel(cancel)
|
||||||
// .build(wtxn)?;
|
.ef_construction(HANNOY_EF_CONSTRUCTION)
|
||||||
unimplemented!("switching from quantized to non-quantized");
|
.build::<HANNOY_M, HANNOY_M0>(wtxn)?;
|
||||||
} else if writer.need_build(wtxn)? {
|
} else if writer.need_build(wtxn)? {
|
||||||
writer
|
writer
|
||||||
.builder(rng)
|
.builder(rng)
|
||||||
.available_memory(hannoy_memory.unwrap_or(usize::MAX))
|
.available_memory(hannoy_memory.unwrap_or(usize::MAX))
|
||||||
// .progress(|step| progress.update_progress_from_hannoy(step))
|
// .progress(|step| progress.update_progress_from_hannoy(step))
|
||||||
// .cancel(cancel)
|
.cancel(cancel)
|
||||||
.ef_construction(HANNOY_EF_CONSTRUCTION)
|
.ef_construction(HANNOY_EF_CONSTRUCTION)
|
||||||
.build::<HANNOY_M, HANNOY_M0>(wtxn)?;
|
.build::<HANNOY_M, HANNOY_M0>(wtxn)?;
|
||||||
} else if writer.is_empty(wtxn)? {
|
} else if writer.is_empty(wtxn)? {
|
||||||
|
Reference in New Issue
Block a user