Skip to content

model: add support for clef decision model (text-only) - #29831

Merged
ngxson merged 7 commits into
masterfrom
xsn/decision_clef
Oct 3, 2026
Merged

ngxson merged 7 commits into
masterfrom
xsn/decision_clef

Conversation

@ngxson

@ngxson ngxson commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

Follow-up #29818

Pre-quantized models:

llama serve -hf ggml-org/Clef-GGUF
llama serve -hf ggml-org/Clef-Flash-GGUF

Additional information

So far, this model is significantly more complicated and requires a new API call to llama_batch_ext

Unlike traditional models that calculating score in a rerank-similar manner, clef selectively run calc mean over a span of input tokens, example:

... INSTRUCTION:  Is the customer angry ?  \nALLOWED OPTIONS:\nOPTION 1:  {"option_id":"true"}  \nOPTION 2:  {"option_id":"false"}  ...
                  └──── 41..46 ────┘                               └───── 52..58 ─────┘            └────── 62..69 ──────┘
                    question span                                      option 0 span                   option 1 span

A new API llama_batch_ext_set_decision_order(bath, idx, order) is added to mark the order span, example:

order meaning
0 ordinary text (default)
1, 2, 3 question text, of kind noul / choice / score
4 option text

Example of 2 questions:

text  [Q noul] text [opt] text [opt] text  [Q choice] text [opt] text [opt] text [opt] text
 0     1 1 1    0   4 4    0   4 4    0     2 2 2      0   4 4    0   4 4    0   4      0

Known limitations:

TODO:

  • make gguf
  • clean up unused code
  • maybe optimize graph, make topology static

Requirements

@github-actions github-actions Bot added documentation Improvements or additions to documentation model Model specific testing Everything test related server conversion labels Oct 1, 2026
@ngxson
ngxson force-pushed the xsn/decision_clef branch from 335afad to f7c18f6 Compare October 2, 2026 13:23
@ngxson
ngxson changed the base branch from xsn/decision to master October 2, 2026 13:24
@ngxson ngxson changed the title model: add support for clef decision model model: add support for clef decision model (text-only) Oct 2, 2026
@ngxson
ngxson marked this pull request as ready for review October 2, 2026 17:33
@ngxson
ngxson requested review from a team, CISC and ggerganov as code owners October 2, 2026 17:33
Comment thread gguf-py/gguf/constants.py Resolved
Co-authored-by: Sigbjørn Skjæret <[email protected]>
@ggerganov ggerganov added the highlight Changes that will be highlighted in the next release notes label Oct 5, 2026
pbonnard added a commit to pbonnard/llama.cpp that referenced this pull request Oct 7, 2026
…odel)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

# Conflicts:
#	README.md
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 8, 2026
(cherry picked from commit 0bb496d)

Omitted the decision_order lines: that field comes from 99b9548
(clef decision model, ggml-org#29831) which is conflict-skipped in this fork.
It will land when that commit is synced. Needed by gemma-embedding2
(4fbc76d) which calls build_inp_embd() with a token scale.
pestopoppa pushed a commit to pestopoppa/llama.cpp that referenced this pull request Oct 21, 2026
…fers (create_tensor hunk of upstream ggml-org#29831)

create_tensor() looked up dev_layer.at(tn.bid) and threw
vector::_M_range_check for a block index >= n_layer_all. The LiLiCorr head
stores its layers and feature MLP as blk.{n_layer_all + i} (5, 6, 7 on the
Bolt drafter). Like upstream, place such blocks with the output device
buffers. Every existing model only uses bid < n_layer_all (anything else
threw before), so its placement is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conversion documentation Improvements or additions to documentation highlight Changes that will be highlighted in the next release notes model Model specific server testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants