# IContextParams Namespace: LLama.Abstractions The parameters for initializing a LLama context from a model. ```csharp public interface IContextParams ``` ## Properties ### **ContextSize** Model context size (n_ctx) ```csharp public abstract Nullable ContextSize { get; } ``` #### Property Value [Nullable<UInt32>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **BatchSize** batch size for prompt processing (must be >=32 to use BLAS) (n_batch) ```csharp public abstract uint BatchSize { get; } ``` #### Property Value [UInt32](https://docs.microsoft.com/en-us/dotnet/api/system.uint32)
### **Seed** Seed for the random number generator (seed) ```csharp public abstract uint Seed { get; } ``` #### Property Value [UInt32](https://docs.microsoft.com/en-us/dotnet/api/system.uint32)
### **EmbeddingMode** Whether to use embedding mode. (embedding) Note that if this is set to true, The LLamaModel won't produce text response anymore. ```csharp public abstract bool EmbeddingMode { get; } ``` #### Property Value [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
### **RopeFrequencyBase** RoPE base frequency (null to fetch from the model) ```csharp public abstract Nullable RopeFrequencyBase { get; } ``` #### Property Value [Nullable<Single>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **RopeFrequencyScale** RoPE frequency scaling factor (null to fetch from the model) ```csharp public abstract Nullable RopeFrequencyScale { get; } ``` #### Property Value [Nullable<Single>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **Encoding** The encoding to use for models ```csharp public abstract Encoding Encoding { get; } ``` #### Property Value [Encoding](https://docs.microsoft.com/en-us/dotnet/api/system.text.encoding)
### **Threads** Number of threads (null = autodetect) (n_threads) ```csharp public abstract Nullable Threads { get; } ``` #### Property Value [Nullable<UInt32>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **BatchThreads** Number of threads to use for batch processing (null = autodetect) (n_threads) ```csharp public abstract Nullable BatchThreads { get; } ``` #### Property Value [Nullable<UInt32>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **YarnExtrapolationFactor** YaRN extrapolation mix factor (null = from model) ```csharp public abstract Nullable YarnExtrapolationFactor { get; } ``` #### Property Value [Nullable<Single>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **YarnAttentionFactor** YaRN magnitude scaling factor (null = from model) ```csharp public abstract Nullable YarnAttentionFactor { get; } ``` #### Property Value [Nullable<Single>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **YarnBetaFast** YaRN low correction dim (null = from model) ```csharp public abstract Nullable YarnBetaFast { get; } ``` #### Property Value [Nullable<Single>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **YarnBetaSlow** YaRN high correction dim (null = from model) ```csharp public abstract Nullable YarnBetaSlow { get; } ``` #### Property Value [Nullable<Single>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **YarnOriginalContext** YaRN original context length (null = from model) ```csharp public abstract Nullable YarnOriginalContext { get; } ``` #### Property Value [Nullable<UInt32>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **YarnScalingType** YaRN scaling method to use. ```csharp public abstract Nullable YarnScalingType { get; } ``` #### Property Value [Nullable<RopeScalingType>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **TypeK** Override the type of the K cache ```csharp public abstract Nullable TypeK { get; } ``` #### Property Value [Nullable<GGMLType>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **TypeV** Override the type of the V cache ```csharp public abstract Nullable TypeV { get; } ``` #### Property Value [Nullable<GGMLType>](https://docs.microsoft.com/en-us/dotnet/api/system.nullable-1)
### **NoKqvOffload** Whether to disable offloading the KQV cache to the GPU ```csharp public abstract bool NoKqvOffload { get; } ``` #### Property Value [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
### **DefragThreshold** defragment the KV cache if holes/size > defrag_threshold, Set to < 0 to disable (default) ```csharp public abstract float DefragThreshold { get; } ``` #### Property Value [Single](https://docs.microsoft.com/en-us/dotnet/api/system.single)
### **DoPooling** Whether to pool (sum) embedding results by sequence id (ignored if no pooling layer) ```csharp public abstract bool DoPooling { get; } ``` #### Property Value [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)