Skip to content

[Bug]: Fastembed's TextEmbedding does not cache locally when specific_model_path is provided #495

@Tayomide

Description

@Tayomide

What happened?

TextEmbedding(
  model_name=text_model_name,
  specific_model_path="/specific/local/url",
  cache_dir = "/cache"
)

creates the cache directory but does not create the snapshots, blobs, and refs that are usually present when downloading from hugging face

My current /specific/local/url/ contains these files: config.json, model.onnx, model_optimized.onnx, special_tokens_map.json, tokenizer.json, tokenizer_config.json

Could there be some missing files on my end that are needed for the cache logic to work?

What is the expected behaviour?

A cache directory with model file and other metadata that is interactive with fastembed's TextEmbedding API

A minimal reproducible example

from fastembed import TextEmbedding

emb = TextEmbedding(
  model_name=text_model_name,
  specific_model_path="/specific/local/url",
  cache_dir = "/cache"
)

What Python version are you on? e.g. python --version

Python 3.11.9

FastEmbed version

v0.6.0

What os are you seeing the problem on?

Linux

Relevant stack traces and/or logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions