VOOZH about

URL: https://deepwiki.com/SciSharp/LLamaSharp/10-glossary

⇱ Glossary | SciSharp/LLamaSharp | DeepWiki


Loading...
Last indexed: 18 May 2026 (ecd184)
Menu

Glossary

This page defines codebase-specific terms, jargon, and domain concepts used throughout LLamaSharp. It serves as a technical reference for onboarding engineers to bridge the gap between high-level LLM concepts and their specific implementations in the LLamaSharp repository.

Core System Entities

The following diagram illustrates the relationship between managed C# classes and their underlying native llama.cpp counterparts.

Entity Mapping: Managed to Native Space


Sources: LLama/LLamaWeights.cs11-20 LLama/LLamaContext.cs18-42 LLama/Native/SafeLLamaContextHandle.cs13-15 LLama/Native/SafeLlamaModelHandle.cs15-17

1. Model & Context Terms

TermDefinitionCode Pointer
WeightsThe read-only parameters of the neural network loaded from a GGUF file. Represented by LLamaWeights.LLama/LLamaWeights.cs11-13
ContextA stateful environment created from weights that holds the KV cache and allows for inference.LLama/LLamaContext.cs18-20
KV CacheKey-Value cache stored within the native context to avoid re-computing hidden states for previous tokens.LLama/LLamaContext.cs220-230
GGUFThe binary file format used for distributing LLM models compatible with llama.cpp.LLama/Native/SafeLlamaModelHandle.cs179-181
SafeHandleA .NET mechanism for wrapping native pointers (IntPtr) to ensure deterministic resource cleanup and prevent leaks.LLama/Native/SafeLLamaContextHandle.cs13-15
RoPERotary Positional Embedding; the positional encoding type used by the model.LLama/Native/SafeLlamaModelHandle.cs19-21

2. Execution & Inference Terms

Data Flow: Inference Request to Native Execution


Sources: LLama/LLamaContext.cs107-110 LLama/Native/SafeLLamaContextHandle.cs167-180 LLama.Examples/Examples/BatchedExecutorBoolQ.cs100

TermDefinitionCode Pointer
ExecutorHigh-level abstraction that manages the interaction loop between user input and model output.LLama/Abstractions/ILLamaExecutor.cs10-12
SamplingThe process of selecting the next token from the probability distribution (logits) produced by the model.LLama/Sampling/ISamplingPipeline.cs8-10
StatelessExecutorAn executor that performs one-time inference without maintaining conversation history between calls.LLama/LLamaStatelessExecutor.cs19-21
StatefulExecutorBase class for executors (Interactive, Instruct) that maintain and persist session state and KV cache.LLama/LLamaExecutorBase.cs20-21
AntipromptA string sequence that, when detected in the model output, triggers a stop in generation.LLama/LLamaExecutorBase.cs70

3. Native Interop Jargon

Framework Integrations

LLamaSharp acts as a bridge for several .NET AI ecosystems:

Technical Abbreviations


Sources: