Archived
merge 1.12.0: gemma4 E2B/E4B and Nemotron Bolt E4B arrive; the ref2va audio, rows and ABI work carried across
conv1d keeps both stride forms: upstream's causal codec downsample with cu_div (Fish Audio) and the port's explicit-pad non-causal one (the H3 audio encoder's), in libref, libavx and libr4d alike; the ABI takes upstream's 27 on top of the port's RadVideoGenBatch growth.
This commit is contained in:
commit
7c3b5ab7d5
285 files changed
+30500
-2898
No files matched your search
@@ -78,6 +78,7 @@ struct SchedMetrics {
|
||||
int64_t prefix_restore_cuts = 0;
|
||||
/* Removed by --prefix-cache-ttl, cumulative. Not evictions: nothing wanted the memory. */
|
||||
int64_t prefix_expired = 0, prefix_ckpt_expired = 0;
|
||||
int64_t prefix_released = 0, prefix_ckpt_released = 0;
|
||||
/* Decoupled prefix caching (spec §7.3). `prefix_hit_rate` is the attention hit rate, as in
|
||||
* vLLM. The linear side hits at a different granularity (whole checkpoints, not blocks), so
|
||||
* it is reported separately, with token counts and checkpoints written. */
|
||||
@@ -168,6 +169,17 @@ struct SessionOccupancy {
|
||||
int64_t host_cap_bytes = 0;
|
||||
};
|
||||
|
||||
/* What a release took out of the store and what it left (PrefixCache::release_session). The
|
||||
* kept counts are apart on purpose: `shared` blocks belong to another stored conversation too,
|
||||
* `live` ones to a request still reading them. */
|
||||
struct SessionReleased {
|
||||
int64_t sessions = 0;
|
||||
int64_t entries = 0, tokens = 0;
|
||||
int64_t device_bytes = 0, host_bytes = 0;
|
||||
int64_t snapshots = 0;
|
||||
int64_t kept_tokens = 0, kept_shared = 0, kept_live = 0;
|
||||
};
|
||||
|
||||
/* One in-flight request, for the live request table: shows which request is stuck, e.g. one
|
||||
* waiting on a prompt that will never fit, which no aggregate metric reveals. */
|
||||
struct RequestStat {
|
||||
@@ -225,6 +237,15 @@ public:
|
||||
* allocated), but it takes the scheduler's lock because a step may be inserting into the map. */
|
||||
virtual int64_t reset_prefix_cache() { return RAD_E_UNSUPPORTED; }
|
||||
|
||||
/* Forgets one stored conversation (DELETE /sessions): every row carrying `label`, or with
|
||||
* `id` nonzero the row of that engine id; `keep_tokens` leaves the chain's start standing.
|
||||
* RAD_E_NOTFOUND when nothing matches (404), RAD_E_STATE while a request of that
|
||||
* conversation is queued or running (409), RAD_E_UNSUPPORTED without a prefix cache (501). */
|
||||
virtual int release_session(const std::string& /*label*/, uint64_t /*id*/,
|
||||
int64_t /*keep_tokens*/, SessionReleased* /*out*/) {
|
||||
return RAD_E_UNSUPPORTED;
|
||||
}
|
||||
|
||||
/* The live request table, oldest first; returns the count. Default: none kept. */
|
||||
virtual int requests(std::vector<RequestStat>* /*out*/) const { return 0; }
|
||||
|
||||
@@ -527,6 +548,14 @@ struct MediaOpts {
|
||||
/* A picture over this many pixels is first scaled down to that area (PIL's bicubic, sides
|
||||
* truncated), as a model's own pipeline may do before its processor; 0 leaves it as sent. */
|
||||
int64_t max_pixels = 0;
|
||||
/* Which of the checkpoint's picture modes, for one that has two (Unlimited-OCR): 0 is the
|
||||
* processor's choice (mm::ImageMode::Default), 1 gundam, 2 base. */
|
||||
int32_t image_mode = 0;
|
||||
/* The mode's sizes, when the request states them; 0 keeps the mode's own. */
|
||||
int32_t image_base_size = 0, image_size = 0;
|
||||
/* The request carries more than one picture (mm::ImageMode::several): a processor with a
|
||||
* multi-page mode uses it for a picture whose mode the request did not name. */
|
||||
bool several_pictures = false;
|
||||
};
|
||||
|
||||
class IMultimodal {
|
||||
@@ -660,6 +689,8 @@ struct ImageGenInfo {
|
||||
/* The prompt in windows (RadGeneratorDecl::chunk_tokens): tokens a window, its markers and
|
||||
* its padding token; 0 for a prompt read whole. */
|
||||
int32_t chunk_tokens = 0, chunk_bos = 0, chunk_eos = 0, chunk_pad = 0;
|
||||
/* The conditioning options a request may ask for (RadGeneratorDecl::cond_opts, RAD_GEN_COND_*). */
|
||||
uint32_t cond_opts = 0;
|
||||
};
|
||||
|
||||
class IImageGen {
|
||||
@@ -694,6 +725,15 @@ struct AudioGenInfo {
|
||||
int64_t sample_rate = 0, channels = 0;
|
||||
int64_t default_steps = 0, max_lanes = 1; /* default_steps 0: no denoiser */
|
||||
double default_cfg = 1.0;
|
||||
/* RadAudioGenDecl::branches (1: no guidance) and ::input_special (the {input} slot is
|
||||
* tokenised with special tokens). */
|
||||
int32_t branches = 2;
|
||||
bool input_special = false;
|
||||
/* RadAudioGenDecl's references: the prompt with them and one reference ("" when the model
|
||||
* takes none), the clips' rate and frame, and the most of them and their samples. */
|
||||
std::string tmpl_ref, ref_item;
|
||||
int64_t ref_rate = 0, ref_hop = 0, ref_max_samples = 0;
|
||||
int32_t ref_max = 0;
|
||||
};
|
||||
|
||||
class IAudioGen {
|
||||
|
||||
Reference in new issue
Block a user