Skip to content

LLamaModel

Namespace: LLama

1
public class LLamaModel : IChatModel

Inheritance ObjectLLamaModel
Implements IChatModel

Properties

Name

1
public string Name { get; set; }

Property Value

String

NativeHandle

1
public SafeLLamaContextHandle NativeHandle { get; }

Property Value

SafeLLamaContextHandle

Constructors

LLamaModel(String, String, Boolean, Boolean, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Dictionary<Int32, Single>, Int32, Single, Single, Single, Single, Single, Int32, Single, Single, Int32, Single, Single, String, String, String, String, List<String>, String, String, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)

1
public LLamaModel(string model_path, string model_name, bool echo_input, bool verbose, int seed, int n_threads, int n_predict, int n_parts, int n_ctx, int n_batch, int n_keep, Dictionary<int, float> logit_bias, int top_k, float top_p, float tfs_z, float typical_p, float temp, float repeat_penalty, int repeat_last_n, float frequency_penalty, float presence_penalty, int mirostat, float mirostat_tau, float mirostat_eta, string prompt, string path_session, string input_prefix, string input_suffix, List<string> antiprompt, string lora_adapter, string lora_base, bool memory_f16, bool random_prompt, bool use_color, bool interactive, bool embedding, bool interactive_first, bool instruct, bool penalize_nl, bool perplexity, bool use_mmap, bool use_mlock, bool mem_test, bool verbose_prompt)

Parameters

model_path String

model_name String

echo_input Boolean

verbose Boolean

seed Int32

n_threads Int32

n_predict Int32

n_parts Int32

n_ctx Int32

n_batch Int32

n_keep Int32

logit_bias Dictionary<Int32, Single>

top_k Int32

top_p Single

tfs_z Single

typical_p Single

temp Single

repeat_penalty Single

repeat_last_n Int32

frequency_penalty Single

presence_penalty Single

mirostat Int32

mirostat_tau Single

mirostat_eta Single

prompt String

path_session String

input_prefix String

input_suffix String

antiprompt List<String>

lora_adapter String

lora_base String

memory_f16 Boolean

random_prompt Boolean

use_color Boolean

interactive Boolean

embedding Boolean

interactive_first Boolean

instruct Boolean

penalize_nl Boolean

perplexity Boolean

use_mmap Boolean

use_mlock Boolean

mem_test Boolean

verbose_prompt Boolean

LLamaModel(LLamaParams, String, Boolean, Boolean)

1
public LLamaModel(LLamaParams params, string name, bool echo_input, bool verbose)

Parameters

params LLamaParams

name String

echo_input Boolean

verbose Boolean

Methods

WithPrompt(String)

1
public LLamaModel WithPrompt(string prompt)

Parameters

prompt String

Returns

LLamaModel

WithPromptFile(String)

1
public LLamaModel WithPromptFile(string promptFileName)

Parameters

promptFileName String

Returns

LLamaModel

InitChatPrompt(String)

1
public void InitChatPrompt(string prompt)

Parameters

prompt String

InitChatAntiprompt(String[])

1
public void InitChatAntiprompt(String[] antiprompt)

Parameters

antiprompt String[]

Chat(String, String)

1
public IEnumerable<string> Chat(string text, string prompt)

Parameters

text String

prompt String

Returns

IEnumerable<String>

Call(String)

1
public IEnumerable<string> Call(string text)

Parameters

text String

Returns

IEnumerable<String>