llama-cpp-hs
Safe HaskellNone
LanguageHaskell2010

Llama.Internal.Foreign.Decode

Synopsis

Documentation

c_llama_batch_get_one_into :: Ptr LlamaToken -> CInt -> Ptr LlamaBatch -> IO () Source #

LLAMA_API struct llama_batch llama_batch_get_one(llama_token * tokens, int32_t n_tokens);

c_llama_batch_init_into :: CInt -> CInt -> CInt -> Ptr LlamaBatch -> IO () Source #

LLAMA_API struct llama_batch llama_batch_init(int32_t n_tokens, int32_t embd, int32_t n_seq_max);

c_llama_batch_free_wrap :: Ptr LlamaBatch -> IO () Source #

LLAMA_API void llama_batch_free(struct llama_batch batch);

c_llama_encode :: CLlamaContext -> Ptr LlamaBatch -> IO CInt Source #

LLAMA_API int32_t llama_encode(struct llama_context * ctx, struct llama_batch batch);

c_llama_decode_wrap :: CLlamaContext -> Ptr LlamaBatch -> IO CInt Source #

LLAMA_API int32_t llama_decode(struct llama_context * ctx, struct llama_batch batch);

c_llama_set_n_threads :: CLlamaContext -> CInt -> CInt -> IO () Source #

LLAMA_API void llama_set_n_threads(struct llama_context * ctx, int32_t n_threads, int32_t n_threads_batch);

c_llama_n_threads :: CLlamaContext -> IO CInt Source #

LLAMA_API int32_t llama_n_threads(struct llama_context * ctx);

c_llama_n_threads_batch :: CLlamaContext -> IO CInt Source #

LLAMA_API int32_t llama_n_threads_batch(struct llama_context * ctx);

c_llama_set_embeddings :: CLlamaContext -> CBool -> IO () Source #

LLAMA_API void llama_set_embeddings(struct llama_context * ctx, CBool embeddings);

c_llama_set_causal_attn :: CLlamaContext -> CBool -> IO () Source #

LLAMA_API void llama_set_causal_attn(struct llama_context * ctx, CBool causal_attn);

c_llama_set_warmup :: CLlamaContext -> CBool -> IO () Source #

LLAMA_API void llama_set_warmup(struct llama_context * ctx, CBool warmup);

c_llama_set_abort_callback :: CLlamaContext -> FunPtr (Ptr () -> IO CInt) -> Ptr () -> IO () Source #

LLAMA_API void llama_set_abort_callback(struct llama_context * ctx, ggml_abort_callback abort_callback, void * abort_callback_data);

c_llama_synchronize :: CLlamaContext -> IO () Source #

LLAMA_API void llama_synchronize(struct llama_context * ctx);

c_llama_get_logits :: CLlamaContext -> IO (Ptr CFloat) Source #

LLAMA_API float * llama_get_logits(struct llama_context * ctx);

c_llama_get_logits_ith :: CLlamaContext -> CInt -> IO (Ptr CFloat) Source #

LLAMA_API float * llama_get_logits_ith(struct llama_context * ctx, int32_t i);

c_llama_get_embeddings :: CLlamaContext -> IO (Ptr CFloat) Source #

LLAMA_API float * llama_get_embeddings(struct llama_context * ctx);

c_llama_get_embeddings_ith :: CLlamaContext -> CInt -> IO (Ptr CFloat) Source #

LLAMA_API float * llama_get_embeddings_ith(struct llama_context * ctx, int32_t i);

c_llama_get_embeddings_seq :: CLlamaContext -> LlamaSeqId -> IO (Ptr CFloat) Source #

LLAMA_API float * llama_get_embeddings_seq(struct llama_context * ctx, llama_seq_id seq_id);