Context Sphere Projector
This repository contains the Context Projection Model v3 checkpoint used by the
Context Sphere artifact.
The Projector is a persona-conditioned routing model. It operates after the
Master Context Sphere is assembled and scores candidate context nodes
separately for the Product Manager, Worker, and Reviewer personas. The goal is
to reduce token load while preserving enough structural evidence for repair.
Files
model.safetensors: trained projection model weights.
config.json: model architecture configuration.
tokenizer.json, tokenizer_config.json, special_tokens_map.json,
vocab.txt: tokenizer assets.
best_worker_margin.json: selected checkpoint metadata.
context_projector_v3_training_report.json: training report.
context_projector_v3_persona_thresholds.json: calibrated persona threshold
report.
Training Summary
The projection model was trained from a
cross-encoder/ms-marco-MiniLM-L-6-v2 backbone on 7,299 persona-conditioned
samples with an 888-row validation split. Training used persona-stratified
oversampling and asymmetric BCE loss with positive weights PM=8,
REVIEWER=10, and WORKER=18. The final checkpoint was selected at epoch 1
using the Worker Margin criterion.
In the paper's 10-case projection smoke test, the min_k=2 safety-floor
configuration preserved 9/10 known Context Sphere successes while reducing
input tokens by 71.5% and estimated inference cost by 58.4%.
Usage
The companion artifact repository contains the Context Sphere inference code,
projection integration, reproduction scripts, and evaluation artifacts:
Download this model into the default projection path used by
scripts/orchestrate_resolution.py:
1python - <<'PY'
2from huggingface_hub import snapshot_download
3
4snapshot_download(
5 repo_id="Zywdd/context-sphere-projector",
6 repo_type="model",
7 local_dir="models/context_projector_v3",
8 allow_patterns=[
9 "model.safetensors",
10 "config.json",
11 "tokenizer.json",
12 "tokenizer_config.json",
13 "special_tokens_map.json",
14 "vocab.txt",
15 "best_worker_margin.json",
16 "context_projector_v3_training_report.json",
17 "context_projector_v3_persona_thresholds.json",
18 ],
19)
20PY
The Context Sphere pipeline loads the projector through
sentence_transformers.CrossEncoder:
1from sentence_transformers import CrossEncoder
2
3model = CrossEncoder("models/context_projector_v3", device="cpu")
4scores = model.predict([
5 ["Persona: WORKER | Task: fix the issue", "candidate file text"]
6])
In the full artifact, projection mode is enabled with:
1python scripts/run_benchmarks.py \
2 --cases-file artifacts/cases/projection_smoke_context_passed_10.json \
3 --retrieval-mode projection \
4 --projection-min-k 2 \
5 --model-strategy fallback \
6 --max-file-chars 60000 \
7 --out outputs/projection_smoke_10_floor_repro \
8 --run-verify
Citation
1@misc{zhang2026contextsphere,
2 title = {Context Sphere: Topology-Aware Context Orchestration for Cost-Efficient LLM Repository Repair},
3 author = {Zhang, Yuwen},
4 year = {2026},
5 howpublished = {arXiv preprint and artifact release}
6}