Versions in this module Expand all Collapse all v0 v0.9.0 Oct 31, 2026 v0.8.0 Oct 28, 2026 v0.7.0 Oct 22, 2026 v0.6.0 Oct 21, 2026 v0.5.0 Oct 18, 2026 Changes in this version type Model + func (m *Model) PruneMLP(ctx context.Context, texts []string, keep int) error + func (m *Model) SetTemperatures(temps map[string]float64) error type TrainOptions + Distill float64 + DistillHidden float64 + DistillTemp float64 + Teacher *Model v0.4.0 Oct 6, 2026 Changes in this version + const MaxSpanTypes type Answer + Spans []Span type Kind + const Spans type Metrics + F2 float64 + Types []SpanMetrics type Model + func (m *Model) SetSpanBias(question string, bias float64) type Option + func WithSpanBias(question string, bias float64) Option type Question + func NewSpans(name, instructions string, types ...string) Question + type Span struct + Confidence float64 + End int + Start int + Text string + Type string + type SpanMetrics struct + F1 float64 + F2 float64 + Found int + Gold int + Precision float64 + Recall float64 + Type string v0.3.0 Oct 1, 2026 Changes in this version type Question + func (q Question) Target(v any) (t []float64, ok bool, err error) v0.2.0 Sep 28, 2026 Changes in this version + type Hardware struct + AVX2FMA bool + AVXVNNI bool + Arch string + Assembly bool + SIMD bool + SIMDEmulated bool + VectorBits int + func DetectHardware() Hardware v0.1.0 Sep 28, 2026 Changes in this version + const DefaultEmbedScale + const NoulAnchor + func CandidateContext(c Candidate) string + func CandidatePairs(question, text string, correct Candidate, others []Candidate) []dataset.Example + type Answer struct + Choice string + Confidence float64 + Kind Kind + Margin float64 + P float64 + Probs map[string]float64 + Question string + Score float64 + type Candidate struct + Description string + Examples []string + Name string + type CandidateSet struct + func (s *CandidateSet) Candidates() []Candidate + type ChoiceBatch struct + Candidates []Candidate + Correct [][]int + Texts []string + func ChoiceBatches(examples []dataset.Example, questions []OpenQuestion, size int, seed int64) []ChoiceBatch + type Decision map[string]Answer + type Info struct + Backbone string + EmbedScale float64 + Steps int + TrainPrior map[string]float64 + type Input struct + Context string + Text string + type Kind string + const Choice + const Noul + const Score + type Metrics struct + AUC float64 + Accuracy float64 + Brier float64 + ECE float64 + F1 float64 + Kind Kind + MAE float64 + MacroF1 float64 + N int + NLL float64 + Precision float64 + Question string + Recall float64 + func (mt Metrics) String() string + type Model struct + func Load(dir string, opts ...Option) (*Model, error) + func New(backboneDir string, schema Schema, seed int64, opts ...Option) (*Model, error) + func Open(dir string, opts ...Option) (*Model, error) + func (m *Model) Calibrate(ctx context.Context, examples []dataset.Example) (map[string]float64, error) + func (m *Model) ChooseAmong(ctx context.Context, question string, candidates []Candidate, texts ...string) ([]Answer, error) + func (m *Model) ChooseIn(ctx context.Context, set *CandidateSet, texts ...string) ([]Answer, error) + func (m *Model) ChooseNearest(ctx context.Context, candidates []Candidate, texts ...string) ([]Answer, error) + func (m *Model) Decide(ctx context.Context, texts ...string) ([]Decision, error) + func (m *Model) DecideInputs(ctx context.Context, inputs ...Input) ([]Decision, error) + func (m *Model) DecideOpen(ctx context.Context, questions []OpenQuestion, texts ...string) ([]Decision, error) + func (m *Model) Embed(ctx context.Context, texts ...string) ([][]float32, error) + func (m *Model) Evaluate(ctx context.Context, examples []dataset.Example) ([]Metrics, error) + func (m *Model) Fit(ctx context.Context, examples []dataset.Example, opts TrainOptions) error + func (m *Model) FitEmbeddings(ctx context.Context, batches []ChoiceBatch, opts TrainOptions) error + func (m *Model) Info() Info + func (m *Model) Logits(ctx context.Context, texts ...string) ([]map[string][]float64, error) + func (m *Model) LogitsInputs(ctx context.Context, inputs ...Input) ([]map[string][]float64, error) + func (m *Model) Paired() bool + func (m *Model) PrepareCandidates(ctx context.Context, candidates []Candidate) (*CandidateSet, error) + func (m *Model) PruneVocabulary(corpus []Input, minCount int) (PruneStats, error) + func (m *Model) Save(dir string) error + func (m *Model) Schema() Schema + func (m *Model) Temperatures() map[string]float64 + func (m *Model) TokenIDs(in Input) ([]int32, error) + func (m *Model) Tokens(in Input) (int, error) + type OpenQuestion struct + Instructions string + Kind Kind + Name string + Options []Candidate + func OpenNoul(name, instructions string) OpenQuestion + func (q OpenQuestion) OptionIndex(v any) int + type Option func(*Model) + func WithBatching(workers, maxRows int) Option + func WithEmbedCache(n int) Option + func WithInt8() Option + func WithInt8Embeddings() Option + func WithMaxLen(n int) Option + func WithPairs() Option + func WithThreads(n int) Option + type Progress struct + Elapsed time.Duration + Epoch int + LR float64 + Loss float64 + Step int + Steps int + Tokens int + type PruneStats struct + After int + Before int + type Question struct + Instructions string + Kind Kind + Name string + Options []string + func NewChoice(name, instructions string, options ...string) Question + func NewNoul(name, instructions string) Question + func NewScore(name, instructions string, levels ...string) Question + type Schema []Question + func (s Schema) Index(name string) int + func (s Schema) Validate() error + type TrainOptions struct + BatchSize int + ClipNorm float64 + Dropout float64 + Epochs int + HeadLR float64 + LR float64 + Progress func(Progress) + Seed int64 + Symmetric bool + Warmup float64 + WeightDecay float64 + func DefaultTrainOptions() TrainOptions