mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Disable the cache by default and make it experimental
This commit is contained in:
parent
1876132172
commit
e2d372823a
14 changed files with 101 additions and 34 deletions
|
@ -150,7 +150,10 @@ impl From<PoolingConfig> for Pooling {
|
|||
}
|
||||
|
||||
impl Embedder {
|
||||
pub fn new(options: EmbedderOptions) -> std::result::Result<Self, NewEmbedderError> {
|
||||
pub fn new(
|
||||
options: EmbedderOptions,
|
||||
cache_cap: usize,
|
||||
) -> std::result::Result<Self, NewEmbedderError> {
|
||||
let device = match candle_core::Device::cuda_if_available(0) {
|
||||
Ok(device) => device,
|
||||
Err(error) => {
|
||||
|
@ -252,7 +255,7 @@ impl Embedder {
|
|||
options,
|
||||
dimensions: 0,
|
||||
pooling,
|
||||
cache: EmbeddingCache::new(super::CACHE_CAP),
|
||||
cache: EmbeddingCache::new(cache_cap),
|
||||
};
|
||||
|
||||
let embeddings = this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue