radiance 1.15.0

New models and formats:
- IQR for Qwen3.8-27B: weights on the int8 grid under GPTQ, a trellis down each GPTQ column
  (IQR-V2), and IQR-V3, a computed trellis code under one scale a row, kept at its codes' width in
  VRAM and decoded in the GEMM; 15 IQR-V3 recipes from ~2 to ~7 bits a weight
  (data/recipes/q38-27b-*-v3.recipe, docs/IQR.md)
- libhalo: a kernel library for Strix Halo (gfx1151), preferred there over libr3d
- Nemotron 3.5 Embed 1B and 8B (nemotron35_embed): text and image embeddings through a Pixtral
  tower, on the card and on the CPU
- Nemotron 3.5 Rerank 8B
- /v1/systemone: Cloudflare's clef and clef-flash, Convai Innovations' Laya and Mica beside
  LiquidAI d1; scored steps read the candidates' logits from the head table with no lm_head pass
- LFM2's 8-bit trunk: block-fp8 or int8 linears with the fused producers, and the d1-3B recipe
- DeepSeek-V4.1's reply format with DSML tool calls and typed argument tags

Weights on the drive:
- The file tier reads only the experts the pass routes rows to; the draft head's weights stay in
  the host pool
- A hot VRAM cache for routed experts read off the drive, reads deposited straight into free host
  pool slots, and copyless evictions; the file tier's counters are now ssd_*
- GLM-5 Next shards its routed experts by expert, not by width, so they can live on the drive
- The stall watch counts drive reads as progress, and the DMA lane's room check reads the lane's
  own completion fence

Quantisation tooling:
- --calib-corpus, --calib-dir and --calib-layers record each linear's input Hessian; beside
  --kld-record the reference's own run records them
- --kld-top N records a sparse KL reference (the N most likely tokens and the tail's mass)
- GPTQ in a third of the time with the same codes, trellis GPTQ on the card, vector codebooks
  with coordinate descent, and rad-convert --reuse repeated, each container supplying what the
  earlier ones lack

Speculation:
- Prompt lookup alone (--spec-ngram K, --spec-ngram-min/-max): each sequence keeps an index of its
  n-grams, and a proposal is verified only when its measured step cost says it pays;
  --draft-window adaptive follows it

Speed:
- IQR decode: the narrow tile splits K for four times the int8 tile's waves and folds each 128-K
  block once; at 8 tokens down and the output projections run in 0.61-0.82x and 0.70-0.92x FP8's
  time (2-6 bits); IQ6R-S-V3 with its DFlash2 drafter steps in 26.3 ms at TP2, against 29.4 ms
  before and FP8's 27.3
- Qwen MXFP4 feed-forward: the gated fold up to 16 rows, not 8
- libr4d: the gated prefill fold, the short-prompt split row, and the rows forms of rmsnorm and
  rope; KLATE again for the head-256 gqa6 paged prefill; gram_accum on the matrix cores

Features:
- /health, /v1/health and /ping answer 503 with "status": "stuck" once the device has advanced
  nothing for a minute or a queue has faulted, so a supervisor can restart a wedged server (#356)
- --image-gen-max-pixels and --image-gen-max-refs size an image generator's buffers (#344)
- The startup report lists only the options not at their default, with a count; -v lists all
  (#250)
- --preempt-wait-ms bounds how long a preempted prefill waits for its whole-recompute room
- --placement layer_offload spills dense layers so one --max-model-len sequence fits
- Startup refuses amdgpu with CWSR off and says how to fix it;
  --proceed-with-incompatible-configuration starts anyway under an UNSUPPORTED banner

Fixes:
- The n-gram read-ahead hands each row to the reader once and reads only as far ahead as the row
  cache holds, and pauses while decode reads: about one drive read a row instead of two (#355)
- A file-tier window reads each of its runs once, not once a run per run
- The decode split law's verify floor is bounded by the batch's workgroups: max_seqs 256 no longer
  declares 64x the scratch (#342)
- A prefetch DMA list's mark stays out of the signal pool until the engine has read it, and a
  prefill stage copies only the blocks its own tables name (#343)
- The split-KV row sum is read with fetch-inactive (#328)
- LFM2 on the host backend: libref and libavx serve the row-form ops it declares (#348)
- The preempted-prefill gate skips a KV group that holds no blocks (#352)
- Every request entry point bounded, gated and sanitised (JSON depth, invalid UTF-8, control bytes
  in the log, the dashboard's CSP, cross-origin browsers on the loopback-only routes); a prompt id
  outside the vocabulary refused at admission; --api-key "" refused at startup
- The telemetry the HTTP thread reads is atomic
- An RMS norm row no longer depends on how many rows its launch carries; prefill attention's
  rescale is decided by live rows only
- A --kld-record prefill chunk that finishes no sequence gets its logits on a tied-head model
- A kernel's lazily made counter block is zeroed outside the lock other ranks take (a TP2 first-step
  hang)

Changes: Plugin ABI 32. Every plugin exports a layout fingerprint of the ABI structs and the loader
refuses a plugin without it or with another (#302), so out-of-tree plugins must be rebuilt.
Appended: RadBuildCtx calib_* and gen_max_*, RadArchProbe gen_max_*, RadBatch score_only and
plugin_words, RadDeviceProps::unified, RadChatFormat arg_json_value_prefix.
This commit is contained in:
Deadcode committed 2026-10-30 22:01:01 +01:00
commit 9ed3ef7a7b
452 files changed
+167762 -1346

No files matched your search

+9 -5
View File
@@ -14,10 +14,12 @@ extern "C" {
/* Bumped whenever anything a plugin compiles against changes shape: this header, rad_types.h,
* rad_builder.h, rad_runtime.h, rad_device.h, rad_encoding.h, rad_quant.h, rad_sample.h or
* rad_spechub.h. Every kind of plugin reports it, and a plugin that does not report exactly this
* version is refused at load with both versions printed. A new optional export (e.g.
* rad_plugin_reference) is not a change of shape: a plugin without it gets the default. */
#define RAD_ABI_VERSION 31u
* rad_spechub.h, a field appended to a struct included; the release that ships the change assigns
* the number. Every kind of plugin reports it, and a plugin that does not report exactly this
* version is refused at load with both versions printed. Each also exports the layout's fingerprint
* (rad_abi_layout.h), so two layouts given one number are refused as well. A new optional export
* (e.g. rad_plugin_reference) is not a change of shape: a plugin without it gets the default. */
#define RAD_ABI_VERSION 32u
/* ================================================================== plugin identity */
/* One value per plugin, not flags (QUANT is 3). RAD_PLUGIN_QUANT is a quantiser plugin:
@@ -35,8 +37,10 @@ typedef struct RadPluginInfo {
const char* build_target;
} RadPluginInfo;
/* Every plugin exports these two. */
/* Every plugin exports these three; rad_plugin_abi_layout is RAD_PLUGIN_ABI_LAYOUT_EXPORT
* (rad_abi_layout.h). */
uint32_t rad_plugin_abi_version(void);
uint64_t rad_plugin_abi_layout(void);
const RadPluginInfo* rad_plugin_info(void);
/* ================================================================== execution domain */
+64
View File
@@ -0,0 +1,64 @@
/* rad_abi_layout.h -- the plugin ABI's layout fingerprint: a hash of the size of every struct abi/
* exports and of the offset and size of each of its fields (rad_abi_layout_rows.h), as the
* translation unit that includes this header sees them.
*
* RAD_ABI_VERSION names a layout, but two trees can give the same number to different layouts, and
* a plugin built against one then reads the other's structs at the wrong offsets, with no error. A
* plugin exports its own fingerprint (RAD_PLUGIN_ABI_LAYOUT_EXPORT, once in the plugin), and the
* loader refuses one whose fingerprint differs from the engine's under the same version. C and C++.
*/
#ifndef RAD_ABI_LAYOUT_H
#define RAD_ABI_LAYOUT_H
#include "rad_abi.h"
#include "rad_builder.h"
#include "rad_device.h"
#include "rad_encoding.h"
#include "rad_format.h"
#include "rad_philox.h"
#include "rad_planes.h"
#include "rad_plugin.h"
#include "rad_quant.h"
#include "rad_runtime.h"
#include "rad_sample.h"
#include "rad_spechub.h"
#include "rad_types.h"
#include "rad_yarn.h"
#include <stddef.h>
#include <stdint.h>
/* FNV-1a over the eight bytes of `v`, little end first. */
static inline uint64_t rad_abi_layout_mix(uint64_t h, uint64_t v) {
for (int i = 0; i < 8; ++i) {
h ^= (v >> (8 * i)) & 0xffu;
h *= 0x100000001b3ull;
}
return h;
}
/* The fingerprint of the abi/ headers this translation unit was compiled against. */
static inline uint64_t rad_abi_layout(void) {
uint64_t h = 0xcbf29ce484222325ull;
h = rad_abi_layout_mix(h, RAD_ABI_VERSION);
#define ABI_STRUCT(T) h = rad_abi_layout_mix(h, sizeof(T));
#define ABI_FIELD(T, f) \
h = rad_abi_layout_mix(h, offsetof(T, f)); \
h = rad_abi_layout_mix(h, sizeof(((T*)0)->f));
#include "rad_abi_layout_rows.h"
#undef ABI_STRUCT
#undef ABI_FIELD
return h;
}
/* The export the loader reads beside rad_plugin_abi_version: written once in a plugin, at file
* scope. */
#ifdef __cplusplus
#define RAD_PLUGIN_ABI_LAYOUT_EXPORT \
extern "C" uint64_t rad_plugin_abi_layout(void) { return rad_abi_layout(); }
#else
#define RAD_PLUGIN_ABI_LAYOUT_EXPORT \
uint64_t rad_plugin_abi_layout(void) { return rad_abi_layout(); }
#endif
#endif /* RAD_ABI_LAYOUT_H */
+894
View File
@@ -0,0 +1,894 @@
/* rad_abi_layout_rows.h -- every struct abi/ exports and each of its top-level fields, as
* ABI_STRUCT(type) and ABI_FIELD(type, field) lines; the includer defines both. rad_abi_layout.h
* hashes them into the layout fingerprint every plugin exports, and tests/abi_c_test.c and
* tests/abi_layout_test.cpp list them, so the C and C++ translation units see the same rows.
*
* A struct or field added to abi/ is added here too: abi_layout_test fails on a struct whose
* listed fields do not account for its size. Included once per table, so it has no include guard.
*/
ABI_STRUCT(RadArchProbe)
ABI_FIELD(RadArchProbe, draft_depth)
ABI_FIELD(RadArchProbe, draft_depth_fixed)
ABI_FIELD(RadArchProbe, shape_probe_ok)
ABI_FIELD(RadArchProbe, enc_merge)
ABI_FIELD(RadArchProbe, audio_frames)
ABI_FIELD(RadArchProbe, gen_rows)
ABI_FIELD(RadArchProbe, gen_patches)
ABI_FIELD(RadArchProbe, gen_audio)
ABI_FIELD(RadArchProbe, gen_ctx)
ABI_FIELD(RadArchProbe, gen_video)
ABI_FIELD(RadArchProbe, kv_quant_ok)
ABI_FIELD(RadArchProbe, chain_pays)
ABI_FIELD(RadArchProbe, kv_stream_ok)
ABI_FIELD(RadArchProbe, control_vector_ok)
ABI_FIELD(RadArchProbe, tp_attn_rows_ok)
ABI_FIELD(RadArchProbe, state_f16_ok)
ABI_FIELD(RadArchProbe, tree_pays)
ABI_FIELD(RadArchProbe, gen_max_pixels)
ABI_FIELD(RadArchProbe, gen_max_refs)
ABI_STRUCT(RadArgs)
ABI_FIELD(RadArgs, t)
ABI_FIELD(RadArgs, n_t)
ABI_FIELD(RadArgs, p)
ABI_FIELD(RadArgs, n_p)
ABI_FIELD(RadArgs, scratch)
ABI_FIELD(RadArgs, scratch_bytes)
ABI_FIELD(RadArgs, instance)
ABI_FIELD(RadArgs, rank)
ABI_FIELD(RadArgs, world_size)
ABI_STRUCT(RadBatch)
ABI_FIELD(RadBatch, phase)
ABI_FIELD(RadBatch, step)
ABI_FIELD(RadBatch, n_tok)
ABI_FIELD(RadBatch, n_seq)
ABI_FIELD(RadBatch, token_ids)
ABI_FIELD(RadBatch, positions)
ABI_FIELD(RadBatch, cu_seqlens)
ABI_FIELD(RadBatch, seq_ids)
ABI_FIELD(RadBatch, lora_slot)
ABI_FIELD(RadBatch, n_out)
ABI_FIELD(RadBatch, out_ids)
ABI_FIELD(RadBatch, q_lens)
ABI_FIELD(RadBatch, ctx_lens)
ABI_FIELD(RadBatch, max_q_len)
ABI_FIELD(RadBatch, max_ctx_len)
ABI_FIELD(RadBatch, n_kv_groups)
ABI_FIELD(RadBatch, kv)
ABI_FIELD(RadBatch, n_spec)
ABI_FIELD(RadBatch, num_accepted)
ABI_FIELD(RadBatch, spec_parent)
ABI_FIELD(RadBatch, draft_pass)
ABI_FIELD(RadBatch, n_checkpoints)
ABI_FIELD(RadBatch, checkpoint_tok)
ABI_FIELD(RadBatch, checkpoint_slot)
ABI_FIELD(RadBatch, n_seq_decode)
ABI_FIELD(RadBatch, n_tok_decode)
ABI_FIELD(RadBatch, max_q_len_decode)
ABI_FIELD(RadBatch, max_q_len_prefill)
ABI_FIELD(RadBatch, n_draft_out)
ABI_FIELD(RadBatch, draft_out_ids)
ABI_FIELD(RadBatch, n_ahead)
ABI_FIELD(RadBatch, rope_pos)
ABI_FIELD(RadBatch, rope_mixed)
ABI_FIELD(RadBatch, n_mm_rows)
ABI_FIELD(RadBatch, mm_rows)
ABI_FIELD(RadBatch, mm_embd)
ABI_FIELD(RadBatch, enc)
ABI_FIELD(RadBatch, enc_n_patch)
ABI_FIELD(RadBatch, enc_pixels)
ABI_FIELD(RadBatch, enc_coord)
ABI_FIELD(RadBatch, enc_n_seg)
ABI_FIELD(RadBatch, enc_cu)
ABI_FIELD(RadBatch, enc_max_seg)
ABI_FIELD(RadBatch, gen)
ABI_FIELD(RadBatch, gen_b)
ABI_FIELD(RadBatch, agen_b)
ABI_FIELD(RadBatch, vgen_b)
ABI_FIELD(RadBatch, control_vector)
ABI_FIELD(RadBatch, enc_seg_h)
ABI_FIELD(RadBatch, enc_seg_w)
ABI_FIELD(RadBatch, score_only)
ABI_FIELD(RadBatch, n_plugin_words)
ABI_FIELD(RadBatch, plugin_words)
ABI_FIELD(RadBatch, plugin_cu)
ABI_FIELD(RadBatch, plugin_words_h)
ABI_FIELD(RadBatch, plugin_cu_h)
ABI_STRUCT(RadBufDecl)
ABI_FIELD(RadBufDecl, dtype)
ABI_FIELD(RadBufDecl, rank)
ABI_FIELD(RadBufDecl, shape)
ABI_FIELD(RadBufDecl, kind)
ABI_FIELD(RadBufDecl, domain)
ABI_FIELD(RadBufDecl, derive)
ABI_FIELD(RadBufDecl, kv)
ABI_STRUCT(RadBuildCtx)
ABI_FIELD(RadBuildCtx, rank)
ABI_FIELD(RadBuildCtx, world_size)
ABI_FIELD(RadBuildCtx, max_tok)
ABI_FIELD(RadBuildCtx, max_seqs)
ABI_FIELD(RadBuildCtx, max_ctx)
ABI_FIELD(RadBuildCtx, max_spec)
ABI_FIELD(RadBuildCtx, tp_wire_lossy)
ABI_FIELD(RadBuildCtx, tp_wire_min_bytes)
ABI_FIELD(RadBuildCtx, kv_dtype)
ABI_FIELD(RadBuildCtx, is_draft)
ABI_FIELD(RadBuildCtx, scope)
ABI_FIELD(RadBuildCtx, shape_probe)
ABI_FIELD(RadBuildCtx, max_enc_patches)
ABI_FIELD(RadBuildCtx, max_out_rows)
ABI_FIELD(RadBuildCtx, max_audio_frames)
ABI_FIELD(RadBuildCtx, max_mixed_tok)
ABI_FIELD(RadBuildCtx, kv_quant)
ABI_FIELD(RadBuildCtx, attn_prefill_fp8)
ABI_FIELD(RadBuildCtx, kv_resident_blocks)
ABI_FIELD(RadBuildCtx, kv_stream_ok)
ABI_FIELD(RadBuildCtx, cvec)
ABI_FIELD(RadBuildCtx, tp_attn_rows)
ABI_FIELD(RadBuildCtx, state_dtype)
ABI_FIELD(RadBuildCtx, draft_coupling)
ABI_FIELD(RadBuildCtx, weight_prefetch_off)
ABI_FIELD(RadBuildCtx, draft_tree)
ABI_FIELD(RadBuildCtx, calib_dir)
ABI_FIELD(RadBuildCtx, calib_layer_lo)
ABI_FIELD(RadBuildCtx, calib_layer_hi)
ABI_FIELD(RadBuildCtx, calib_tokens)
ABI_FIELD(RadBuildCtx, gen_max_pixels)
ABI_FIELD(RadBuildCtx, gen_max_refs)
ABI_STRUCT(RadAudioGenBatch)
ABI_FIELD(RadAudioGenBatch, n_lane)
ABI_FIELD(RadAudioGenBatch, lane)
ABI_FIELD(RadAudioGenBatch, lane_h)
ABI_FIELD(RadAudioGenBatch, last)
ABI_FIELD(RadAudioGenBatch, last_h)
ABI_FIELD(RadAudioGenBatch, frame)
ABI_FIELD(RadAudioGenBatch, frame_h)
ABI_FIELD(RadAudioGenBatch, seed)
ABI_FIELD(RadAudioGenBatch, slot)
ABI_FIELD(RadAudioGenBatch, last_row)
ABI_FIELD(RadAudioGenBatch, prefix)
ABI_FIELD(RadAudioGenBatch, t)
ABI_FIELD(RadAudioGenBatch, t_next)
ABI_FIELD(RadAudioGenBatch, cfg)
ABI_FIELD(RadAudioGenBatch, pair)
ABI_FIELD(RadAudioGenBatch, win_lane)
ABI_FIELD(RadAudioGenBatch, win_lane_h)
ABI_FIELD(RadAudioGenBatch, flags)
ABI_FIELD(RadAudioGenBatch, flags_h)
ABI_FIELD(RadAudioGenBatch, win_index)
ABI_FIELD(RadAudioGenBatch, win_index_h)
ABI_FIELD(RadAudioGenBatch, win_frame0)
ABI_FIELD(RadAudioGenBatch, win_frame0_h)
ABI_FIELD(RadAudioGenBatch, win_frames)
ABI_FIELD(RadAudioGenBatch, win_frames_h)
ABI_FIELD(RadAudioGenBatch, lat_rows)
ABI_FIELD(RadAudioGenBatch, lat_cu)
ABI_FIELD(RadAudioGenBatch, lat_cu_h)
ABI_FIELD(RadAudioGenBatch, lat_src)
ABI_FIELD(RadAudioGenBatch, voc_lane)
ABI_FIELD(RadAudioGenBatch, voc_window)
ABI_FIELD(RadAudioGenBatch, voc_latents)
ABI_FIELD(RadAudioGenBatch, voc_left)
ABI_FIELD(RadAudioGenBatch, voc_right)
ABI_FIELD(RadAudioGenBatch, voc_frame0)
ABI_FIELD(RadAudioGenBatch, prev_slot)
ABI_FIELD(RadAudioGenBatch, prev_pos)
ABI_FIELD(RadAudioGenBatch, prev_used)
ABI_FIELD(RadAudioGenBatch, n_ref)
ABI_FIELD(RadAudioGenBatch, ref_samples)
ABI_FIELD(RadAudioGenBatch, ref_audio)
ABI_FIELD(RadAudioGenBatch, ref_cu)
ABI_FIELD(RadAudioGenBatch, ref_cu_h)
ABI_FIELD(RadAudioGenBatch, ref_frame)
ABI_FIELD(RadAudioGenBatch, ref_frame_h)
ABI_STRUCT(RadAudioGenDecl)
ABI_FIELD(RadAudioGenDecl, name)
ABI_FIELD(RadAudioGenDecl, tmpl)
ABI_FIELD(RadAudioGenDecl, neg_token)
ABI_FIELD(RadAudioGenDecl, neg_keep_head)
ABI_FIELD(RadAudioGenDecl, neg_keep_tail)
ABI_FIELD(RadAudioGenDecl, max_prompt)
ABI_FIELD(RadAudioGenDecl, max_frames)
ABI_FIELD(RadAudioGenDecl, frame_rate_num)
ABI_FIELD(RadAudioGenDecl, frame_rate_den)
ABI_FIELD(RadAudioGenDecl, win_frames)
ABI_FIELD(RadAudioGenDecl, win_hop)
ABI_FIELD(RadAudioGenDecl, win_lead)
ABI_FIELD(RadAudioGenDecl, lat_num)
ABI_FIELD(RadAudioGenDecl, lat_den)
ABI_FIELD(RadAudioGenDecl, latent_channels)
ABI_FIELD(RadAudioGenDecl, win_crop_left)
ABI_FIELD(RadAudioGenDecl, win_crop_right)
ABI_FIELD(RadAudioGenDecl, samples_per_latent)
ABI_FIELD(RadAudioGenDecl, sample_rate)
ABI_FIELD(RadAudioGenDecl, channels)
ABI_FIELD(RadAudioGenDecl, default_steps)
ABI_FIELD(RadAudioGenDecl, default_cfg)
ABI_FIELD(RadAudioGenDecl, max_lanes)
ABI_FIELD(RadAudioGenDecl, status)
ABI_FIELD(RadAudioGenDecl, audio_out)
ABI_FIELD(RadAudioGenDecl, tmpl_plain)
ABI_FIELD(RadAudioGenDecl, neg_tmpl)
ABI_FIELD(RadAudioGenDecl, prompt_whole)
ABI_FIELD(RadAudioGenDecl, first_frame)
ABI_FIELD(RadAudioGenDecl, voc_chunk)
ABI_FIELD(RadAudioGenDecl, voc_context)
ABI_FIELD(RadAudioGenDecl, branches)
ABI_FIELD(RadAudioGenDecl, input_special)
ABI_FIELD(RadAudioGenDecl, tmpl_ref)
ABI_FIELD(RadAudioGenDecl, ref_item)
ABI_FIELD(RadAudioGenDecl, ref_rate)
ABI_FIELD(RadAudioGenDecl, ref_hop)
ABI_FIELD(RadAudioGenDecl, ref_max_samples)
ABI_FIELD(RadAudioGenDecl, ref_max)
ABI_STRUCT(RadControlVector)
ABI_FIELD(RadControlVector, dir)
ABI_FIELD(RadControlVector, scales)
ABI_FIELD(RadControlVector, n_embd)
ABI_FIELD(RadControlVector, n_layers)
ABI_STRUCT(RadAudioFormat)
ABI_FIELD(RadAudioFormat, struct_size)
ABI_FIELD(RadAudioFormat, audio_open)
ABI_FIELD(RadAudioFormat, audio_close)
ABI_FIELD(RadAudioFormat, transcribe_prompt)
ABI_FIELD(RadAudioFormat, language_prompt)
ABI_FIELD(RadAudioFormat, transcript_open)
ABI_FIELD(RadAudioFormat, language_lead)
ABI_FIELD(RadAudioFormat, languages)
ABI_FIELD(RadAudioFormat, n_languages)
ABI_STRUCT(RadChatFormat)
ABI_FIELD(RadChatFormat, struct_size)
ABI_FIELD(RadChatFormat, name)
ABI_FIELD(RadChatFormat, reasoning_open)
ABI_FIELD(RadChatFormat, reasoning_close)
ABI_FIELD(RadChatFormat, reasoning_breaks)
ABI_FIELD(RadChatFormat, n_reasoning_breaks)
ABI_FIELD(RadChatFormat, reasoning_in_prompt)
ABI_FIELD(RadChatFormat, section_open)
ABI_FIELD(RadChatFormat, section_close)
ABI_FIELD(RadChatFormat, call_separator)
ABI_FIELD(RadChatFormat, call_open)
ABI_FIELD(RadChatFormat, call_close)
ABI_FIELD(RadChatFormat, name_prefix)
ABI_FIELD(RadChatFormat, name_suffix)
ABI_FIELD(RadChatFormat, call_end)
ABI_FIELD(RadChatFormat, arg_prefix)
ABI_FIELD(RadChatFormat, arg_name_suffix)
ABI_FIELD(RadChatFormat, arg_value_prefix)
ABI_FIELD(RadChatFormat, arg_value_suffix)
ABI_FIELD(RadChatFormat, string_value)
ABI_FIELD(RadChatFormat, other_value)
ABI_FIELD(RadChatFormat, value_newlines)
ABI_FIELD(RadChatFormat, triggers)
ABI_FIELD(RadChatFormat, n_triggers)
ABI_FIELD(RadChatFormat, args_form)
ABI_FIELD(RadChatFormat, object_string_open)
ABI_FIELD(RadChatFormat, object_string_close)
ABI_FIELD(RadChatFormat, object_bare_keys)
ABI_FIELD(RadChatFormat, reasoning_anywhere)
ABI_FIELD(RadChatFormat, arg_json_value_prefix)
ABI_STRUCT(RadConstraint)
ABI_FIELD(RadConstraint, key)
ABI_FIELD(RadConstraint, op)
ABI_FIELD(RadConstraint, ival)
ABI_FIELD(RadConstraint, sval)
ABI_STRUCT(RadDeviceProps)
ABI_FIELD(RadDeviceProps, name)
ABI_FIELD(RadDeviceProps, arch)
ABI_FIELD(RadDeviceProps, device_id)
ABI_FIELD(RadDeviceProps, n_cu)
ABI_FIELD(RadDeviceProps, warp_size)
ABI_FIELD(RadDeviceProps, vram_bytes)
ABI_FIELD(RadDeviceProps, vram_free)
ABI_FIELD(RadDeviceProps, lds_bytes)
ABI_FIELD(RadDeviceProps, supports_p2p)
ABI_FIELD(RadDeviceProps, is_host_backend)
ABI_FIELD(RadDeviceProps, unified)
ABI_STRUCT(RadDrafterDecl)
ABI_FIELD(RadDrafterDecl, name)
ABI_FIELD(RadDrafterDecl, kind)
ABI_FIELD(RadDrafterDecl, depth)
ABI_FIELD(RadDrafterDecl, proposal)
ABI_FIELD(RadDrafterDecl, proposal_pitch)
ABI_FIELD(RadDrafterDecl, mask_token)
ABI_FIELD(RadDrafterDecl, window)
ABI_FIELD(RadDrafterDecl, block)
ABI_STRUCT(RadDtRow)
ABI_FIELD(RadDtRow, dt)
ABI_FIELD(RadDtRow, name)
ABI_FIELD(RadDtRow, bits)
ABI_STRUCT(RadEncPlane)
ABI_FIELD(RadEncPlane, role)
ABI_FIELD(RadEncPlane, dtype)
ABI_FIELD(RadEncPlane, kind)
ABI_FIELD(RadEncPlane, block)
ABI_FIELD(RadEncPlane, extent)
ABI_STRUCT(RadEncoderDecl)
ABI_FIELD(RadEncoderDecl, name)
ABI_FIELD(RadEncoderDecl, modalities)
ABI_FIELD(RadEncoderDecl, patch_dim)
ABI_FIELD(RadEncoderDecl, merge)
ABI_FIELD(RadEncoderDecl, max_patches)
ABI_FIELD(RadEncoderDecl, n_embd)
ABI_FIELD(RadEncoderDecl, out)
ABI_FIELD(RadEncoderDecl, one_grid)
ABI_STRUCT(RadEncoding)
ABI_FIELD(RadEncoding, scheme)
ABI_FIELD(RadEncoding, transform)
ABI_FIELD(RadEncoding, n_planes)
ABI_FIELD(RadEncoding, reserved)
ABI_FIELD(RadEncoding, plane)
ABI_STRUCT(RadFileEntry)
ABI_FIELD(RadFileEntry, name)
ABI_FIELD(RadFileEntry, quantizer)
ABI_FIELD(RadFileEntry, options)
ABI_FIELD(RadFileEntry, enc)
ABI_FIELD(RadFileEntry, rank)
ABI_FIELD(RadFileEntry, shape)
ABI_FIELD(RadFileEntry, layer)
ABI_FIELD(RadFileEntry, expert)
ABI_FIELD(RadFileEntry, slot)
ABI_FIELD(RadFileEntry, n_planes)
ABI_FIELD(RadFileEntry, plane_first)
ABI_FIELD(RadFileEntry, offset)
ABI_FIELD(RadFileEntry, bytes)
ABI_FIELD(RadFileEntry, reserved)
ABI_STRUCT(RadFileHeader)
ABI_FIELD(RadFileHeader, magic)
ABI_FIELD(RadFileHeader, version)
ABI_FIELD(RadFileHeader, file_bytes)
ABI_FIELD(RadFileHeader, arch_id)
ABI_FIELD(RadFileHeader, model_name)
ABI_FIELD(RadFileHeader, quant)
ABI_FIELD(RadFileHeader, recipe)
ABI_FIELD(RadFileHeader, created_by)
ABI_FIELD(RadFileHeader, str_off)
ABI_FIELD(RadFileHeader, str_bytes)
ABI_FIELD(RadFileHeader, meta_off)
ABI_FIELD(RadFileHeader, meta_count)
ABI_FIELD(RadFileHeader, dir_off)
ABI_FIELD(RadFileHeader, dir_count)
ABI_FIELD(RadFileHeader, plane_off)
ABI_FIELD(RadFileHeader, plane_count)
ABI_FIELD(RadFileHeader, enc_off)
ABI_FIELD(RadFileHeader, enc_count)
ABI_FIELD(RadFileHeader, vocab_off)
ABI_FIELD(RadFileHeader, vocab_bytes)
ABI_FIELD(RadFileHeader, prof_off)
ABI_FIELD(RadFileHeader, prof_count)
ABI_FIELD(RadFileHeader, data_off)
ABI_FIELD(RadFileHeader, data_bytes)
ABI_FIELD(RadFileHeader, reserved)
ABI_STRUCT(RadFileKV)
ABI_FIELD(RadFileKV, key)
ABI_FIELD(RadFileKV, type)
ABI_FIELD(RadFileKV, pad)
ABI_FIELD(RadFileKV, v)
ABI_STRUCT(RadFilePlane)
ABI_FIELD(RadFilePlane, offset)
ABI_FIELD(RadFilePlane, bytes)
ABI_STRUCT(RadFileProfile)
ABI_FIELD(RadFileProfile, layer)
ABI_FIELD(RadFileProfile, expert)
ABI_FIELD(RadFileProfile, share)
ABI_FIELD(RadFileProfile, reserved)
ABI_STRUCT(RadFuseStep)
ABI_FIELD(RadFuseStep, op)
ABI_FIELD(RadFuseStep, p)
ABI_FIELD(RadFuseStep, n_p)
ABI_FIELD(RadFuseStep, from)
ABI_FIELD(RadFuseStep, n_from)
ABI_STRUCT(RadGenBatch)
ABI_FIELD(RadGenBatch, rows)
ABI_FIELD(RadGenBatch, src)
ABI_FIELD(RadGenBatch, rope)
ABI_FIELD(RadGenBatch, n_seg)
ABI_FIELD(RadGenBatch, seg)
ABI_FIELD(RadGenBatch, seg_h)
ABI_FIELD(RadGenBatch, seg_bidi_h)
ABI_FIELD(RadGenBatch, seg_cu)
ABI_FIELD(RadGenBatch, seg_start)
ABI_FIELD(RadGenBatch, slot_mapping)
ABI_FIELD(RadGenBatch, n_px)
ABI_FIELD(RadGenBatch, px)
ABI_FIELD(RadGenBatch, px_h)
ABI_FIELD(RadGenBatch, px_cu)
ABI_FIELD(RadGenBatch, inpaint)
ABI_FIELD(RadGenBatch, inp_mask)
ABI_FIELD(RadGenBatch, n_lane)
ABI_FIELD(RadGenBatch, lane_h)
ABI_FIELD(RadGenBatch, sigma)
ABI_FIELD(RadGenBatch, sigma_next)
ABI_FIELD(RadGenBatch, cfg)
ABI_FIELD(RadGenBatch, pair)
ABI_FIELD(RadGenBatch, lane)
ABI_FIELD(RadGenBatch, lane_dh)
ABI_FIELD(RadGenBatch, flags)
ABI_FIELD(RadGenBatch, seed)
ABI_FIELD(RadGenBatch, dec_lane)
ABI_FIELD(RadGenBatch, dec_height)
ABI_FIELD(RadGenBatch, dec_width)
ABI_FIELD(RadGenBatch, dec_preview)
ABI_FIELD(RadGenBatch, branch)
ABI_FIELD(RadGenBatch, n_pad)
ABI_FIELD(RadGenBatch, valid_cu)
ABI_FIELD(RadGenBatch, n_img)
ABI_FIELD(RadGenBatch, img_cu)
ABI_FIELD(RadGenBatch, img_rows)
ABI_FIELD(RadGenBatch, mode_cu)
ABI_FIELD(RadGenBatch, rope_f)
ABI_FIELD(RadGenBatch, mode_rows)
ABI_FIELD(RadGenBatch, mode_src)
ABI_FIELD(RadGenBatch, mode_ccu)
ABI_FIELD(RadGenBatch, n_mode_h)
ABI_FIELD(RadGenBatch, mode_rope_f)
ABI_FIELD(RadGenBatch, n_aux)
ABI_FIELD(RadGenBatch, aux_ids)
ABI_FIELD(RadGenBatch, aux_cu)
ABI_FIELD(RadGenBatch, sigma_prev)
ABI_FIELD(RadGenBatch, timestep)
ABI_FIELD(RadGenBatch, sampler)
ABI_FIELD(RadGenBatch, step)
ABI_FIELD(RadGenBatch, size_px)
ABI_FIELD(RadGenBatch, entry_h)
ABI_FIELD(RadGenBatch, tokens_h)
ABI_FIELD(RadGenBatch, cond_opts)
ABI_STRUCT(RadGeneratorDecl)
ABI_FIELD(RadGeneratorDecl, name)
ABI_FIELD(RadGeneratorDecl, layout)
ABI_FIELD(RadGeneratorDecl, tmpl_text)
ABI_FIELD(RadGeneratorDecl, tmpl_edit)
ABI_FIELD(RadGeneratorDecl, tmpl_image)
ABI_FIELD(RadGeneratorDecl, tmpl_image_sep)
ABI_FIELD(RadGeneratorDecl, drop_prefix)
ABI_FIELD(RadGeneratorDecl, tmpl_transparent)
ABI_FIELD(RadGeneratorDecl, latent_channels)
ABI_FIELD(RadGeneratorDecl, latent_scale)
ABI_FIELD(RadGeneratorDecl, size_multiple)
ABI_FIELD(RadGeneratorDecl, pixel_channels)
ABI_FIELD(RadGeneratorDecl, slot_rows)
ABI_FIELD(RadGeneratorDecl, max_tokens)
ABI_FIELD(RadGeneratorDecl, max_refs)
ABI_FIELD(RadGeneratorDecl, ref_area)
ABI_FIELD(RadGeneratorDecl, default_width)
ABI_FIELD(RadGeneratorDecl, default_height)
ABI_FIELD(RadGeneratorDecl, default_steps)
ABI_FIELD(RadGeneratorDecl, n_sigmas)
ABI_FIELD(RadGeneratorDecl, sigmas)
ABI_FIELD(RadGeneratorDecl, shift)
ABI_FIELD(RadGeneratorDecl, dyn_shift)
ABI_FIELD(RadGeneratorDecl, shift_exp)
ABI_FIELD(RadGeneratorDecl, base_shift)
ABI_FIELD(RadGeneratorDecl, max_shift)
ABI_FIELD(RadGeneratorDecl, base_seq)
ABI_FIELD(RadGeneratorDecl, max_seq)
ABI_FIELD(RadGeneratorDecl, shift_terminal)
ABI_FIELD(RadGeneratorDecl, default_cfg)
ABI_FIELD(RadGeneratorDecl, max_lanes)
ABI_FIELD(RadGeneratorDecl, image_out)
ABI_FIELD(RadGeneratorDecl, cond_rows)
ABI_FIELD(RadGeneratorDecl, rope_hw_scale)
ABI_FIELD(RadGeneratorDecl, rope_text_l)
ABI_FIELD(RadGeneratorDecl, pad_multiple)
ABI_FIELD(RadGeneratorDecl, pad_token)
ABI_FIELD(RadGeneratorDecl, cfg_original)
ABI_FIELD(RadGeneratorDecl, default_negative)
ABI_FIELD(RadGeneratorDecl, ref_shrink_only)
ABI_FIELD(RadGeneratorDecl, aux_max_tokens)
ABI_FIELD(RadGeneratorDecl, sigma_grid)
ABI_FIELD(RadGeneratorDecl, min_tokens)
ABI_FIELD(RadGeneratorDecl, aux_tokens)
ABI_FIELD(RadGeneratorDecl, beta_start)
ABI_FIELD(RadGeneratorDecl, beta_end)
ABI_FIELD(RadGeneratorDecl, train_steps)
ABI_FIELD(RadGeneratorDecl, beta_schedule)
ABI_FIELD(RadGeneratorDecl, zero_snr)
ABI_FIELD(RadGeneratorDecl, samplers)
ABI_FIELD(RadGeneratorDecl, default_sampler)
ABI_FIELD(RadGeneratorDecl, default_scheduler)
ABI_FIELD(RadGeneratorDecl, chunk_tokens)
ABI_FIELD(RadGeneratorDecl, chunk_bos)
ABI_FIELD(RadGeneratorDecl, chunk_eos)
ABI_FIELD(RadGeneratorDecl, cond_opts)
ABI_STRUCT(RadKVGroupBatch)
ABI_FIELD(RadKVGroupBatch, group)
ABI_FIELD(RadKVGroupBatch, slot_mapping)
ABI_FIELD(RadKVGroupBatch, block_table)
ABI_FIELD(RadKVGroupBatch, block_table_pitch)
ABI_FIELD(RadKVGroupBatch, seqused)
ABI_FIELD(RadKVGroupBatch, state_index)
ABI_FIELD(RadKVGroupBatch, state_index_pitch)
ABI_FIELD(RadKVGroupBatch, block_size)
ABI_FIELD(RadKVGroupBatch, max_blocks)
ABI_FIELD(RadKVGroupBatch, stream)
ABI_STRUCT(RadKVGroupDecl)
ABI_FIELD(RadKVGroupDecl, kind)
ABI_FIELD(RadKVGroupDecl, dtype)
ABI_FIELD(RadKVGroupDecl, window)
ABI_FIELD(RadKVGroupDecl, n_head_kv)
ABI_FIELD(RadKVGroupDecl, head_dim)
ABI_FIELD(RadKVGroupDecl, state_dim)
ABI_FIELD(RadKVGroupDecl, conv_width)
ABI_STRUCT(RadKVStream)
ABI_FIELD(RadKVStream, host)
ABI_FIELD(RadKVStream, res)
ABI_FIELD(RadKVStream, slot_block)
ABI_FIELD(RadKVStream, slot_state)
ABI_FIELD(RadKVStream, ctl)
ABI_FIELD(RadKVStream, block_bytes)
ABI_FIELD(RadKVStream, host_layer_stride)
ABI_FIELD(RadKVStream, slots)
ABI_FIELD(RadKVStream, host_bytes)
ABI_STRUCT(RadKernelInfo)
ABI_FIELD(RadKernelInfo, name)
ABI_FIELD(RadKernelInfo, op)
ABI_FIELD(RadKernelInfo, family)
ABI_FIELD(RadKernelInfo, computes)
ABI_FIELD(RadKernelInfo, shape)
ABI_FIELD(RadKernelInfo, dtypes)
ABI_FIELD(RadKernelInfo, domain)
ABI_FIELD(RadKernelInfo, priority)
ABI_FIELD(RadKernelInfo, constraints)
ABI_FIELD(RadKernelInfo, n_constraints)
ABI_FIELD(RadKernelInfo, tunables)
ABI_FIELD(RadKernelInfo, n_tunables)
ABI_FIELD(RadKernelInfo, tune_valid)
ABI_FIELD(RadKernelInfo, init)
ABI_FIELD(RadKernelInfo, fini)
ABI_FIELD(RadKernelInfo, launch)
ABI_FIELD(RadKernelInfo, scratch)
ABI_FIELD(RadKernelInfo, layout)
ABI_FIELD(RadKernelInfo, relayout)
ABI_FIELD(RadKernelInfo, opd_shape)
ABI_FIELD(RadKernelInfo, unrelayout)
ABI_FIELD(RadKernelInfo, replaces)
ABI_STRUCT(RadLayout)
ABI_FIELD(RadLayout, tag)
ABI_FIELD(RadLayout, dtype)
ABI_FIELD(RadLayout, rank)
ABI_FIELD(RadLayout, shape)
ABI_FIELD(RadLayout, align)
ABI_FIELD(RadLayout, bytes)
ABI_STRUCT(RadModelMeta)
ABI_FIELD(RadModelMeta, arch_id)
ABI_FIELD(RadModelMeta, name)
ABI_FIELD(RadModelMeta, quant)
ABI_FIELD(RadModelMeta, n_layers)
ABI_FIELD(RadModelMeta, n_embd)
ABI_FIELD(RadModelMeta, n_head)
ABI_FIELD(RadModelMeta, n_head_kv)
ABI_FIELD(RadModelMeta, head_dim)
ABI_FIELD(RadModelMeta, n_ff)
ABI_FIELD(RadModelMeta, n_vocab)
ABI_FIELD(RadModelMeta, n_ctx_train)
ABI_FIELD(RadModelMeta, n_expert)
ABI_FIELD(RadModelMeta, n_expert_used)
ABI_FIELD(RadModelMeta, n_expert_shared)
ABI_FIELD(RadModelMeta, rms_eps)
ABI_FIELD(RadModelMeta, rope_theta)
ABI_FIELD(RadModelMeta, rope_scale)
ABI_FIELD(RadModelMeta, n_kv)
ABI_FIELD(RadModelMeta, kv_key)
ABI_FIELD(RadModelMeta, kv_val)
ABI_STRUCT(RadNameMap)
ABI_FIELD(RadNameMap, declared)
ABI_FIELD(RadNameMap, mode)
ABI_FIELD(RadNameMap, n_src)
ABI_FIELD(RadNameMap, src)
ABI_FIELD(RadNameMap, concat_dim)
ABI_FIELD(RadNameMap, src_index)
ABI_FIELD(RadNameMap, src_rows)
ABI_STRUCT(RadOpSchema)
ABI_FIELD(RadOpSchema, op)
ABI_FIELD(RadOpSchema, params)
ABI_FIELD(RadOpSchema, n_params)
ABI_FIELD(RadOpSchema, operands)
ABI_FIELD(RadOpSchema, n_operands)
ABI_FIELD(RadOpSchema, doc)
ABI_STRUCT(RadOpdDesc)
ABI_FIELD(RadOpdDesc, dtype)
ABI_FIELD(RadOpdDesc, rank)
ABI_FIELD(RadOpdDesc, shape)
ABI_FIELD(RadOpdDesc, fill)
ABI_FIELD(RadOpdDesc, fill_chunk)
ABI_FIELD(RadOpdDesc, idx_max)
ABI_FIELD(RadOpdDesc, idx_const)
ABI_FIELD(RadOpdDesc, flags)
ABI_STRUCT(RadOperand)
ABI_FIELD(RadOperand, kind)
ABI_FIELD(RadOperand, dtype)
ABI_FIELD(RadOperand, handle)
ABI_FIELD(RadOperand, raw)
ABI_FIELD(RadOperand, offset)
ABI_FIELD(RadOperand, rows)
ABI_FIELD(RadOperand, cols)
ABI_STRUCT(RadOperandSpec)
ABI_FIELD(RadOperandSpec, name)
ABI_FIELD(RadOperandSpec, role)
ABI_FIELD(RadOperandSpec, optional)
ABI_STRUCT(RadParam)
ABI_FIELD(RadParam, key)
ABI_FIELD(RadParam, kind)
ABI_FIELD(RadParam, ival)
ABI_FIELD(RadParam, ihi)
ABI_FIELD(RadParam, sval)
ABI_FIELD(RadParam, dval)
ABI_STRUCT(RadParamSpec)
ABI_FIELD(RadParamSpec, key)
ABI_FIELD(RadParamSpec, type)
ABI_FIELD(RadParamSpec, required)
ABI_FIELD(RadParamSpec, role)
ABI_STRUCT(RadPlanesEntry)
ABI_FIELD(RadPlanesEntry, role)
ABI_FIELD(RadPlanesEntry, dtype)
ABI_FIELD(RadPlanesEntry, kind)
ABI_FIELD(RadPlanesEntry, block)
ABI_FIELD(RadPlanesEntry, rows)
ABI_FIELD(RadPlanesEntry, cols)
ABI_FIELD(RadPlanesEntry, row_bytes)
ABI_FIELD(RadPlanesEntry, offset)
ABI_STRUCT(RadPlanesHeader)
ABI_FIELD(RadPlanesHeader, magic)
ABI_FIELD(RadPlanesHeader, n_planes)
ABI_FIELD(RadPlanesHeader, transform)
ABI_FIELD(RadPlanesHeader, bytes)
ABI_STRUCT(RadPluginInfo)
ABI_FIELD(RadPluginInfo, kind)
ABI_FIELD(RadPluginInfo, name)
ABI_FIELD(RadPluginInfo, version)
ABI_FIELD(RadPluginInfo, description)
ABI_FIELD(RadPluginInfo, build_target)
ABI_STRUCT(RadPrefetchNext)
ABI_FIELD(RadPrefetchNext, layer)
ABI_FIELD(RadPrefetchNext, router)
ABI_FIELD(RadPrefetchNext, n_expert)
ABI_FIELD(RadPrefetchNext, top_k)
ABI_FIELD(RadPrefetchNext, n_parts)
ABI_FIELD(RadPrefetchNext, parts)
ABI_FIELD(RadPrefetchNext, count_at)
ABI_STRUCT(RadQuantOption)
ABI_FIELD(RadQuantOption, key)
ABI_FIELD(RadQuantOption, type)
ABI_FIELD(RadQuantOption, deflt)
ABI_FIELD(RadQuantOption, doc)
ABI_STRUCT(RadQuantWeight)
ABI_FIELD(RadQuantWeight, name)
ABI_FIELD(RadQuantWeight, rank)
ABI_FIELD(RadQuantWeight, shape)
ABI_FIELD(RadQuantWeight, rows)
ABI_FIELD(RadQuantWeight, cols)
ABI_FIELD(RadQuantWeight, layer)
ABI_FIELD(RadQuantWeight, expert)
ABI_FIELD(RadQuantWeight, importance)
ABI_STRUCT(RadQuantizerInfo)
ABI_FIELD(RadQuantizerInfo, name)
ABI_FIELD(RadQuantizerInfo, doc)
ABI_FIELD(RadQuantizerInfo, options)
ABI_FIELD(RadQuantizerInfo, n_options)
ABI_FIELD(RadQuantizerInfo, encoding)
ABI_FIELD(RadQuantizerInfo, row_block)
ABI_FIELD(RadQuantizerInfo, quantize)
ABI_FIELD(RadQuantizerInfo, decode)
ABI_STRUCT(RadRouting)
ABI_FIELD(RadRouting, expert_ids)
ABI_FIELD(RadRouting, expert_w)
ABI_FIELD(RadRouting, expert_count)
ABI_FIELD(RadRouting, sorted_tok)
ABI_FIELD(RadRouting, expert_offset)
ABI_FIELD(RadRouting, top_k)
ABI_FIELD(RadRouting, n_expert)
ABI_STRUCT(RadSampleParams)
ABI_FIELD(RadSampleParams, seed)
ABI_FIELD(RadSampleParams, pos)
ABI_FIELD(RadSampleParams, temp)
ABI_FIELD(RadSampleParams, top_p)
ABI_FIELD(RadSampleParams, min_p)
ABI_FIELD(RadSampleParams, typical_p)
ABI_FIELD(RadSampleParams, rep_penalty)
ABI_FIELD(RadSampleParams, freq_penalty)
ABI_FIELD(RadSampleParams, pres_penalty)
ABI_FIELD(RadSampleParams, xtc_probability)
ABI_FIELD(RadSampleParams, xtc_threshold)
ABI_FIELD(RadSampleParams, dry_multiplier)
ABI_FIELD(RadSampleParams, dry_base)
ABI_FIELD(RadSampleParams, top_k)
ABI_FIELD(RadSampleParams, penalty_last_n)
ABI_FIELD(RadSampleParams, dry_allowed_length)
ABI_FIELD(RadSampleParams, dry_penalty_last_n)
ABI_FIELD(RadSampleParams, hist_off)
ABI_FIELD(RadSampleParams, hist_len)
ABI_FIELD(RadSampleParams, mask_row)
ABI_FIELD(RadSampleParams, flags)
ABI_FIELD(RadSampleParams, dry_rep_limit)
ABI_STRUCT(RadTensor)
ABI_FIELD(RadTensor, data)
ABI_FIELD(RadTensor, dtype)
ABI_FIELD(RadTensor, rank)
ABI_FIELD(RadTensor, shape)
ABI_FIELD(RadTensor, stride)
ABI_STRUCT(RadTunable)
ABI_FIELD(RadTunable, key)
ABI_FIELD(RadTunable, values)
ABI_FIELD(RadTunable, n_values)
ABI_FIELD(RadTunable, deflt)
ABI_FIELD(RadTunable, doc)
ABI_STRUCT(RadVideoGenBatch)
ABI_FIELD(RadVideoGenBatch, lane)
ABI_FIELD(RadVideoGenBatch, geom)
ABI_FIELD(RadVideoGenBatch, geom_d)
ABI_FIELD(RadVideoGenBatch, lane_d)
ABI_FIELD(RadVideoGenBatch, first_d)
ABI_FIELD(RadVideoGenBatch, seg_cu)
ABI_FIELD(RadVideoGenBatch, lat_cu)
ABI_FIELD(RadVideoGenBatch, n_steps)
ABI_FIELD(RadVideoGenBatch, t_video)
ABI_FIELD(RadVideoGenBatch, t_audio)
ABI_FIELD(RadVideoGenBatch, step)
ABI_FIELD(RadVideoGenBatch, sched)
ABI_FIELD(RadVideoGenBatch, pos)
ABI_FIELD(RadVideoGenBatch, seed)
ABI_FIELD(RadVideoGenBatch, chunk)
ABI_FIELD(RadVideoGenBatch, n_chunks)
ABI_FIELD(RadVideoGenBatch, dec_rows)
ABI_FIELD(RadVideoGenBatch, n_frames_out)
ABI_FIELD(RadVideoGenBatch, n_samples)
ABI_FIELD(RadVideoGenBatch, geom_from)
ABI_FIELD(RadVideoGenBatch, upscale)
ABI_FIELD(RadVideoGenBatch, n_neg)
ABI_FIELD(RadVideoGenBatch, guidance_h)
ABI_FIELD(RadVideoGenBatch, image)
ABI_FIELD(RadVideoGenBatch, has_image)
ABI_FIELD(RadVideoGenBatch, guidance)
ABI_FIELD(RadVideoGenBatch, decoder)
ABI_FIELD(RadVideoGenBatch, sampler)
ABI_FIELD(RadVideoGenBatch, enc_pixels)
ABI_FIELD(RadVideoGenBatch, enc_frames)
ABI_FIELD(RadVideoGenBatch, enc_height)
ABI_FIELD(RadVideoGenBatch, enc_width)
ABI_FIELD(RadVideoGenBatch, enc_samples)
ABI_FIELD(RadVideoGenBatch, enc_n_samples)
ABI_FIELD(RadVideoGenBatch, enc_channels)
ABI_FIELD(RadVideoGenBatch, enc_geom_d)
ABI_FIELD(RadVideoGenBatch, enc_kind)
ABI_FIELD(RadVideoGenBatch, enc_slot)
ABI_FIELD(RadVideoGenBatch, ref_tab)
ABI_FIELD(RadVideoGenBatch, mod_cu)
ABI_STRUCT(RadVideoGenDecl)
ABI_FIELD(RadVideoGenDecl, name)
ABI_FIELD(RadVideoGenDecl, tmpl)
ABI_FIELD(RadVideoGenDecl, max_text)
ABI_FIELD(RadVideoGenDecl, fps_num)
ABI_FIELD(RadVideoGenDecl, fps_den)
ABI_FIELD(RadVideoGenDecl, frames_per_chunk)
ABI_FIELD(RadVideoGenDecl, frames_tail)
ABI_FIELD(RadVideoGenDecl, latents_per_chunk)
ABI_FIELD(RadVideoGenDecl, latents_tail)
ABI_FIELD(RadVideoGenDecl, dec_latents)
ABI_FIELD(RadVideoGenDecl, min_chunks)
ABI_FIELD(RadVideoGenDecl, max_chunks)
ABI_FIELD(RadVideoGenDecl, latent_scale)
ABI_FIELD(RadVideoGenDecl, latent_channels)
ABI_FIELD(RadVideoGenDecl, patch)
ABI_FIELD(RadVideoGenDecl, size_multiple)
ABI_FIELD(RadVideoGenDecl, min_side)
ABI_FIELD(RadVideoGenDecl, max_area)
ABI_FIELD(RadVideoGenDecl, max_aspect)
ABI_FIELD(RadVideoGenDecl, default_width)
ABI_FIELD(RadVideoGenDecl, default_height)
ABI_FIELD(RadVideoGenDecl, default_chunks)
ABI_FIELD(RadVideoGenDecl, sample_rate)
ABI_FIELD(RadVideoGenDecl, audio_rate)
ABI_FIELD(RadVideoGenDecl, audio_channels)
ABI_FIELD(RadVideoGenDecl, audio_latent_channels)
ABI_FIELD(RadVideoGenDecl, default_steps)
ABI_FIELD(RadVideoGenDecl, max_steps)
ABI_FIELD(RadVideoGenDecl, shift_video)
ABI_FIELD(RadVideoGenDecl, shift_audio)
ABI_FIELD(RadVideoGenDecl, max_lanes)
ABI_FIELD(RadVideoGenDecl, frames_out)
ABI_FIELD(RadVideoGenDecl, audio_out)
ABI_FIELD(RadVideoGenDecl, n_rungs)
ABI_FIELD(RadVideoGenDecl, rungs)
ABI_FIELD(RadVideoGenDecl, upscale_max)
ABI_FIELD(RadVideoGenDecl, upscale_refine)
ABI_FIELD(RadVideoGenDecl, sched_kind)
ABI_FIELD(RadVideoGenDecl, dyn_shift)
ABI_FIELD(RadVideoGenDecl, base_shift)
ABI_FIELD(RadVideoGenDecl, max_shift)
ABI_FIELD(RadVideoGenDecl, base_seq)
ABI_FIELD(RadVideoGenDecl, max_seq)
ABI_FIELD(RadVideoGenDecl, shift_terminal)
ABI_FIELD(RadVideoGenDecl, n_refine_rungs)
ABI_FIELD(RadVideoGenDecl, refine_rungs)
ABI_FIELD(RadVideoGenDecl, step_text_rows)
ABI_FIELD(RadVideoGenDecl, guidance)
ABI_FIELD(RadVideoGenDecl, guidance_default)
ABI_FIELD(RadVideoGenDecl, default_negative)
ABI_FIELD(RadVideoGenDecl, image_cond)
ABI_FIELD(RadVideoGenDecl, image_crf)
ABI_FIELD(RadVideoGenDecl, text_left_pad)
ABI_FIELD(RadVideoGenDecl, audio_streams)
ABI_FIELD(RadVideoGenDecl, upscale_exact)
ABI_FIELD(RadVideoGenDecl, duration_out)
ABI_FIELD(RadVideoGenDecl, duration_min)
ABI_FIELD(RadVideoGenDecl, duration_max)
ABI_FIELD(RadVideoGenDecl, duration_dtype)
ABI_FIELD(RadVideoGenDecl, decoders)
ABI_FIELD(RadVideoGenDecl, decoder_max_area)
ABI_FIELD(RadVideoGenDecl, max_ref_images)
ABI_FIELD(RadVideoGenDecl, max_ref_videos)
ABI_FIELD(RadVideoGenDecl, max_ref_audios)
ABI_FIELD(RadVideoGenDecl, max_enc_frames)
ABI_FIELD(RadVideoGenDecl, max_enc_side)
ABI_FIELD(RadVideoGenDecl, max_enc_samples)
ABI_FIELD(RadVideoGenDecl, enc_ratio)
ABI_FIELD(RadVideoGenDecl, max_mod_cells)
ABI_STRUCT(RadVideoGeom)
ABI_FIELD(RadVideoGeom, n_text)
ABI_FIELD(RadVideoGeom, frames)
ABI_FIELD(RadVideoGeom, lat_frames)
ABI_FIELD(RadVideoGeom, lat_h)
ABI_FIELD(RadVideoGeom, lat_w)
ABI_FIELD(RadVideoGeom, n_audio)
ABI_STRUCT(RadVocabHeader)
ABI_FIELD(RadVocabHeader, kind)
ABI_FIELD(RadVocabHeader, n_tokens)
ABI_FIELD(RadVocabHeader, n_merges)
ABI_FIELD(RadVocabHeader, n_steps)
ABI_FIELD(RadVocabHeader, tok_text_off)
ABI_FIELD(RadVocabHeader, tok_score_off)
ABI_FIELD(RadVocabHeader, tok_type_off)
ABI_FIELD(RadVocabHeader, merge_off)
ABI_FIELD(RadVocabHeader, step_off)
ABI_FIELD(RadVocabHeader, bos)
ABI_FIELD(RadVocabHeader, eos)
ABI_FIELD(RadVocabHeader, eot)
ABI_FIELD(RadVocabHeader, pad_id)
ABI_FIELD(RadVocabHeader, unk)
ABI_FIELD(RadVocabHeader, sep)
ABI_FIELD(RadVocabHeader, add_bos)
ABI_FIELD(RadVocabHeader, add_eos)
ABI_FIELD(RadVocabHeader, chat_template)
ABI_FIELD(RadVocabHeader, flags)
ABI_FIELD(RadVocabHeader, reserved)
ABI_STRUCT(RadVocabStep)
ABI_FIELD(RadVocabStep, kind)
ABI_FIELD(RadVocabStep, flags)
ABI_FIELD(RadVocabStep, arg0)
ABI_FIELD(RadVocabStep, arg1)
ABI_FIELD(RadVocabStep, iarg)
ABI_STRUCT(RadWeightDecl)
ABI_FIELD(RadWeightDecl, dtype)
ABI_FIELD(RadWeightDecl, rank)
ABI_FIELD(RadWeightDecl, shape)
ABI_FIELD(RadWeightDecl, access)
ABI_FIELD(RadWeightDecl, shard)
ABI_FIELD(RadWeightDecl, group)
ABI_FIELD(RadWeightDecl, optional)
ABI_FIELD(RadWeightDecl, n_row_parts)
ABI_FIELD(RadWeightDecl, row_parts)
ABI_FIELD(RadWeightDecl, source)
ABI_FIELD(RadWeightDecl, planes)
ABI_STRUCT(RadWeightGroup)
ABI_FIELD(RadWeightGroup, layer)
ABI_FIELD(RadWeightGroup, expert)
ABI_FIELD(RadWeightGroup, slot)
ABI_STRUCT(RadYarn)
ABI_FIELD(RadYarn, factor)
ABI_FIELD(RadYarn, low)
ABI_FIELD(RadYarn, high)
ABI_FIELD(RadYarn, magnitude)
ABI_STRUCT(RadMtpCoupleDraw)
ABI_FIELD(RadMtpCoupleDraw, seed)
ABI_FIELD(RadMtpCoupleDraw, base)
ABI_FIELD(RadMtpCoupleDraw, seq)
ABI_FIELD(RadMtpCoupleDraw, card)
ABI_FIELD(RadMtpCoupleDraw, mode)
ABI_STRUCT(RadMtpCoupleState)
ABI_FIELD(RadMtpCoupleState, draw)
ABI_FIELD(RadMtpCoupleState, pos)
ABI_FIELD(RadMtpCoupleState, status)
ABI_FIELD(RadMtpCoupleState, round)
ABI_FIELD(RadMtpCoupleState, x)
ABI_FIELD(RadMtpCoupleState, count)
ABI_FIELD(RadMtpCoupleState, ids)
ABI_FIELD(RadMtpCoupleState, q)
+36
View File
@@ -271,6 +271,30 @@ typedef struct RadBuildCtx {
*
* Trailing and zero-defaulted, so a plugin built against the older struct is unchanged. */
int64_t draft_tree;
/* ---- appended in ABI 32 (calibration) */
/* --calib-dir DIR: the deployment records calibration statistics (the second moment of each
* linear's input, GPTQ's Hessian) into DIR; null records nothing. A plugin that keeps none
* ignores it. `calib_layer_lo`..`calib_layer_hi` (--calib-layers, hi exclusive; both 0 for
* every layer) bound the layers recorded in one run, so a model whose statistics do not fit
* in memory at once is recorded in several runs over the same corpus. `calib_tokens` is the
* corpus's token count under --calib-corpus: the plugin writes its files once it has seen
* that many rows; 0 when the deployment drives no corpus.
*
* Trailing and zero-defaulted, so a plugin built against the older struct is unchanged. */
const char* calib_dir;
int32_t calib_layer_lo;
int32_t calib_layer_hi;
int64_t calib_tokens;
/* ---- appended in ABI 32 (an image generator's bounds) */
/* --image-gen-max-pixels: the largest image an image generator makes, in pixels; and
* --image-gen-max-refs: the reference pictures a request at most. 0: the model's own. A
* generator sizes its per-image and conditioning buffers for them and states them in its
* RadGeneratorDecl (max_tokens, max_refs), which the core holds requests to; one that keeps
* fixed buffers ignores them, and the core says so at startup. */
int64_t gen_max_pixels;
int64_t gen_max_refs;
} RadBuildCtx;
/* ================================================================== control vectors */
@@ -699,6 +723,11 @@ int rad_declare_scores(RadBuilder* b, rad_buf hidden, rad_weight table);
* this or logits, never both. */
int rad_declare_pooled(RadBuilder* b, rad_buf pooled);
/* The most integer words one request may hand the plugin (RadBatch::plugin_words), 0 for none.
* The engine stages that many a sequence in the step batch and refuses a longer request before
* it is admitted, so the plugin reads its words at the size it declared. Additive export. */
int rad_declare_plugin_words(RadBuilder* b, int64_t max_words);
/* ================================================================== the drafter */
/* The plugin's draft head. The core drives the extra passes, and only the plugin knows what it
@@ -1569,6 +1598,13 @@ typedef struct RadArchProbe {
* chain: a plugin that never measured trees asks for none. 64-bit so it starts past the older
* struct's tail padding, which a plugin built against it may copy over. */
int64_t tree_pays;
/* ---- appended in ABI 32 (inputs: an image generator's bounds) */
/* Set by the core before the call: --image-gen-max-pixels and --image-gen-max-refs, as
* RadBuildCtx carries them to declare (0: the model's own). A generator's gen_rows and
* gen_patches answer for them. */
int64_t gen_max_pixels;
int64_t gen_max_refs;
} RadArchProbe;
int rad_arch_probe(const RadModelMeta* meta, RadArchProbe* out);
+102
View File
@@ -0,0 +1,102 @@
/* rad_clef.h -- the words a clef request hands its head (RadBatch::plugin_words).
*
* clef's joint schema head (arch/common/rad_block_clef.h) reads more of a request than its
* tokens: which prompt positions hold each question's instructions and each option's text, each
* option's token ids (the lm_head rows it averages), and each question's type. The server lays
* them out with the functions below, in the forms the head's kernels read (a cu_seqlens here, a
* gather index there), and the engine carries them to the plugin as one range of int32 words.
* Both sides include this header, so the layout is stated once.
*
* Plain C, like every abi/ header: the plugin is built apart from the engine.
*/
#ifndef RAD_CLEF_H
#define RAD_CLEF_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The bounds the head's buffers are declared at. A request past one is refused by the server. */
enum {
RAD_CLEF_MAX_QUESTIONS = 64,
RAD_CLEF_MAX_OPTIONS = 512, /* every question's options together */
RAD_CLEF_MAX_LEX = 8192, /* every option's tokens together */
/* Prompt tokens. The head gathers every row of a prompt into buffers of its own, so this,
* not the deployment's context, sizes them: at the model's own 262144 they would take
* 4.5 GiB of the card for prompts that never pass a fifth of it. */
RAD_CLEF_MAX_PROMPT = 32768
};
/* The header: word 0 is the engine's (RadBatch::plugin_words), the rest the counts the layout is
* computed from. */
enum {
RAD_CLEF_W_ROW = 0, /* the sequence's logits row this step, written by the engine */
RAD_CLEF_W_N = 1, /* prompt tokens */
RAD_CLEF_W_Q = 2, /* questions */
RAD_CLEF_W_O = 3, /* options, every question together, in head order */
RAD_CLEF_W_L = 4, /* option tokens, every option together */
RAD_CLEF_W_S = 5, /* segments the prompt is cut into at every span's edges */
RAD_CLEF_HDR = 8
};
/* Where each array starts, in words from the range's start. Every array is int32. */
typedef struct RadClefWords {
int32_t n, q, o, l, s;
int32_t seg_cu; /* [s + 1]: a partition of [0, n) with a boundary at every span's edges */
int32_t q_seg; /* [q]: the segment holding each question's instructions */
int32_t o_seg; /* [o]: the segment holding each option's text */
int32_t o_q; /* [o]: each option's question */
int32_t opt_cu; /* [q + 1]: each question's options, consecutive */
int32_t type; /* [q]: 0 noul, 1 choice, 2 score */
int32_t lex_cu; /* [o + 1]: each option's tokens in lex_ids, consecutive */
int32_t lex_ids; /* [l]: the option tokens, as the prompt holds them */
int32_t last; /* [1]: n - 1, the prompt's last position */
int32_t cu_q; /* [2]: {0, q} */
int32_t cu_o; /* [2]: {0, o} */
int32_t cu_k; /* [2]: {0, n} */
int32_t total; /* words in all */
} RadClefWords;
static inline RadClefWords rad_clef_words_layout(int32_t n, int32_t q, int32_t o, int32_t l,
int32_t s) {
RadClefWords w;
int32_t at = RAD_CLEF_HDR;
w.n = n; w.q = q; w.o = o; w.l = l; w.s = s;
w.seg_cu = at; at += s + 1;
w.q_seg = at; at += q;
w.o_seg = at; at += o;
w.o_q = at; at += o;
w.opt_cu = at; at += q + 1;
w.type = at; at += q;
w.lex_cu = at; at += o + 1;
w.lex_ids = at; at += l;
w.last = at; at += 1;
w.cu_q = at; at += 2;
w.cu_o = at; at += 2;
w.cu_k = at; at += 2;
w.total = at;
return w;
}
/* The layout a range of words carries, read off its header. */
static inline RadClefWords rad_clef_words_read(const int32_t* words) {
return rad_clef_words_layout(words[RAD_CLEF_W_N], words[RAD_CLEF_W_Q], words[RAD_CLEF_W_O],
words[RAD_CLEF_W_L], words[RAD_CLEF_W_S]);
}
/* The most words a request can carry within the bounds: what the head declares
* (rad_declare_plugin_words). A span's two edges each cut the prompt, so the segments are at most
* two a span plus one. */
static inline int32_t rad_clef_max_words(void) {
const int32_t spans = RAD_CLEF_MAX_QUESTIONS + RAD_CLEF_MAX_OPTIONS;
return rad_clef_words_layout(0, RAD_CLEF_MAX_QUESTIONS, RAD_CLEF_MAX_OPTIONS,
RAD_CLEF_MAX_LEX, 2 * spans + 1).total;
}
#ifdef __cplusplus
}
#endif
#endif /* RAD_CLEF_H */
+5
View File
@@ -36,6 +36,11 @@ typedef struct RadDeviceProps {
int64_t lds_bytes; /* per-workgroup scratch, for occupancy arithmetic only */
int supports_p2p;
int is_host_backend; /* 1 when there is no accelerator behind this device */
int unified; /* 1 when device memory is host memory (integrated graphics):
* one address space and one RAM ledger -- the device pools and
* the pinned host pools are charged against the same bytes,
* KV tiers collapse to resident, and a copy whose source and
* destination are the same address is a no-op */
} RadDeviceProps;
int rad_dev_count(void);
+44
View File
@@ -0,0 +1,44 @@
/* rad_laya.h -- the words a Laya request hands its plugin (RadBatch::plugin_words), and the pooled
* row the plugin answers in.
*
* Laya (arch/laya) reads one sequence a question, `[CLS] <type> question: <instructions> [SEP]
* [MASK] opt0 [MASK] opt1 ... [SEP] <state> [SEP]`, and scores each option at its [MASK]. The
* server builds the sequence (core/server/laya.cpp) and hands the plugin what the tokens do not
* say: the question's type, which picks the head's type embedding, and where the markers are. The
* plugin answers in the sequence's pooled row: one logit an option, in marker order.
*
* Plain C, like every abi/ header: the plugin is built apart from the engine.
*/
#ifndef RAD_LAYA_H
#define RAD_LAYA_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
enum {
/* Options a question, llama.cpp's bound for laya. The pooled row holds one logit an option. */
RAD_LAYA_MAX_OPTIONS = 255,
RAD_LAYA_POOLED = 256
};
/* The question types in the order of the head's type embedding rows (laya's QTYPES). */
enum { RAD_LAYA_CHOICE = 0, RAD_LAYA_SCORE = 1, RAD_LAYA_NOUL = 2 };
/* A sequence's words. Word 0 is the engine's (RadBatch::plugin_words). */
enum {
RAD_LAYA_W_ROW = 0, /* written by the engine */
RAD_LAYA_W_N = 1, /* the sequence's tokens */
RAD_LAYA_W_TYPE = 2, /* RAD_LAYA_CHOICE, RAD_LAYA_SCORE or RAD_LAYA_NOUL */
RAD_LAYA_W_K = 3, /* options, so markers */
RAD_LAYA_W_MARKERS = 4, /* [k]: each option's [MASK] position in the sequence, in order */
RAD_LAYA_MAX_WORDS = RAD_LAYA_W_MARKERS + RAD_LAYA_MAX_OPTIONS
};
#ifdef __cplusplus
}
#endif
#endif /* RAD_LAYA_H */
+9
View File
@@ -106,6 +106,15 @@ typedef struct RadQuantizerInfo {
int rad_quant_count(void);
const RadQuantizerInfo* rad_quant_at(int i);
/* Optional: the cards a quantiser may run on, as the HIP runtime numbers them (after
* HIP_VISIBLE_DEVICES); none is the host alone, the state before any call. rad-convert calls it
* once, after loading and before the first weight, with its --gpus list. A quantiser that uses a
* card writes the same bytes it writes on the host, so a container does not depend on the machine
* that converted it, and --reuse matches it either way. RAD_E_UNSUPPORTED: this build has no
* device path; any other negative status refuses the list (a card that is not there). Symbol
* name: `rad_quant_devices`. */
typedef int (*RadQuantDevicesFn)(const int* ids, int n);
#ifdef __cplusplus
} /* extern "C" */
#endif
+20
View File
@@ -305,6 +305,26 @@ typedef struct RadBatch {
* rows; the core computes the candidates' logits itself. Zero on every other step, and always
* for a program that declared no scores. Appended; an older plugin never sees it set. */
int32_t score_only;
/* ---- appended in ABI 32 (a request's words for the plugin) */
/* Integer words a request hands the plugin whole (Request::plugin_words), for a head that
* needs more of a request than its tokens: clef's joint schema head reads the prompt's
* question and option spans and the option tokens (abi/rad_clef.h). Sequence s's words are
* `plugin_words[plugin_cu[s] .. plugin_cu[s+1])`; a sequence with none has an empty range.
* The engine writes the sequence's first sampled logits row of this step into word 0 of its
* range, so the head can put its result beside that row's logits; the words after it are the
* request's own. Carried only on the trunk step that samples a prompt's first token, so a
* head runs once a request, when every prompt row has been computed.
*
* `plugin_words_h` and `plugin_cu_h` are the same words on the host, for a plugin that reads
* counts before it issues; they live as long as the pass. All null, with `n_plugin_words`
* 0, on a step no sequence of which carries words, and on every step of a program that
* declared none (rad_declare_plugin_words). */
int64_t n_plugin_words;
const int32_t* plugin_words; /* [n_plugin_words] device */
const int32_t* plugin_cu; /* [n_seq + 1] device */
const int32_t* plugin_words_h;
const int32_t* plugin_cu_h;
} RadBatch;
/* What a generator pass carries beside the step batch's own fields, which keep their meanings: