katgpt-types 0.1.0

Shared configuration, RNG, math utilities, LoRA, domain embeddings, and inference types for katgpt-rs / riir-engine. Pure substrate leaf — no katgpt-* deps.
Documentation

katgpt-types — Shared configuration, RNG, math utilities, SIMD kernels, and inference types for the katgpt-rs / riir-engine superset.

Pure substrate leaf crate. No katgpt-* dependencies — only fastrand, blake3, serde, half. This is the foundational layer (types + SIMD kernels) that every other katgpt-* crate (and riir-engine) builds on. The types and simd modules are co-located because types::math calls simd kernels (softmax / rmsnorm / matmul) and simd::ternary uses types::TernaryWeights — they form a tight bidirectional leaf that cannot be split further without breaking the cycle.

Originally a single 5,148-line types.rs inside katgpt-core (2.5× the 2048-line ceiling), split into topic-specific submodules. The full public surface is re-exported here so consumers can use katgpt_types::* paths directly.

Spun out of katgpt-core::types (Issue 007 Phase E Tier 1 #2) as a standalone publishable crate mirroring the katgpt-dec / katgpt-transformer template.

Module layout

  • [enums] — small config enums (DepthTier, HlaMode, AttentionMode, …) plus WallConfig / ThinkingBudget
  • [config] — the Config struct (~1.5k lines), InferenceOverrides, and kv_dim
  • [rng] — XorShift64 PRNG
  • [math] — SIMD-accelerated softmax / rmsnorm / matmul / sample_token (legacy home; candidates for relocation to katgpt-simd::)
  • [lora] — CPU-side LoRA adapter
  • [gpart] — GPart Isometric Partition adapter (Research 227)
  • [domain] — DomainLatent embedding (Plan 038)
  • [inference] — InferenceResult, TaskType, ProposerTask, DataGate
  • [looping] — Training-Free Loop types (Plan 136)
  • [ternary] — Bit-plane ternary weights (plasma_path)
  • [hydra] — Hydra Adaptive Layer Budget types
  • [sense] — ShardEmbedding + sense composition types

Test modules live alongside their topic (e.g. rng::tests_rng) or in tests_types.rs for cross-cutting tests.