Retrieval Program

Program Identification

Synopsis

mbase_retrieval model_path *[option [value]]
mbase_retrieval model.gguf -q 'What is MBASE' -pf file1.txt -pf file2.txt -gl 80

Description

An example for calculating the distance between the given query and multiple text files our documents in this context and applying retrieval operation on multiple texts seperated by <embd_sep>.

What this program does is that it takes a query from the user and creates the embeddings of the user input and all other texts. After the embeddings are generated, it applies the cosine similarity function to all embeddings and shows the distance of the query to each text.

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=’’). To give multiple prompt files, call this option multiple times.

-q string, --query string

User provided query.

-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)