Archived
clef: the head in plugins of its own (arch/clef_bf16, arch/clef_fp8); the qwen35 plugins untouched
This commit is contained in:
1 parent
a96bfe821f
commit
b1da6a28bd
11 files changed
+163
-44
No files matched your search
+8
-3
@@ -2760,17 +2760,22 @@ Cloudflare's clef (27B) and clef-flash (9B) are decision models on Qwen3.5 that
|
||||
request, every question of it jointly: a joint schema head reads the backbone's final hidden state
|
||||
at every prompt position, the mean over each question's instructions and each option's text, and
|
||||
the lm_head rows of each option's tokens, and gives one logit an option. radiance runs that head
|
||||
on the card, after the trunk, inside the `qwen35_bf16` and `qwen35_fp8` plugins
|
||||
(`arch/common/rad_block_clef.h`): there is no second process. The head's own tensors ship as
|
||||
on the card, after the trunk, in the `clef_bf16` and `clef_fp8` plugins (`arch/clef_bf16`,
|
||||
`arch/clef_fp8`: the qwen35 plugins' own code with `arch/common/rad_block_clef.h` after it): there
|
||||
is no second process. The head's own tensors ship as
|
||||
`joint_head.safetensors` beside the checkpoint and are added at convert; `joint_head_config.json`
|
||||
beside them gives the head's geometry.
|
||||
|
||||
```sh
|
||||
rad-convert /srv/models/clef-flash -o clef-flash.rad \
|
||||
rad-convert /srv/models/clef-flash -o clef-flash.rad --arch clef \
|
||||
--add /srv/models/clef-flash/joint_head.safetensors --set decision.type=clef
|
||||
radiance --model clef-flash.rad --port 8000
|
||||
```
|
||||
|
||||
`--arch clef` selects the `clef_bf16` and `clef_fp8` plugins, the qwen35 trunk built again with
|
||||
the head after it; a container left as `qwen35` serves generation and answers `/v1/systemone`
|
||||
with 501.
|
||||
|
||||
The request and the response are the same as d1's above; `/v1/decisions` is the same endpoint
|
||||
under LiteLLM's name. What differs:
|
||||
|
||||
|
||||
@@ -12,7 +12,12 @@ On threadripper, fp8 clef-flash with the head in a PyTorch sidecar served 1.43 r
|
||||
|
||||
## Decision
|
||||
|
||||
The head runs on the GPU, in the plugin step (`arch/common/rad_block_clef.h`), with these parts:
|
||||
The head runs on the GPU, in the plugin step (`arch/common/rad_block_clef.h`). On this branch
|
||||
(`clef-flash-arch-plugin`) it is wired in two plugins of its own, `arch/clef_bf16` and
|
||||
`arch/clef_fp8`, which build the qwen35 plugins' source again under architecture id `clef` and
|
||||
add the head after the trunk; the qwen35 plugins are untouched. The sibling branch
|
||||
(`clef-flash-support`) wires the same block into the qwen35 plugins behind `decision.type=clef`.
|
||||
The parts:
|
||||
|
||||
1. Every step, the final norm's rows go through the head's `hidden_norm` and into a paged FULL KV group of the head's own (`clef.kv`, one layer bound past the trunk's). Its block size is the trunk's, so the prefix cache keeps those rows with the trunk's cache. 8 KB a token on clef-flash.
|
||||
2. On the step that samples a prompt's first token, the head gathers every row of its group back out (`gather_rows` over the sequence's block table, the way the KV tier packs blocks), runs the memory projection and the six cross-attention layers over all of them, averages the question and option spans, routes, runs the decoder layers and the scorer, and writes three values an option (lexical prior, cosine, residual) into the request's logits row.
|
||||
|
||||
Reference in new issue
Block a user