Safe Haskell | None |
---|---|
Language | Haskell2010 |
Llama.Internal.Foreign.KVCache
Synopsis
- c_llama_kv_cache_view_init_into :: CLlamaContext -> CInt -> Ptr LlamaKvCacheView -> IO ()
- c_llama_kv_cache_view_free :: Ptr LlamaKvCacheView -> IO ()
- c_llama_kv_cache_view_update :: CLlamaContext -> Ptr LlamaKvCacheView -> IO ()
- c_llama_kv_self_n_tokens :: CLlamaContext -> IO CInt
- c_llama_kv_self_used_cells :: CLlamaContext -> IO CInt
- c_llama_kv_self_clear :: CLlamaContext -> IO ()
- c_llama_kv_self_seq_rm :: CLlamaContext -> LlamaSeqId -> LlamaPos -> LlamaPos -> IO CBool
- c_llama_kv_self_seq_cp :: CLlamaContext -> LlamaSeqId -> LlamaSeqId -> LlamaPos -> LlamaPos -> IO ()
- c_llama_kv_self_seq_keep :: CLlamaContext -> LlamaSeqId -> IO ()
- c_llama_kv_self_seq_add :: CLlamaContext -> LlamaSeqId -> LlamaPos -> LlamaPos -> LlamaPos -> IO ()
- c_llama_kv_self_seq_div :: CLlamaContext -> LlamaSeqId -> LlamaPos -> LlamaPos -> CInt -> IO ()
- c_llama_kv_self_seq_pos_max :: CLlamaContext -> LlamaSeqId -> IO LlamaPos
- c_llama_kv_self_defrag :: CLlamaContext -> IO ()
- c_llama_kv_self_can_shift :: Ptr CLlamaContext -> IO CBool
- c_llama_kv_self_update :: CLlamaContext -> IO ()
Documentation
c_llama_kv_cache_view_init_into :: CLlamaContext -> CInt -> Ptr LlamaKvCacheView -> IO () Source #
LLAMA_API struct llama_kv_cache_view llama_kv_cache_view_init(const struct llama_context * ctx, int32_t n_seq_max);
c_llama_kv_cache_view_free :: Ptr LlamaKvCacheView -> IO () Source #
LLAMA_API void llama_kv_cache_view_free(struct llama_kv_cache_view * view);
c_llama_kv_cache_view_update :: CLlamaContext -> Ptr LlamaKvCacheView -> IO () Source #
LLAMA_API void llama_kv_cache_view_update(const struct llama_context * ctx, struct llama_kv_cache_view * view);
c_llama_kv_self_n_tokens :: CLlamaContext -> IO CInt Source #
LLAMA_API int32_t llama_kv_self_n_tokens(const struct llama_context * ctx);
c_llama_kv_self_used_cells :: CLlamaContext -> IO CInt Source #
LLAMA_API int32_t llama_kv_self_used_cells(const struct llama_context * ctx);
c_llama_kv_self_clear :: CLlamaContext -> IO () Source #
LLAMA_API void llama_kv_self_clear(struct llama_context * ctx);
c_llama_kv_self_seq_rm :: CLlamaContext -> LlamaSeqId -> LlamaPos -> LlamaPos -> IO CBool Source #
LLAMA_API bool llama_kv_self_seq_rm( | struct llama_context * ctx, llama_seq_id seq_id, llama_pos p0, llama_pos p1);
c_llama_kv_self_seq_cp :: CLlamaContext -> LlamaSeqId -> LlamaSeqId -> LlamaPos -> LlamaPos -> IO () Source #
LLAMA_API void llama_kv_self_seq_cp( | struct llama_context * ctx, llama_seq_id seq_id_src, llama_seq_id seq_id_dst, llama_pos p0, llama_pos p1);
c_llama_kv_self_seq_keep :: CLlamaContext -> LlamaSeqId -> IO () Source #
LLAMA_API void llama_kv_self_seq_keep(struct llama_context * ctx, llama_seq_id seq_id);
c_llama_kv_self_seq_add :: CLlamaContext -> LlamaSeqId -> LlamaPos -> LlamaPos -> LlamaPos -> IO () Source #
LLAMA_API void llama_kv_self_seq_add( | struct llama_context * ctx, llama_seq_id seq_id, llama_pos p0, llama_pos p1, llama_pos delta);
c_llama_kv_self_seq_div :: CLlamaContext -> LlamaSeqId -> LlamaPos -> LlamaPos -> CInt -> IO () Source #
LLAMA_API void llama_kv_self_seq_div( | struct llama_context * ctx, llama_seq_id seq_id, llama_pos p0, llama_pos p1, int d);
c_llama_kv_self_seq_pos_max :: CLlamaContext -> LlamaSeqId -> IO LlamaPos Source #
LLAMA_API llama_pos llama_kv_self_seq_pos_max(struct llama_context * ctx, llama_seq_id seq_id);
c_llama_kv_self_defrag :: CLlamaContext -> IO () Source #
LLAMA_API void llama_kv_self_defrag(struct llama_context * ctx);
c_llama_kv_self_can_shift :: Ptr CLlamaContext -> IO CBool Source #
LLAMA_API bool llama_kv_self_can_shift(const struct llama_context * ctx);
c_llama_kv_self_update :: CLlamaContext -> IO () Source #
LLAMA_API void llama_kv_self_update(struct llama_context * ctx);