Module: Candle::EmbeddingModelType

Defined in:
lib/candle/embedding_model_type.rb

Overview

Enum for the supported embedding model types

Constant Summary collapse

JINA_BERT =

Jina Bert embedding models (e.g., jina-embeddings-v2-base-en)

"jina_bert"
STANDARD_BERT =

Standard BERT embedding models (e.g., bert-base-uncased)

"standard_bert"
MINILM =

MiniLM embedding models (e.g., all-MiniLM-L6-v2)

"minilm"
DISTILBERT =

DistilBERT models which can be used for embeddings

"distilbert"

Class Method Summary collapse

Class Method Details

.allObject

Returns a list of all supported model types



17
18
19
# File 'lib/candle/embedding_model_type.rb', line 17

def self.all
  [JINA_BERT, STANDARD_BERT, DISTILBERT, MINILM]
end

.suggested_model_pathsObject

Returns suggested model paths for each model type



22
23
24
25
26
27
28
29
# File 'lib/candle/embedding_model_type.rb', line 22

def self.suggested_model_paths
  {
    JINA_BERT => "jinaai/jina-embeddings-v2-base-en",
    STANDARD_BERT => "scientistcom/BiomedNLP-BiomedBERT-base-uncased-abstract-fulltext",
    MINILM => "sentence-transformers/all-MiniLM-L6-v2",
    DISTILBERT => "scientistcom/distilbert-base-uncased-finetuned-sst-2-english",
  }
end