llama-cpp-hs
Safe HaskellNone
LanguageHaskell2010

Llama.Internal.Foreign.Model

Synopsis

Documentation

p_llama_free :: FinalizerPtr CLlamaContext Source #

Foreign pointer to the C function for freeing the context.

p_llama_model_free :: FinalizerPtr CLlamaModel Source #

Foreign pointer to the C function for freeing the model.

c_llama_model_rope_type_into :: CLlamaModel -> Ptr CInt -> IO () Source #

Get RoPE type from model

c_llama_model_n_ctx_train :: CLlamaModel -> IO Int32 Source #

Get training context size

c_llama_model_n_embd :: CLlamaModel -> IO Int32 Source #

Get embedding dimension

c_llama_model_n_layer :: CLlamaModel -> IO Int32 Source #

Get number of layers

c_llama_model_n_head :: CLlamaModel -> IO Int32 Source #

Get number of heads

c_llama_model_n_head_kv :: CLlamaModel -> IO Int32 Source #

Get number of key/value heads

c_llama_model_meta_val_str :: CLlamaModel -> CString -> CString -> CSize -> IO CInt Source #

LLAMA_API int32_t llama_model_meta_val_str(const struct llama_model * model, const char * key, char * buf, size_t buf_size);

c_llama_model_meta_count :: CLlamaModel -> IO CInt Source #

LLAMA_API int32_t llama_model_meta_count(const struct llama_model * model);

c_llama_model_meta_key_by_index :: CLlamaModel -> CInt -> CString -> CSize -> IO CInt Source #

LLAMA_API int32_t llama_model_meta_key_by_index(const struct llama_model * model, int32_t i, char * buf, size_t buf_size);

c_llama_model_meta_val_str_by_index :: CLlamaModel -> CInt -> CString -> CSize -> IO CInt Source #

LLAMA_API int32_t llama_model_meta_val_str_by_index(const struct llama_model * model, int32_t i, char * buf, size_t buf_size);

c_llama_model_desc :: CLlamaModel -> CString -> CSize -> IO CInt Source #

LLAMA_API int32_t llama_model_desc(const struct llama_model * model, char * buf, size_t buf_size);

c_llama_model_size :: CLlamaModel -> IO Word64 Source #

LLAMA_API uint64_t llama_model_size(const struct llama_model * model);

c_llama_model_chat_template :: CLlamaModel -> CString -> IO CString Source #

LLAMA_API const char * llama_model_chat_template(const struct llama_model * model, const char * name);

c_llama_model_n_params :: CLlamaModel -> IO Word64 Source #

LLAMA_API uint64_t llama_model_n_params(const struct llama_model * model);

c_llama_model_has_encoder :: CLlamaModel -> IO CBool Source #

LLAMA_API bool llama_model_has_encoder(const struct llama_model * model);

c_llama_model_has_decoder :: CLlamaModel -> IO CBool Source #

LLAMA_API bool llama_model_has_decoder(const struct llama_model * model);

c_llama_model_decoder_start_token :: CLlamaModel -> IO LlamaToken Source #

LLAMA_API llama_token llama_model_decoder_start_token(const struct llama_model * model);

c_llama_model_is_recurrent :: CLlamaModel -> IO CBool Source #

LLAMA_API bool llama_model_is_recurrent(const struct llama_model * model);

c_llama_model_quantize :: CString -> CString -> CLlamaModelQuantizeParams -> IO Word32 Source #

LLAMA_API uint32_t llama_model_quantize( const char * fname_inp, const char * fname_out, const llama_model_quantize_params * params);