Skip to content

attempt of creating with ruster a llama.cpp binding using llama_cpp-rs rust library

Notifications You must be signed in to change notification settings

elchemista/llama_binding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LlamaBinding

Start

mix deps.get && iex -S mix

Once rust lib compiled, you can start using llama_binding

Using llama_binding

Testing with llama3.2:1B model (./llm_models)

{:ok, model} = LlamaBinding.load_model("./llm_models/path_to_model.gguf")

Once it loaded you can use it:

{:ok, session} = LLama.create_session(model)

LLama.set_context(session, "This is the story of a man named Stanley.")

output = LLama.complete(session, 1024)

IO.puts(output)

I wanted to get in output Elixir Stream so i can stream directly to liveview.

About

attempt of creating with ruster a llama.cpp binding using llama_cpp-rs rust library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published