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 Outdated
Co-authored-by: Sigbjørn Skjæret <sigbjorn.skjaeret@huggingface.co>
@ngxson
ngxson merged commit 99b9548 into master Oct 3, 2026
20 of 21 checks passed
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 model Model specific server testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants