Platforms to show: All Mac Windows Linux Cross-Platform
Back to LlamaMBS module.
LlamaMBS.ApplyChatTemplate(Template as String, ChatMessages() as LlamaChatMessageMBS, AddAssistentTokens as boolean) as String
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 26.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Template: The Jinja template to use for this chat.
ChatMessages: a list of multiple llama_chat_message
AddAssistentTokens: Whether to end the prompt with the token(s) that indicate the start of an assistant message.
Returns the answer. May raise LlamaExceptionMBS class if the apply process fails.
Some examples using this method:
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 25.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If numa is true, use NUMA optimizations
Call once at the start of the program
LlamaMBS.BackendLoad(Path as String) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 26.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please pass DLL, dylib or so path.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 25.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Needs ggml library loaded.
Some examples using this method:
LlamaMBS.Backends as LlamaBackendMBS()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 26.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Each backend has a list of devices with properties.
Some examples using this method:
LlamaMBS.ChatBuiltInTemplates as String()
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 25.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 25.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LlamaMBS.LoadErrorMessage as String
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 25.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
LlamaMBS.LoadLibrary(File as FolderItem) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 25.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
For Windows you need llama.dll, for macOS you need llama.dylib and for Linux you need llama.so.
On Windows you need to load ggml.dll, ggml-base.dll and llama.dll to have all functions.
Returns true on success and false on failure.
See also:
LlamaMBS.LoadLibrary(Path as String) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 25.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
For Windows you need llama.dll, for macOS you need llama.dylib and for Linux you need llama.so.
On Windows you need to load ggml.dll, ggml-base.dll and llama.dll to have all functions.
Returns true on success and false on failure.
See also:
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 25.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 26.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Helps to debug console applications.
LlamaMBS.SetLogger(Logger as LlamaLogMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Llama | MBS Tools Plugin | 25.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If no logger is set, log messages go to stderr.
Some examples using this method:
The items on this page are in the following plugins: MBS Tools Plugin.