Commit graph

5 commits

Author SHA1 Message Date
Snider
6333fa7b6d feat: modernise to Go 1.26 — iterators, slices.Sorted, maps.Keys
Some checks failed
Security Scan / security (push) Successful in 10s
Test / test (push) Failing after 37s
- List() now returns deterministic alphabetical order via slices.Sorted(maps.Keys())
- Add All() iter.Seq2[string, Backend] for iterator-based registry access
- Use slices.Insert for prepend in Discover
- Use maps.Values in Default() fallback
- Remove redundant sort.Strings in tests (List() is now sorted)

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 05:07:50 +00:00
Snider
0f7263f731 feat: add AttentionInspector optional interface for Q/K Bone Orientation
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 00:36:45 +00:00
Snider
82fd78ef90 refactor: apply go fix modernizers for Go 1.26
Automated fixes: interface{} → any, range-over-int, t.Context(),
wg.Go(), strings.SplitSeq, strings.Builder, slices.Contains,
maps helpers, min/max builtins.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-22 21:00:16 +00:00
Claude
e0ec07e667
test(inference): complete Phase 1 foundation tests
Add comprehensive tests for all three Phase 1 items:

- Option application: DefaultGenerateConfig idempotency, field isolation
  (WithMaxTokens leaves others at defaults), bad-input acceptance
  (negative temperature, negative TopK), empty variadic StopTokens,
  WithLogits default-is-false, partial-options preserve defaults,
  last-wins overrides for all GenerateOption and LoadOption types.

- Backend registry: concurrent read/write safety (70 goroutines with
  -race), overwrite-keeps-count, capturingBackend verifies LoadModel
  forwards all options to both explicit and default backends, Get
  after overwrite returns latest, List returns independent slices.

- Default() platform preference: registration order is irrelevant
  (metal wins regardless), all-preferred-unavailable falls back to
  custom, multiple custom backends finds the available one, empty
  path forwarding.

85 tests, 100% statement coverage, -race clean.

Co-Authored-By: Charon <developers@lethean.io>
2026-02-20 11:45:59 +00:00
Claude
d76448d4a9
test(inference): add comprehensive tests for all exported API
Cover options (GenerateConfig defaults, all With* options, ApplyGenerateOpts/
ApplyLoadOpts), backend registry (Register, Get, List, Default priority order
metal > rocm > llama_cpp), LoadModel routing (explicit/auto backend, error
paths), and Discover (model directory scanning, quantisation, edge cases).

69 tests, 100% statement coverage, race-clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 02:06:49 +00:00