Babashka scripts for experimenting with ::M completions. Intended to be used with llama-server from llama.cpp.
- babashka (bb command)
- golang (go command)
- llama-server from llama.cpp
Go to Hugging Face and find a gguf model you have enough "compute" to run, and run it something like this:
./build/bin/llama-server -m ~/models/Qwen3-14B-UD-Q5_K_XL.gguf -c 28000 --port 8080 --host 127.0.0.1Copy the example config and point it at your server:
cp resources/config.edn.example resources/config.ednUses the qwen3 chat template to produce an example
go run go/generate_chat.goTokenizes a string and prints the token IDs.
./tokenize.bb "Hello, world!"
# tokens: [9906 11 1917 0]Runs a completion against the server.
./complete.bb "Once upon a time"Options:
| Flag | Description |
|---|---|
-n N / --max-tokens N |
Maximum tokens to generate (default: 30) |
-c / --char-tokens |
Tokenize the prompt character-by-character before sending |
-h / --help |
Show help |