A vindex is a transformer's weights decompiled into a queryable feature database — entity associations, circuit structure, and knowledge-editing surfaces exposed as APIs. No GPU required for most operations.
Editing surface for compiling into a standard HuggingFace safetensors model
Not a general inference engine
Critical note on /v1/infer: This endpoint returns a feature-modulated projection of the host model's activations — not a coherent text-generation distribution. Output is incoherent subword tokens by design (the vindex is a feature graph, not a full transformer forward pass). For factual text generation from the base model, use google/gemma-4-e2b-it directly. To run inference on an edited model (after DELETE/INSERT patches), compile it — this exports MEMIT-edited weights to HuggingFace safetensors that load like any standard transformers model. Use /v1/walk and /v1/patch for the validated vindex operations.
1# After applying patches, export to safetensors for standard inference2vindex compile into model \3 --vindex Divinci-AI/gemma-4-e2b-vindex \4 --output ./edited-gemma4 \5 --format safetensors
67# Run with standard Transformers8from transformers import AutoModelForCausalLM, AutoTokenizer
9model = AutoModelForCausalLM.from_pretrained('./edited-gemma4')
Quick start
bash
1# Set environment variables2exportVINDEX_SERVICE_URL=<your_vindex_cloud_run_url>3exportINTERNAL_VINDEX_S2S_TOKEN=<your_s2s_token>45# Query entity associations6curl"$VINDEX_SERVICE_URL/v1/walk?prompt=Paris&layers=14-27&top=10"\7 -H "Authorization: Bearer $INTERNAL_VINDEX_S2S_TOKEN"89# Gate 3 repro: DELETE the Paris→capital feature then verify suppression10curl -X POST "$VINDEX_SERVICE_URL/v1/patches/apply"\11 -H "Authorization: Bearer $INTERNAL_VINDEX_S2S_TOKEN"\12 -H "Content-Type: application/json"\13 -d '{"name":"delete-paris-capital","patch":{"version":1,"base_model":"gemma4-e2b","created_at":"2026-04-20T00:00:00Z","operations":[{"op":"delete","entity":"Paris","relation":"capital","target":"서울","weight":1.0,"layer":27,"feature":11179}]}}'1415# Before: feature 11179 (gate_score=18.1) present in walk16# After: feature 11179 absent from walk (complete suppression confirmed)
Note on down_features.bin: Generated from down_weights.bin via a Python transposition step that handles Gemma 4's variable intermediate sizes per layer (L0-14: 6144, L15-34: 12288). The Rust binary segfaults on variable intermediate sizes; our fix is a Python Cloud Build step. Required for walk-mode feature retrieval.
Gate 3 Validation (DELETE patch confirmed)
Gate 3 test: DELETE patch on Paris → 서울 (Seoul/capital) feature at layer 27, feature 11179.
Metric
Before DELETE
After DELETE
Feature 11179 gate_score
18.10
ABSENT
Paris capital rank
#2 overall
Absent from top-25
Walk hits
Feature 11179 present (score 18.1)
Feature 11179 completely absent
Walk vs dense diverge after fix: confirms down_features.bin is loaded and active.
Predictive formula:active_experts ≈ 1/dominant_sparsity predicts Gemma 4's top-8 MoE routing within 4% error from structural analysis alone.
Constellation Edits (knowledge editing): Rank-1 DELETE at the TRACE-identified crown layer (L25 for geography facts) achieves FQ=1.00 in 80ms with full reversibility. Gradient ascent fails due to softmax saturation (gradient=0 at P=1.0 float32). Cross-architecture validation: Mistral-7B FQ=1.00/MU=0.88 (structural rank-1), Qwen2.5-1.5B FQ=1.00 (ROME-style k*). See notebooks/PAPER_CONSTELLATION_EDITS_DRAFT.md.
Important notes
Substitute tokenizer: Feature labels show Qwen 2.5 tokens (151,643-vocab), not Gemma 4 tokens. Gate vectors are correct Gemma 4 weights; only the label mapping is approximate.
License: CC-BY-NC 4.0. Academic and research use. Contact mike@divinci.ai for commercial licensing.