using System.Text;
using LLama.Native;
namespace LLama.Abstractions;
///
/// The parameters for initializing a LLama context from a model.
///
public interface IContextParams
{
///
/// Model context size (n_ctx)
///
uint? ContextSize { get; }
///
/// maximum batch size that can be submitted at once (must be >=32 to use BLAS) (n_batch)
///
uint BatchSize { get; }
///
/// Physical batch size
///
uint UBatchSize { get; }
///
/// max number of sequences (i.e. distinct states for recurrent models)
///
uint SeqMax { get; }
///
/// Seed for the random number generator (seed)
///
uint Seed { get; }
///
/// If true, extract embeddings (together with logits).
///
bool Embeddings { get; }
///
/// RoPE base frequency (null to fetch from the model)
///
float? RopeFrequencyBase { get; }
///
/// RoPE frequency scaling factor (null to fetch from the model)
///
float? RopeFrequencyScale { get; }
///
/// The encoding to use for models
///
Encoding Encoding { get; }
///
/// Number of threads (null = autodetect) (n_threads)
///
uint? Threads { get; }
///
/// Number of threads to use for batch processing (null = autodetect) (n_threads)
///
uint? BatchThreads { get; }
///
/// YaRN extrapolation mix factor (null = from model)
///
float? YarnExtrapolationFactor { get; }
///
/// YaRN magnitude scaling factor (null = from model)
///
float? YarnAttentionFactor { get; }
///
/// YaRN low correction dim (null = from model)
///
float? YarnBetaFast { get; }
///
/// YaRN high correction dim (null = from model)
///
float? YarnBetaSlow { get; }
///
/// YaRN original context length (null = from model)
///
uint? YarnOriginalContext { get; }
///
/// YaRN scaling method to use.
///
RopeScalingType? YarnScalingType { get; }
///
/// Override the type of the K cache
///
GGMLType? TypeK { get; }
///
/// Override the type of the V cache
///
GGMLType? TypeV { get; }
///
/// Whether to disable offloading the KQV cache to the GPU
///
bool NoKqvOffload { get; }
///
/// defragment the KV cache if holes/size > defrag_threshold, Set to < 0 to disable (default)
///
float DefragThreshold { get; }
///
/// How to pool (sum) embedding results by sequence id (ignored if no pooling layer)
///
LLamaPoolingType PoolingType { get; }
}