Skip to content

fix(cli): build_cmd should respect vindex dtype when saving gate vectors - #201

Open
17skills wants to merge 1 commit into
chrishayuk:mainfrom
17skills:fix/f16-gate-save
Open

fix(cli): build_cmd should respect vindex dtype when saving gate vectors#201
17skills wants to merge 1 commit into
chrishayuk:mainfrom
17skills:fix/f16-gate-save

Conversation

@17skills

@17skills 17skills commented Aug 4, 2026

Copy link
Copy Markdown

larql build currently calls save_gate_vectors(&output_dir), which hardcodes F32 output regardless of the vindex dtype in the build config.

save_gate_vectors_with_config() already exists (and is covered by save_gate_vectors_with_config_preserves_expert_geometry in crates/larql-vindex/src/index/mutate/tests.rs), but the CLI call site never adopted it — so an f16 vindex silently gets F32 gate vectors, doubling their size on disk and diverging from the declared dtype.

One-line change: route the CLI through the config-aware variant. Rebases cleanly onto current main.

larql build calls save_gate_vectors(&output_dir), which hardcodes F32
output regardless of the vindex dtype in the build config. Route the CLI
through the existing config-aware save_gate_vectors_with_config() so an f16
vindex gets f16 gate vectors instead of silently doubling their size on
disk and diverging from the declared dtype.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant