ExLLama.Nif (LLama CPP Nif Wrapper v0.2.1)

Copy Markdown

C NIF bindings for llama.cpp — bridges old API names to new C NIF functions and wraps raw references in the expected structs.

Summary

Functions

chat_apply_template(model, messages)

chat_apply_template(model, messages, add_gen)

completion(ctx, prompt)

completion(ctx, prompt, opts)

context_deep_copy(ctx)

create_context(model)

create_context(model, opts)

detokenize(model, tokens)

embeddings(ctx, text)

load_model(path)

load_model(path, opts)

load_nif()

model_info(model)

streaming_completion(ctx, prompt, pid)

streaming_completion(ctx, prompt, pid, opts)

token_to_piece(model, token)

tokenize(model, text)

tokenize(model, text, add_special)

vocab_bos(model)

vocab_eos(model)

vocab_eot(model)

vocab_fim_mid(model)

vocab_fim_pre(model)

vocab_fim_suf(model)

vocab_nl(model)