Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/llama/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ var FFITypeContextParams = ffi.NewType(
&ffi.TypePointer, &ffi.TypePointer,
&ffi.TypeUint8, &ffi.TypeUint8,
&ffi.TypeUint8, &ffi.TypeUint8,
&ffi.TypeUint8, &ffi.TypeUint8)
&ffi.TypeUint8, &ffi.TypeUint8,
&ffi.TypeUint32, &ffi.TypeSint32)

var (
// LLAMA_API struct llama_context_params llama_context_default_params(void);
Expand Down
5 changes: 5 additions & 0 deletions pkg/llama/llama.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ type ContextParams struct {
OpOffload uint8 // offload host tensor operations to device
SwaFull uint8 // use full-size SWA cache (https://github.com/ggml-org/llama.cpp/pull/13194#issuecomment-2868343055)
KVUnified uint8 // use a unified buffer across the input sequences when computing the attentions
// [EXPERIMENTAL]
// backend sampler chain configuration (make sure the caller keeps the sampler chains alive)
// note: the samplers must be sampler chains (i.e. use llama_sampler_chain_init)
Samplers uintptr // llama_sampler_seq_config *
NSamplers uint32 // number of sampler chains
}

// Model quantize parameters
Expand Down