erllama_model_stub (erllama v0.1.0)

View Source

Deterministic stub backend for erllama_model`. No NIF, no GGUF. tokenize uses `erlang:phash2/1` over whitespace- delimited words; decode_one produces a deterministic next-token from the contexts hash; pack/unpack serialise the token list as bytes. Useful for tests of the cache integration that don't need real inference.

Summary

Functions

applied_adapters(Stub)

apply_adapters(Stub, Adapters)

apply_chat_template(S, Request)

clear_sampler(Stub)

cleared(Stub)

configure_sampler(Stub, Cfg)

decode_one(S, ContextTokens)

detokenize(S, Tokens)

embed(S, Tokens)

init(Config)

kv_pack(S, Tokens)

kv_unpack(S, Bin)

last_sampler_cfg(Stub)

load_adapter(Stub, Path)

prefill(S, Tokens)

set_grammar(Stub, Grammar)

terminate(S)

tokenize(S, Text)

unload_adapter(Stub, Ref)