Llama.Backends
--------------

Queries the backends available.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Llama](component_Llama.md) | [16.1](newinversion161.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Llama.Backends" ) ### Parameters

none

### Result

Returns JSON or error.

### Description

Queries the backends available.  
This queries the list of backends as a JSON.  
Each backend has a list of devices with properties.  
We also query features if available.  
### Examples

Query on macOS:

 MBS ( "Llama.Backends" )  
<small>  
Example result:   
\[ { "name" : "Metal" , "deviceCount" : 1 , "devices" : \[ { "name" : "Metal" , "description" : "Apple M3 Max" , "deviceId" : null, "memoryFree" : 34648129536 , "memoryTotal" : 51539607552 , "type" : "GPU" } \], "features" : { "EMBED\_LIBRARY" : "1" } }, { "name" : "BLAS" , "deviceCount" : 1 , "devices" : \[ { "name" : "BLAS" , "description" : "Accelerate" , "deviceId" : null, "memoryFree" : 0 , "memoryTotal" : 0 , "type" : "ACCEL" } \] }, { "name" : "CPU" , "deviceCount" : 1 , "devices" : \[ { "name" : "CPU" , "description" : "Apple M3 Max" , "deviceId" : null, "memoryFree" : 68719476736 , "memoryTotal" : 68719476736 , "type" : "CPU" } \], "features" : { "NEON" : "1" , "ARM\_FMA" : "1" , "FP16\_VA" : "1" , "DOTPROD" : "1" , "LLAMAFILE" : "1" , "ACCELERATE" : "1" , "REPACK" : "1" } } \] </small>Query on Windows VM on macOS:

 MBS ( "Llama.Backends" )  
<small>  
Example result:   
\[ { "name" : "RPC" , "deviceCount" : 0 , "devices" : \[\] }, { "name" : "CPU" , "deviceCount" : 1 , "devices" : \[ { "name" : "CPU" , "description" : "Apple Silicon" , "deviceId" : null, "memoryFree" : 2440261632 , "memoryTotal" : 8583315456 , "type" : "CPU" } \], "features" : { "SSE3" : "1" , "SSSE3" : "1" , "LLAMAFILE" : "1" , "OPENMP" : "1" , "REPACK" : "1" } } \] </small>On Linux change folder, load libary, make new object and query backends:

 Set Variable \[ $r ; Value: MBS ( "[Process.SetCurrentDirectory](ProcessSetCurrentDirectory.md)"; "/test") \]  
Set Variable \[ $r ; Value: MBS ( "[Llama.LoadLibrary](LlamaLoadLibrary.md)"; "/test/libllama.so") \]  
Set Variable \[ $r ; Value: MBS ( "[Llama.New](LlamaNew.md)" ) \]  
Set Variable \[ $r ; Value: MBS ( "Llama.Backends" ) \]  
### See also

- [Llama.LoadLibrary](LlamaLoadLibrary.md)
- [Llama.New](LlamaNew.md)
- [Process.SetCurrentDirectory](ProcessSetCurrentDirectory.md)

### Example Databases

- [Llama chat](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Llama%20chat.shtml#14ScriptAnchor_)

This function is free to use.

Created 11st February 2026 , last changed 17th March 2026

  
[ListDialog.Sort](ListDialogSort.md) - [Llama.Chat](LlamaChat.md)

[HTML Version](LlamaBackends.shtml)