vox-plugin-mens-candle-core API Reference (generated)
vox-plugin-mens-candle-core
Section titled “vox-plugin-mens-candle-core”Crate: vox-plugin-mens-candle-core · Version: 0.6.0 · Target: Library (lib.rs)
Shared Candle QLoRA training/inference code for the Metal and CUDA mens plugins (device-agnostic; no cdylib entry point of its own).
Crate Overview
Section titled “Crate Overview”vox-plugin-mens-candle-core — device-agnostic Candle QLoRA code shared by
vox-plugin-mens-candle-metal and vox-plugin-mens-candle-cuda.
Why this crate exists
Section titled “Why this crate exists”The two device plugins started as independent ports of vox-populi’s
Candle QLoRA trainer/server and grew 44 file pairs, 22 of them byte-for-byte
identical (up to 720 lines each). model_card.rs and manifest.rs were
also forked a third time into vox-populi itself, but that third copy
is NOT folded into this crate (see [model_card]‘s docs: vox-populi
sits at a lower dependency layer than this crate and depending on it would
be a layer-rule violation that needs a user-authorized exception). Per
AGENTS.md §Dependency Discipline rule 3, a helper under ~50 lines may be
duplicated with a marker comment — “Never fork 100+ line chunks.” This
crate is the fold for the two plugins: device-agnostic training/inference
code lives here once; genuinely device-specific code (CUDA memory-pool
FFI, Metal’s objc2-metal peak sampler, the gradient-checkpointing
feature CUDA has and Metal doesn’t yet) stays in each plugin crate. No
cdylib entry point — this is an rlib-only shared library, not a
loadable plugin on its own.
Layout
Section titled “Layout”- [
config] —LoraTrainingConfigand friends (previously forked, save alaunch_argvfield CUDA had and Metal hadn’t). - [
manifest] — on-disk training manifest (previously forked the same way). - [
model_card] — human-readableMODEL_CARD.mdwriter (previously forked between the two plugins). - [
inference_device] / [device] — the device-dispatch seam:DeviceKind,resolve_inference_device,compute_dtype_for_device.resolve_inference_deviceis what Metal was missing entirely (see that module’s docs for the bug). - Everything else (
hf_layout,hf_keymap,merge,qlora_preflight,qlora_weights,telemetry*,train_log,train_jsonl_preflight,training_text,training_summary,operator_messages,finetune_contract,adapter_schema_v3,checkpoint_state,external_serving_handoff,candle_qlora_train::*) — byte-identical code moved verbatim.
Features
Section titled “Features”| Feature | Default / Enables |
|---|---|
cuda | candle-core/cuda, candle-nn/cuda |
default | — |
metal | candle-core/metal, candle-nn/metal |
Workspace Dependencies
Section titled “Workspace Dependencies”| Dependency | Kind |
|---|---|
vox-db | Normal |
vox-hf-layout | Normal |
vox-tensor | Normal |
Public API Surface
Section titled “Public API Surface”Modules
Section titled “Modules”| Module | Description |
|---|---|
adapter_schema_v3 | — |
candle_qlora_train | — |
checkpoint_state | — |
config | — |
device | — |
external_serving_handoff | — |
finetune_contract | — |
hf_keymap | — |
hf_layout | — |
inference_device | — |
manifest | — |
merge | — |
model_card | — |
operator_messages | — |
qk_norm | — |
qlora_preflight | — |
qlora_weights | — |
rope | — |
telemetry | — |
telemetry_schema | — |
train_jsonl_preflight | — |
train_log | — |
training_summary | — |
training_text | — |
weight_resolution | — |