Platforms to show: All Mac Windows Linux Cross-Platform

LlamaModelMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Llama MBS Tools Plugin 25.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The class for a llama model.

Metadata Key Names

Constant Value Description
MetaKeySamplingMinP 3 Sets a minimum probability threshold relative to the most likely token.
Tokens with probability lower than min_p * max_probability are excluded, filtering out extremely unlikely choices.
MetaKeySamplingMirostat 9 Enables Mirostat adaptive sampling, which dynamically adjusts randomness to maintain a target entropy level.
Useful for keeping generation coherent while avoiding collapse or runaway randomness.
MetaKeySamplingMirostatEta 11 Controls the learning rate (η) for Mirostat’s entropy adjustment.
Higher values react faster to entropy changes but may cause instability.
MetaKeySamplingMirostatTau 10 Sets the target entropy (τ) for Mirostat sampling.
Lower values aim for more focused text; higher values allow more creative variation.
MetaKeySamplingPenaltyLastN 7 Specifies the number of recent tokens to consider when applying repetition penalties.
Only tokens within this sliding window are penalized.
MetaKeySamplingPenaltyRepeat 8 Defines the strength of the repetition penalty applied to previously generated tokens.
Higher values more aggressively discourage repeated words or phrases.
MetaKeySamplingSequence 0 Defines the order in which sampling strategies are applied when generating tokens (e.g., top-k → top-p → temperature).
This allows fine-grained control over how multiple sampling filters are composed.
MetaKeySamplingTemp 6 Applies temperature scaling to logits before sampling.
Values < 1.0 make outputs more deterministic; values > 1.0 increase randomness.
MetaKeySamplingTopK 1 Limits token selection to the K most probable tokens at each step.
Lower values reduce randomness and increase determinism; higher values allow more diverse outputs.
MetaKeySamplingTopP 2 Enables nucleus sampling, where tokens are selected from the smallest set whose cumulative probability is ≥ P.
This dynamically adapts the candidate set size based on confidence.
MetaKeySamplingXtcProbability 4 Controls the probability of applying XTC (eXtended Token Control) sampling during generation.
Used to intermittently introduce stronger randomness or exploration behavior.
MetaKeySamplingXtcThreshold 5 Defines the entropy or confidence threshold at which XTC sampling activates.
XTC is only applied when the token distribution meets this threshold condition.

Rope Type

Constant Value Description
RopeTypeMrope 8 Modified RoPE used for supporting longer context lengths (like in LLaMA 2 64k or LLaMA 3).
RopeTypeNeox 2 GPT-NeoX style RoPE, which can differ in frequency base or application.
RopeTypeNone -1 Indicates that no RoPE is applied or is unsupported. Often used as a default or error state.
RopeTypeNorm 0 The standard Rotary Positional Embedding (used in original LLaMA models).
RopeTypeVision 24 RoPE adapted for vision models (e.g., LLaVA or CLIP-like models).

This class has no sub classes.

Blog Entries

Xojo Developer Magazine

Release notes

  • Version 26.1
    • Added embd_out and embd_inp to LlamaModelMBS class.
    • Added MetaKeyName function and related constants to LlamaModelMBS class.

Some methods using this class:

Some properties using for this class:

Some related classes:


The items on this page are in the following plugins: MBS Tools Plugin.


LlamaExceptionMBS   -   LlamaModelParametersMBS


The biggest plugin in space...