Apply a loaded control vector to a llama_context, or if data is NULL, clear the currently loaded vector. n_embd should be the size of a single layer's control, and data should point to an n_embd x n_layers buffer starting from layer 1. il_start and il_end are the layer range the vect
(
ctx: llama_context_p,
data: CtypesPointerOrRef[ctypes.c_float],
len: int,
n_embd: int,
il_start: int,
il_end: int,
/,
)
| 2225 | ctypes.c_int32, |
| 2226 | ) |
| 2227 | def llama_set_adapter_cvec( |
| 2228 | ctx: llama_context_p, |
| 2229 | data: CtypesPointerOrRef[ctypes.c_float], |
| 2230 | len: int, |
| 2231 | n_embd: int, |
| 2232 | il_start: int, |
| 2233 | il_end: int, |
| 2234 | /, |
| 2235 | ) -> int: |
| 2236 | """Apply a loaded control vector to a llama_context, or if data is NULL, clear |
| 2237 | the currently loaded vector. |
| 2238 | n_embd should be the size of a single layer's control, and data should point |
| 2239 | to an n_embd x n_layers buffer starting from layer 1. |
| 2240 | il_start and il_end are the layer range the vector should apply to (both inclusive) |
| 2241 | See llama_control_vector_load in common to load a control vector.""" |
| 2242 | ... |
| 2243 | |
| 2244 | |
| 2245 | # Deprecated compatibility wrapper for the renamed llama_set_adapter_cvec(). |
no outgoing calls
no test coverage detected
searching dependent graphs…