Skip to content
BornholmPublic

About

Small decision models in Go

Resources

Stars

62 stars

Watchers

1 watching

Forks

Latest commit

 

History

113 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

indecis

indecis builds small decision models in Go: a pretrained text encoder, fully fine-tuned on your examples, that answers typed questions with calibrated probabilities instead of generated text.

bin/indecis synth -templates examples/guide/templates -n 900 -out data.jsonl
bin/indecis train -backbone $BEKKO -schema examples/guide/schema.json -train data.jsonl -out model
echo "Mon colis n'est pas arrivé, je veux parler à quelqu'un." | bin/indecis predict -model model
{"answers": {"sujet": {"choice": "livraison", …}, "urgence": {"score": 2.0, …}, "humain": {"p": 1.0, …}}, …}

There are four question types: yes/no (noul), one option among several (choice), a level on an ordered scale (score), and typed passages of the text (spans), such as named entities. One pass of the model answers all of them.

In numbers

Measured on a laptop (Core Ultra 7 265U) with the bekko-embedding-v1-a8m backbone (7.7M parameters, multilingual):

  • 1.5 ms to judge a 15-token sentence, 23 ms for 256 tokens, on a single core;
  • 18 to 30 MB of memory for a model ready to serve, and a 58 to 290 MB file;
  • half an hour to train on 20,000 examples;
  • no GPU, no cgo, no dependency outside the Go standard library.

Documentation

Status

Experimental: the API may still change. Requires Go 1.27. The experimental SIMD support (GOEXPERIMENT=simd) makes it fast; indecis also runs without it. Linux binaries are attached to each release; indecis check tells whether a processor runs them at full speed. License: MIT.

About

Small decision models in Go

Resources

Stars

62 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages