Skip to content

asimov-modules/asimov-llamacpp-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

ASIMOV Llamacpp Module

License Package on Crates.io Documentation

ASIMOV Llamacpp module.

✨ Features

  • To be determined!

πŸ› οΈ Prerequisites

  • Rust 1.85+ (2024 edition) if building from source code
  • You must have a running llama.cpp server with a loaded GGUF model

⬇️ Installation

Installation with ASIMOV CLI

asimov module install llamacpp -v

Installation from Source Code

cargo install asimov-llamacpp-module

πŸ‘‰ Examples

asimov-llamacpp-prompter

βš™ Configuration

Via ASIMOV CLI

asimov module config llamacpp

Via environment variables

export ASIMOV_LLAMACPP_API_ENDPOINT="http://127.0.0.1:8080"
export ASIMOV_LLAMACPP_MODEL="TinyLlama-1.1B-Chat-v1.0"

πŸ“š Reference

Prompt

echo "Why is the sky blue?" | asimov-llamacpp-prompter

πŸ§ͺ Simple GBNF example

  1. Create a tiny grammar that only allows ok:
# only_ok.gbnf
root ::= "ok" "\n"
  1. Run the prompter with the grammar:
echo "Say anything." | asimov-llamacpp-prompter -g only_ok.gbnf
# => ok

πŸ‘¨β€πŸ’» Development

git clone https://github.com/asimov-modules/asimov-llamacpp-module.git

Share on X Share on Reddit Share on Hacker News Share on Facebook Share on LinkedIn

About

🚧 ASIMOV module for local inference using the Llama.cpp runtime.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors