Skip to content

model: Add ffn_gate_up_exps scales - NVFP4 - #377

Closed
danielhanchen wants to merge 2 commits into
base/upstream-50518b64cfrom
inkling2-expert-scales
Closed

danielhanchen wants to merge 2 commits into
base/upstream-50518b64cfrom
inkling2-expert-scales

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Adds scales to ffn_gate_up_exps.

Upstream already loads and applies per-expert scales for the separate expert tensors:

  • ffn_gate_exps -> ffn_gate_exps_s
  • ffn_up_exps -> ffn_up_exps_s
  • ffn_down_exps -> ffn_down_exps_s

The fused tensor had none. This adds:

  • ffn_gate_up_exps -> ffn_gate_up_exps_s

Inkling 2 now passes ffn_gate_up_exps_s and ffn_down_exps_s to build_moe_ffn, so GGUFs that keep the original NVFP4 experts (one F32 scale per expert) load and run.

NVFP4 expert GGUFs keep ffn_gate_up_exps.scale and ffn_down_exps.scale (one scale per expert). Load the optional gate_up scale and pass both scales to build_moe_ffn, so such files load and the down scale is applied.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T15:09:01.372779Z 72fcc04 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen
danielhanchen changed the base branch from base/upstream-08c252e22 to base/upstream-50518b64c November 20, 2026 11:47
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