llama.cpp
Granite-Switch Architecture
#25107
Merged

Granite-Switch Architecture #25107

barvhaim
barvhaim barvhaim requested a review from CISC CISC 48 days ago
barvhaim barvhaim requested a review from ggerganov ggerganov 48 days ago
github-actions github-actions added model
github-actions github-actions added conversion
ggml-gh-bot
barvhaim
barvhaim barvhaim marked this pull request as draft 48 days ago
pwilkin pwilkin marked this pull request as ready for review 48 days ago
pwilkin pwilkin marked this pull request as draft 48 days ago
barvhaim barvhaim marked this pull request as ready for review 48 days ago
gabe-l-hart gabe-l-hart requested a review from gabe-l-hart gabe-l-hart 47 days ago
gabe-l-hart
gabe-l-hart commented on 2026-06-29
CISC
gabe-l-hart
CISC
barvhaim barvhaim force pushed from 111d3337 to 9249531f 46 days ago
ngxson
ngxson commented on 2026-06-30
gabe-l-hart
gabe-l-hart commented on 2026-06-30
barvhaim barvhaim force pushed from 758fbbb3 to aa441ebe 45 days ago
barvhaim
gabe-l-hart
gabe-l-hart approved these changes on 2026-07-06
barvhaim barvhaim force pushed from bae32b62 to 0a7e4110 39 days ago
barvhaim barvhaim requested a review from ngxson ngxson 39 days ago
ngxson
ngxson commented on 2026-07-07
ngxson
ngxson commented on 2026-07-07
barvhaim barvhaim force pushed from 290d8d47 to 97700cf5 38 days ago
barvhaim barvhaim requested a review from ngxson ngxson 38 days ago
ngxson
ngxson commented on 2026-07-12
barvhaim barvhaim requested a review from JohannesGaessler JohannesGaessler 34 days ago
github-actions github-actions added testing
barvhaim barvhaim force pushed from 1cb71b5d to f57f905b 34 days ago
barvhaim
barvhaim barvhaim requested a review from ngxson ngxson 34 days ago
ngxson
ngxson approved these changes on 2026-07-12
gabe-l-hart
ngxson
barvhaim granite-switch: add llama.cpp backend (POC, CPU)
d9572250
barvhaim granite-switch: add Mac (Metal) build + mid-sequence switch demo script
6e734e82
barvhaim granite-switch mac demo: add -no-cnv so each run is one-shot
af48dfa0
barvhaim granite-switch: replace global sticky index with in-graph router atte…
16c9ad56
barvhaim granite-switch: drop scratch tests and mac demo for upstream PR
30ffe08f
barvhaim granite-switch: trim comments to match native llama.cpp style
0ac7c96b
barvhaim granite-switch: trim conversion comments to match native style
b17c0bca
barvhaim granite-switch: drop unused adapter_ranks metadata
7626399e
barvhaim granite-switch: rename arch to graniteswitch and drop obid alias
e193ea55
barvhaim granite-switch: fix non-ASCII comments and document router gain assum…
2b179f08
barvhaim granite-switch: drop section comments from constants.py to match nati…
3041ba8f
barvhaim granite-switch: add functional tensor block comments matching Granite…
8c353071
barvhaim granite-switch: clarify n_expert_used comment
36936ada
barvhaim granite-switch: note n_layer_nextn reuse has no MTP
dba81e38
barvhaim granite-switch: rename source file and apply review nits
26f2843a
barvhaim granite-switch: don't force LoRA tensors to F16, follow --outtype ins…
116c6112
barvhaim granite-switch: drop redundant _permute_qk wrapper, call LlamaModel.p…
6be5d0ca
barvhaim granite-switch: read router gain from GGUF (control_token_gain) inste…
059401c9
barvhaim granite-switch: derive n_slots()
8d71a5c4
barvhaim granite-switch: move llm_graph_input_switch into granite-switch.cpp
afa1b7e4
barvhaim granite-switch: cut AI-style narration comments
5b2cb93c
barvhaim granite-switch: collapse multi-line comments
d385fc24
barvhaim granite-switch: rename control_token_* maps to adapter_token_*
768e6087
barvhaim granite-switch: cut noise comments
03e46c11
barvhaim granite-switch: rename embedded LoRA tensors to <base>.lora_a/lora_b
24e06e96
barvhaim granite-switch: GGML_ASSERT token input to avoid UB on embeddings
613bc199
barvhaim granite-switch: TODO for raw embedding input support
472d1c9c
barvhaim granite-switch: collapse LoRA tensor constants to .lora_a/.lora_b suffix
c6014846
barvhaim granite-switch: drop n_expert_used hack, guard mul_mat_id buft probe
622eb21e
barvhaim granite-switch: stop forcing dense expert counts, read from config
ad04ce88
barvhaim granite-switch: renamed control_token_gain metadata key to router_gain
1d15ea35
barvhaim granite-switch: trim header comments to match native style
e99c0563
barvhaim granite-switch: collapse LoRA tensors to base name + suffix
46d882ed
barvhaim granite-switch: inline suffix checks in tensor op resolution
d99296fb
barvhaim granite-switch: drop switch-lora struct comment
c57b00f9
barvhaim granite-switch: guard router layer index and inline n_slots
d2ca90b3
barvhaim granite-switch: group adapter metadata under {arch}.adapters.* namespace
11890d3e
barvhaim granite-switch: add hparams.has_rope(il) for KV-shift rope skipping
ae2ae69b
barvhaim granite-switch: skip arch in test-llama-archs (adapter fixture missin…
d8860737
barvhaim granite-switch: Keys.Adapters namespace + simplify n_slots
2204806a
barvhaim barvhaim force pushed from f57f905b to 2204806a 20 days ago
barvhaim granite-switch: validate substitute token ids against n_vocab
56698576
barvhaim granite-switch: bound adapter count and lora rank from GGUF
a7271ce8
barvhaim granite-switch: reject MTP context type when router_layer is set
64278bb1
barvhaim granite-switch: throw on bad adapter metadata instead of GGML_ASSERT
34f5607c
barvhaim granite-switch: use ASCII +/- in router K signal comment
7cc8ba12
barvhaim granite-switch: document n_layer_nextn repurpose and its leak points
118cf8a8
barvhaim granite-switch: gate lora_a/lora_b op mapping on router_layer
65cb2018
barvhaim granite-switch: label all three preview model sizes
15e473d6
barvhaim
ngxson
CISC
CISC approved these changes on 2026-08-04
CISC
CISC CISC merged 157b81fe into master 5 days ago
gabe-l-hart

Login to write a write a comment.

Login via GitHub

Assignees
No one assigned
Labels
Milestone