Embedding Program

Program Identification

Synopsis

mbase_embedding_simple model_path *[option [value]]
mbase_embedding_simple model.gguf -gl 80 -p 'What is life?'
mbase_embedding_simple model.gguf -gl 80 -pf prompt1.txt -pf prompt2.txt

Description

An example program for generating the embeddings of the given prompt or prompts. The given implementation is stable and shows the basics of how to generate embeddings using MBASE embedder processor InfEmbedderProcessor.

Options

-h, --help

Print program information.

-v, --version

Shows program version.

-pf file_path, --prompt-file file_path

File containing prompt or prompts seperated by the seperator (default=’’). If prompt is given, prompt file will be ignored.

-p string, --prompt string

Prompt or prompts seperated by the seperator (default=’’). This will be used even if the prompt file is supplied.

-sp seperator, --seperator seperator

Prompt seperator (default=”<embd_sep>”).

-t count, --thread-count count

Threads used to compute embeddings (default=16).

-gl count, --gpu-layers count

Number of layers too offload to GPU. Ignored if there is no GPU is present. (default=999)

-jout output_path, --json-output-path output_path

If the json output path is specified, result will be written there in file “openai_embeddings.json” (default=’’).