Skip to content

Codex/kluster integration - #1

Merged
berkkarahan merged 137 commits into
mainfrom
codex/kluster-integration
Oct 14, 2026
Merged

berkkarahan merged 137 commits into
mainfrom
codex/kluster-integration

Conversation

@berkkarahan

Copy link
Copy Markdown
Owner

No description provided.

berk and others added 30 commits October 10, 2026 22:28
berkkarahan and others added 28 commits October 13, 2026 14:34
Make the QWEN (v1) loader rank-aware (rank-zero token embedding and
output norm, per-owned-layer fused QKV with bias and gated FFN
weights on owning ranks) and add build_qwen_segmented: rank-zero
embedding graph, per-owned-layer NeoX-RoPE attention and SiLU
parallel-FFN segments, and a rank-zero head graph, replacing the
obsolete single-rank graph. Advertise qwen_segmented_v1.

Co-authored-by: Cursor <cursoragent@cursor.com>
Make the PHI2 loader rank-aware (rank-zero token embedding and
output norm/weight/bias on rank zero, per-owned-layer QKV with
biases - fused or separate - output projection with bias and gated
FFN weights with biases on owning ranks) and add
build_phi2_segmented: rank-zero embedding graph, per-owned-layer
partial-rotary attention with Q pre-scale, GELU FFN and parallel
residual segments, and a rank-zero head graph with output bias,
replacing the obsolete single-rank graph. Advertise
phi2_segmented_v1.

Co-authored-by: Cursor <cursoragent@cursor.com>
Make the PLAMO loader rank-aware (rank-zero token embedding and
output norm/weight on rank zero, per-owned-layer Q/K/V and gated
FFN weights on owning ranks) and add build_plamo_segmented:
rank-zero embedding graph, per-owned-layer NORM-RoPE attention and
SiLU parallel-FFN segments with parallel residual, and a rank-zero
head graph, replacing the obsolete single-rank graph. Advertise
plamo_segmented_v1.

Co-authored-by: Cursor <cursoragent@cursor.com>
Make the CODESHELL loader rank-aware (rank-zero token embedding and
output norms with biases, per-owned-layer QKV with bias, output
projection with bias and GELU FFN weights with biases on owning
ranks) and add build_codeshell_segmented: rank-zero embedding
graph, per-owned-layer NeoX-RoPE attention and GELU FFN segments,
and a rank-zero head graph, replacing the obsolete single-rank
graph. Advertise codeshell_segmented_v1.

Co-authored-by: Cursor <cursoragent@cursor.com>
Make the ORION loader rank-aware (rank-zero token embedding and
output norms with biases on rank zero, per-owned-layer Q/K/V and
gated FFN weights with norm biases on owning ranks) and add
build_orion_segmented: rank-zero embedding graph, per-owned-layer
NORM-RoPE attention and SiLU parallel-FFN segments, and a rank-zero
head graph with biased output norm, replacing the obsolete
single-rank graph. Advertise orion_segmented_v1.

Co-authored-by: Cursor <cursoragent@cursor.com>
Make the INTERNLM2 loader rank-aware (rank-zero token embedding and
output norm/weight on rank zero, per-owned-layer Q/K/V, output
projection and gated FFN weights on owning ranks) and add
build_internlm2_segmented: rank-zero embedding graph,
per-owned-layer NORM-RoPE attention and SiLU parallel-FFN segments
with RMS norms, and a rank-zero head graph, replacing the obsolete
single-rank graph. Advertise internlm2_segmented_v1.

Co-authored-by: Cursor <cursoragent@cursor.com>
Give MiniCPM (v1) a dedicated rank-aware loader separated from the
shared MiniCPM3 MLA case (rank-zero token embedding, optional/tied
output and output norm on rank zero, per-owned-layer Q/K/V with
optional biases, output projection and gated FFN weights on owning
ranks) and add build_minicpm_segmented: rank-zero embedding graph
with 12x embedding scaling, per-owned-layer NORM-RoPE attention and
SiLU parallel-FFN segments with depth-scaled residuals, and a
rank-zero head graph, replacing the obsolete single-rank graph.
Advertise minicpm_segmented_v1.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…atches

- build_tool_parser_json_native: for tool_choice auto, add a content-only
  alternative so complete output that mentions a tool marker but is not a
  valid tool call degrades to plain content instead of failing the parse
  (server 500). tool_choice required keeps the strict tools-only path.
- analyze_template: collect preserved tokens after the workaround patches
  run so tokenizer preservation agrees with patched tool/reasoning markers
  (e.g. DeepSeek-R1-Distill-Qwen).
- Extend prima-chat-parser-contract-test with regression coverage for both
  behaviors (verified to fail without each fix).
@berkkarahan
berkkarahan merged commit 72f4d1e into main Oct 14, 2026
0 of 8 checks passed
@berkkarahan
berkkarahan deleted the codex/kluster-integration branch October 14, 2026 07:23
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