Skip to content

update(deps): replace the unmaintained chrono crate with jiff - #3462

Merged
inureyes merged 3 commits into
lablup:mainfrom
Jaeyeong-CHOI:deps/3266-replace-chrono-with-time
Nov 27, 2026
Merged

inureyes merged 3 commits into
lablup:mainfrom
Jaeyeong-CHOI:deps/3266-replace-chrono-with-time

Conversation

@Jaeyeong-CHOI

Copy link
Copy Markdown
Contributor

Summary

Closes #3266.

chrono is declared unmaintained (RUSTSEC-2026-0543, no safe upgrade), and #3264 recorded the advisory as an ignore in deny.toml. This PR removes the crate. Every direct use was a chrono::Utc::now() call under src/server: 45 call sites in 23 files, in seven shapes. They now call a new src/server/clock.rs, which takes Unix values from std::time and calendar fields from time::OffsetDateTime, and writes each string out explicitly so it matches what chrono produced. chrono leaves every Cargo.toml and Cargo.lock, the RUSTSEC-2026-0543 ignore leaves deny.toml, and cargo deny check passes.

New pinning tests fix each timestamp shape at fixed instants. They passed against main's chrono expressions before the switch and pass unchanged against the new code. A real server on main and on this branch returns the same JSON types and the same string shapes for every clock-stamped field it emits (created, created_at, completed_at, req_ and srv_ ids, emitted_at, measured_at, and the log line prefix).

What changed

chrono expression on main Where Now
Utc::now().timestamp() created in types/response.rs, types/stream.rs, router_server.rs, routes/models.rs; created_at in model_provider.rs, routes/responses_compact.rs; created_at / completed_at (as f64) in routes/responses.rs, routes/responses_mcp_loop.rs, routes/responses_run.rs; started_at_unix in state.rs clock::unix_seconds_now()
Utc::now().timestamp_millis() srv_{pid}_{millis} instance id in router_lifecycle_ops.rs; per-model last_used in router_models.rs clock::unix_millis_now()
Utc::now().timestamp_micros() req_{micros} request ids in app.rs, router_server.rs, webui/events.rs, webui/library.rs, webui/security.rs clock::unix_micros_now()
Utc::now().timestamp_nanos_opt().unwrap_or_default() staging and quarantine directory names in router_cache/anchored_publish.rs, router_cache/anchored_remove.rs clock::unix_nanos_now_or_zero()
Utc::now().to_rfc3339_opts(SecondsFormat::Secs, true) UiEvent::emitted_at in router_lifecycle_dto.rs; operation created_at / updated_at in router_lifecycle_ops.rs clock::rfc3339_seconds_z_now()
Utc::now().to_rfc3339() runtime snapshot measured_at (the local sampled_at) in webui/runtime.rs clock::rfc3339_now()
Utc::now().format("%d %b %Y").to_string() the strftime_now chat-template function in chat_template.rs clock::day_month_year_now()
DateTime::parse_from_rfc3339(s).is_ok() (test code only) app.rs tests, router_contract_test_support.rs clock::is_rfc3339 (#[cfg(test)])

src/server/clock.rs:

  • unix_seconds, unix_millis, unix_micros take a SystemTime, compute signed nanoseconds since the epoch from SystemTime::duration_since, and floor-divide. Chrono's timestamp* accessors also round toward the past, so an instant 1.5 s before the epoch is -2 s, -1500 ms.
  • unix_nanos_or_zero returns 0 when the value does not fit an i64 (before 1677-09-21 or after 2262-04-11), like timestamp_nanos_opt().unwrap_or_default().
  • rfc3339_seconds_z is YYYY-MM-DDTHH:MM:SSZ with the sub-second part dropped. rfc3339 is the same date-time with a fraction of 0, 3, 6 or 9 digits (the shortest that holds the nanoseconds exactly, chrono's SecondsFormat::AutoSi) and a +00:00 offset. day_month_year is the zero-padded day, the English three-letter month and the four-digit year. All three read the calendar fields from time::OffsetDateTime::from(SystemTime) and assemble the string with format!. I did not use time's RFC 3339 formatter. It writes Z rather than +00:00 and trims trailing fraction zeros, so it does not match to_rfc3339().
  • Each *_now() wrapper has a /// Used by: line naming its callers. scripts/ci/check_used_by.py only scans utils.rs and layers.rs, so nothing enforces these lines.
  • strftime_now still ignores its format argument and returns %d %b %Y, as before. I left that as it is.

Dependencies:

  • Cargo.toml: chrono = "0.4" is gone. time = "0.3" is added (default features, which is std), and time = { version = "0.3", features = ["parsing"] } is added under [dev-dependencies] for is_rfc3339. No other workspace crate depended on chrono.
  • Cargo.lock: chrono 0.4.45, iana-time-zone 0.1.65, iana-time-zone-haiku 0.1.2 and android_system_properties 0.1.6 are removed. time is added to mlxcel's dependencies. time 0.3.55 was already locked, through rcgen and yasna on the dev-dependency path. In a normal (release) build, cargo tree -p mlxcel -e normal -i time now shows time v0.3.55 alloc,default,std with mlxcel as its only parent. That means release builds now also compile deranged, num-conv, powerfmt and time-core.
  • deny.toml: the RUSTSEC-2026-0543 entry and its comment are removed.
  • CHANGELOG.md: one line under Unreleased / Dependencies.

Log line timestamps are not affected. tracing-subscriber is built without its chrono feature on main too, and the smoke run below shows the same log prefix shape on both arms.

Where this differs from the issue text

  • The issue mentions "RFC 3339 strings in logs, metrics and API responses". No log or metrics timestamp went through chrono. The RFC 3339 strings that did are the WebUI contract fields listed above.
  • The issue asks for time, or std::time where only Unix timestamps are needed. Both are used: std::time for the four Unix values, and time only for calendar fields.
  • is_rfc3339 (test code only) uses time's RFC 3339 parser instead of chrono's. It is stricter in one case, described under "Verification limits". The server's own output parses under both.

Verification

Spark2: NVIDIA GB10, driver 580.178.04, CUDA 13.0.88, Linux 7.0.0-1019-nvidia aarch64, rustc 1.97.1 (the pinned toolchain), --features cuda, --profile test-fast, MLX_ENABLE_TF32=0 MLXCEL_SDPA_DETERMINISTIC=1, private 0700 TMPDIR. Base d43915faf6a37c6ed2072679d6e3e31cc4122628. Tested tree 77d8e72486c06c3e8743b6580b2a468ac12cd0ec, the tree of the commit.

  • cargo fmt --all -- --check
  • cargo clippy --locked --workspace --all-targets --features cuda -- -D warnings. The first run failed with two clippy::redundant_closure errors: .is_some_and(|s| clock::is_rfc3339(s)) in app.rs and router_contract_test_support.rs. Both now pass the function itself, and the rerun on the tested tree passed.
  • python3 scripts/ci/check_used_by.py, bash scripts/ci/check_used_by_test.sh, python3 scripts/insert_apache_header.py --check, python3 scripts/ci/check_env_var_docs.py, python3 scripts/ci/check_kernel_dtype_keys.py, python3 scripts/ci/check_cross_repo_refs.py
  • The new tests, cargo test --locked --profile test-fast --features cuda -p mlxcel --lib -- server::clock --test-threads=1: 6 passed.
  • Everything under src/server, where every changed call site lives: response builders, streaming chunks, the Responses API, WebUI, router lifecycle and router cache. cargo test ... -p mlxcel --lib -- server:: --test-threads=1 gave 4,389 passed, 0 failed, 20 ignored. Main gave 4,390 / 0 / 20 with the same test names plus the probe.
  • make verify-test-cuda with a private 0700 TMPDIR: 17,234 passed, 5 failed, 517 ignored, over 190 test targets (198 test result lines; the extra ones are single-test child runs that library tests spawn). The tree was the tested tree before and after the run. The library target has 13,218 tests here and 13,212 on main. All five failures also fail on unmodified d43915faf, run alone from a main build:

Tests

New, in src/server/clock_tests.rs. The instants are 2026-11-26T16:07:00Z, 2026-03-05T09:04:03Z (single-digit day and month), 2028-02-29T23:59:59Z and the next second, the epoch, 1.5 s before the epoch, 2300-01-01 and 0999-12-31T23:59:59Z (both outside the i64 nanosecond range), and the 15th of every month of 2026:

  • unix_values_round_toward_the_past: seconds, milliseconds, microseconds and nanoseconds at .999999999, at -1.5 s, at the epoch and at 1 ns before the epoch.
  • unix_nanos_outside_the_i64_range_is_zero.
  • rfc3339_seconds_z_drops_the_fraction: nine instants, for example 2026-11-26T16:07:00Z for .999999999, 1969-12-31T23:59:58Z, 0999-12-31T23:59:59Z.
  • rfc3339_uses_plus_zero_offset_and_three_six_or_nine_fraction_digits: 17 cases. Eleven of them are fractions at one instant: +00:00, .000000001, .000001, .001, .120, .123, .123400, .123456, .123456700, .123456789, .999999999. The rest include 1969-12-31T23:59:58.500+00:00.
  • day_month_year_pads_the_day_and_abbreviates_the_month: 05 Mar 2026, 29 Feb 2028, 01 Mar 2028, 31 Dec 0999, and all twelve month abbreviations.
  • emitted_stamps_parse_as_rfc3339: both emitted RFC 3339 shapes parse. Two offset forms are accepted, and eight malformed strings are rejected.

The expected values were computed independently with Python's datetime before the first run.

Before and after:

  • Main. On unmodified d43915faf, I added an evidence-only clock.rs whose functions are main's own call expressions with chrono::Utc::now() replaced by DateTime::<Utc>::from(t). Chrono 0.4.45's Utc::now() on this target is SystemTime::now().duration_since(UNIX_EPOCH) followed by DateTime::from_timestamp, which gives the same value as that conversion for any clock at or after the epoch. Next to it went the same clock_tests.rs. All 6 tests passed, and the committed (rustfmt-ed) clock_tests.rs, sha256 019c04d0…, passed again later: 6 passed against the same shim on a clean d43915faf tree (2f2bad12). Also on main, the whole server:: filter gave 4,390 passed, 0 failed, 20 ignored. That count includes these 6 tests and a print-only probe.
  • Fix. All 6 passed. The server:: filter gave 4,389 passed, 0 failed, 20 ignored: the same set of tests minus the probe.

Mutations of clock.rs on the fix tree, each built and run against server::clock:

Mutation Failing tests (of 6)
rfc3339 writes Z instead of +00:00 rfc3339_uses_plus_zero_offset_and_three_six_or_nine_fraction_digits
rfc3339 always writes 9 fraction digits same
rfc3339 never chooses 6 digits same
unix_seconds truncates toward zero (/ instead of div_euclid) unix_values_round_toward_the_past
unix_millis truncates toward zero same
unix_micros truncates toward zero same
unix_nanos_or_zero saturates to i64::MIN/MAX instead of 0 unix_nanos_outside_the_i64_range_is_zero
rfc3339_seconds_z keeps milliseconds rfc3339_seconds_z_drops_the_fraction
day_month_year does not pad the day day_month_year_pads_the_day_and_abbreviates_the_month
day_month_year writes the full month name same
the shared date-time prefix does not pad the year rfc3339_seconds_z_drops_the_fraction, rfc3339_uses_plus_zero_offset_and_three_six_or_nine_fraction_digits

Each mutation's build succeeded, and clock.rs was restored to its tested sha256 afterwards.

Putting chrono back (the main run above) leaves all six green, which is the point: the tests pin the shapes, not the library.

Acceptance criteria

  • cargo tree --locked --workspace -i chrono and cargo tree --locked --workspace --all-features -i chrono both exit 101 with package ID specification 'chrono' did not match any packages. No transitive path remains, and Cargo.lock has no chrono entry.
  • cargo deny check advisories and cargo deny check with cargo-deny 0.22.1, the official aarch64-unknown-linux-musl release binary (sha256 checked against the release's .sha256). The only change to deny.toml was db-path, pointed at a directory in the work dir. On this branch: advisories ok, and advisories ok, bans ok, licenses ok, sources ok. On main as shipped: the same results. On main with only the RUSTSEC-2026-0543 line removed: advisories FAILED, reporting chrono v0.4.45 └── mlxcel v0.9.0-beta.2. Both arms also print advisory-not-detected for the existing RUSTSEC-2024-0436 (paste) ignore. That ignore no longer matches anything in the graph, on main as well. I left it alone.
  • Pinning tests identical before and after: see "Tests".

Real server, main against fix

Checkpoint mlx-community/Qwen2-VL-2B-Instruct-4bit at revision 01af461cdb9574acc09084a0ef94e216e142b085. Two mlxcel-server binaries were built in the same target dir with --profile test-fast --features cuda: main d43915faf (sha256 54b0a984…) and this tree (sha256 7526850c…). strings finds 10 chrono- paths in the main binary and none in this one. Each server ran alone on loopback with --webui --api-key <throwaway>, under a watchdog: stop below 25 GiB available or above 10 GiB RSS. Across the three rounds, peak RSS was 4.48 GiB, at main's first start, which compiled the CUDA kernels. Minimum available memory was 109.6 GiB, and no build was running. The requests were /v1/models; /v1/chat/completions and /v1/completions, plain and streamed (temperature 0, 8 tokens); /v1/responses, plain and streamed; /ui-api/v1/{bootstrap,catalog,operations,runtime?model_id=…,events}; POST /ui-api/v1/model-actions (read-only in -m mode); and a request with a foreign Host.

A script lists every clock-stamped field with its JSON type and its shape, with each digit replaced by 9. It also lists the server's log line prefixes. Its output is identical for main and fix (diff exit 0):

Field Type Shape Example (fix)
created in chat, completions (plain and every streamed chunk), /v1/models data[].created int 9999999999 1795715645
created_at, completed_at in /v1/responses (plain and streamed response) float 9999999999.9 1795715646.0
request_id in WebUI error envelopes (400 contract error, 422 read-only, 403 bad Host) str req_9999999999999999 req_1795715646327451
server_instance_id in bootstrap, catalog, operations, runtime, events str srv_9999999_9999999999999 srv_2605974_1795715645120
emitted_at in the events SSE snapshot str 9999-99-99T99:99:99Z 2026-11-26T17:54:06Z
slots.measured_at in the runtime snapshot str 9999-99-99T99:99:99.999999999+99:99 2026-11-26T17:54:51.357090934+00:00
log line prefix (stdout) 9999-99-99T99:99:99.999999Z INFO 2026-11-26T17:54:04.107853Z INFO

The generated text was the same on both arms (Hello! How can I help you today). The measurements.*.measured_at fields are null on both arms for this idle server. The first smoke round without --webui (OpenAI routes only) also gave identical shapes. The first --webui round exited at startup on both arms, because --webui without --api-key is only allowed on an interactive loopback terminal; that is why the key was added.

Verification limits

  • Only Linux aarch64 with CUDA was built and tested. Metal (macOS) and ROCm were not. clock.rs has no platform-specific code. Chrono read the clock through SystemTime::now() on every target this crate ships.
  • is_rfc3339, which only test code uses, now goes through time's parser. A print-only probe over 14 inputs, run on both arms, differed in one case: 2026-11-26T16:07:60Z (second 60 outside 23:59) parses under chrono and is rejected by time. 2026-12-31T23:59:60Z parses under both. Lowercase t/z, a space separator, -00:00 and a 10-digit fraction are treated the same by both. The server never emits second 60.
  • With the system clock set before 1970, chrono's Utc::now() panicked (system time before Unix epoch). The new code returns the negative values that the pre-epoch pins record, which are chrono's DateTime::<Utc>::from(SystemTime) values. Nothing else changes for clocks at or after the epoch.
  • The calendar formatters match chrono for years 0 through 9999. That is the whole range time holds without large-dates, and OffsetDateTime::from(SystemTime) panics outside -9999..=9999. Chrono would have printed a sign for years outside 0..=9999. A system clock does not report such years.
  • The strftime_now path was covered by the pinning test and the existing chat-template tests, not by a real Llama 3 template render on the server.
  • The router-mode paths (mlxcel-server without -m: lifecycle operation created_at / updated_at, per-model last_used, router-cache staging names) were exercised only by the unit tests in server::, not by a live router server.
  • Main moved from d43915faf to db3a23141 (two commits, feat(core): add an opt-in cuda-oxide route behind fused_add_rms_norm #3451 and fix(xla): replace the reduce_window cumsum in the Mamba2 SSD scan #3434) while this ran. Neither touches Cargo.toml, Cargo.lock, deny.toml or src/server. git merge-tree reports no conflict, and the merged tree has no chrono:: use. I did not rebuild or retest on the new main.

RUSTSEC-2026-0543 declares `chrono` unmaintained with no safe upgrade, and
lablup#3264 only recorded it as an ignore in `deny.toml`. Every direct use was a
`chrono::Utc::now()` call under `src/server`: 45 sites in 23 files, in seven
shapes. They now call `src/server/clock.rs`, which takes Unix values from
`std::time` and calendar fields from `time::OffsetDateTime`, and spells out
each string so it matches what chrono produced:

- `timestamp()`, `timestamp_millis()`, `timestamp_micros()`: Unix seconds,
  milliseconds and microseconds, rounded toward the past. These feed
  `created`, `created_at`, `completed_at` and `started_at_unix`, the
  `srv_{pid}_{millis}` instance id, per-model `last_used`, and `req_{micros}`
  request ids.
- `timestamp_nanos_opt().unwrap_or_default()`: Unix nanoseconds, or 0
  outside the i64 range. Used in router-cache staging and quarantine
  directory names.
- `to_rfc3339_opts(SecondsFormat::Secs, true)`: `2026-11-26T16:07:00Z`, for
  WebUI event `emitted_at` and lifecycle operation `created_at` and
  `updated_at`.
- `to_rfc3339()`: a `+00:00` offset and a fraction of 0, 3, 6 or 9 digits,
  for runtime snapshot `sampled_at` and `measured_at`.
- `format("%d %b %Y")`: `05 Mar 2026`, from the `strftime_now`
  chat-template function.

`clock_tests.rs` pins each shape at fixed instants. The instants include one
before the epoch, two outside the i64 nanosecond range, a leap day, a
three-digit year, and fractions that need 1 to 9 digits. The same file
passed against a copy of `clock.rs` built on main's chrono expressions and
against the new code. The two test-only `DateTime::parse_from_rfc3339`
checks now go through `clock::is_rfc3339`, which uses `time`'s RFC 3339
parser; `parsing` is enabled only in dev-dependencies.

Only the root crate depended on `chrono`, so Cargo.lock drops chrono,
iana-time-zone, iana-time-zone-haiku and android_system_properties.
`time` 0.3.55 was already locked through rcgen's dev-dependency path.
Release builds now also compile it, with `std` only, together with
deranged, num-conv, powerfmt and time-core. The RUSTSEC-2026-0543 ignore
is removed from `deny.toml`. Log line timestamps do not change, because
tracing-subscriber is built without its chrono feature.

Closes lablup#3266
@inureyes inureyes added status:review Under review type:dependency Dependency updates priority:medium Medium priority labels Nov 27, 2026
The maintainer chose `jiff` over `time` as the `chrono` replacement, because time-zone calculations are expected later and `jiff` brings them behind its `tz` features. `jiff` 0.2 is added with `default-features = false, features = ["std"]`, so a release build compiles only `jiff` and `jiff-core` and no time zone database. `time` leaves `[dependencies]` and `[dev-dependencies]`; it stays in the lock through rcgen and yasna on the dev path.

`clock.rs` reads the UTC civil date and time from a `jiff::Timestamp` and still assembles every string with `format!`, so the pinned shapes are unchanged. `is_rfc3339` (test code only) checks the RFC 3339 shape before parsing with `jiff`, since `jiff` also accepts ISO 8601 and Temporal forms such as minutes without seconds, the basic format and bracketed annotations; the pinning test now rejects those.

Validated with fmt, clippy on `mlxcel`, `cargo deny check`, and the `server::clock` tests and the server filters the clock feeds.

Refs lablup#3266, Refs lablup#3462
@inureyes inureyes changed the title update(deps): replace the unmaintained chrono crate with time update(deps): replace the unmaintained chrono crate with jiff Nov 27, 2026
@inureyes

Copy link
Copy Markdown
Member

Hardening review

Target PR: #3462. Linked issue: #3266.

Findings

  • Call sites: every chrono use was a Utc::now() call in src/server, now routed through src/server/clock.rs. No chrono remains in any .rs, Cargo.toml or Cargo.lock after merging current main (cargo tree --locked --workspace -i chrono: no match).
  • Formats: all UTC, nothing local. Unix seconds, millis, micros and nanos floor toward the past as chrono did. to_rfc3339() keeps +00:00 and a 0/3/6/9-digit fraction, to_rfc3339_opts(Secs, true) keeps Z with no fraction, and strftime_now keeps %d %b %Y in UTC. The pinning tests in clock_tests.rs fix each shape. strftime_now still ignores its format argument and returns UTC, where the Python HF helper returns datetime.now().strftime(format) in local time. That was main's behavior and is unchanged here.
  • Change by maintainer decision: the calendar fields now come from jiff instead of time, because time-zone calculations are expected later and jiff adds them through its tz features. Commit 9d0c6b0: jiff = { version = "0.2", default-features = false, features = ["std"] }, and time leaves both dependency tables. The strings are still assembled with format!, so the output is byte-identical.
  • Strictness of the test-only is_rfc3339: jiff also parses ISO 8601 and Temporal forms that RFC 3339 forbids (16:07Z with no seconds, the basic format, [UTC] annotations, a comma before the fraction, +0900). The helper now checks the RFC 3339 shape first, and the test rejects those forms. It also rejects a fraction longer than 9 digits.

Release build dependencies

  • cargo tree -p mlxcel -e normal -i jiff: jiff v0.2.46 alloc,std with jiff-core, and mlxcel as the only parent. jiff-static, portable-atomic and serde_core are in the lock but not enabled.
  • cargo tree -p mlxcel -e normal -i time: nothing. time 0.3.55 stays only on the dev path (rcgen, yasna).

Validation (Mac Studio M3 Ultra, Metal)

  • cargo fmt --all -- --check: pass.
  • cargo clippy -p mlxcel --all-targets --features metal,accelerate -- -D warnings: pass.
  • cargo deny check (cargo-deny 0.22.1): advisories ok, bans ok, licenses ok, sources ok.
  • RUST_MIN_STACK=16777216 cargo test -p mlxcel --lib --profile test-fast --features metal,accelerate <filter> -- --test-threads=1: server::clock 6 passed, server::app 41, server::webui 87, server::router 234 (1 ignored), server::routes::models 4, server::routes::responses 126, server::types 108, server::chat_template 166 (4 ignored), server::model_provider 80, server::state 19. 0 failures.

Remote CI was cancelled by maintainer decision. The local commands above are the gate.

@inureyes
inureyes merged commit ef0076b into lablup:main Nov 27, 2026
1 of 33 checks passed
inureyes added a commit that referenced this pull request Nov 28, 2026
#3462 added `unix_micros`, `rfc3339`, `unix_micros_now` and `rfc3339_now` to `src/server/clock.rs`, but every caller outside the clock tests sits behind the `webui` feature. Builds without it, such as the OpenXLA feature compile job under `RUSTFLAGS=-D warnings`, failed on dead code, and that job has been red on main since #3462. The two `_now` wrappers now compile with `webui` only and the two formatters with `webui` or tests.

Validated with `cargo clippy --no-default-features --features metal,accelerate --lib --tests -- -D warnings`, the workspace clippy at default features, and the `server::clock` tests.
inureyes added a commit that referenced this pull request Nov 28, 2026
* fix(models): keep Inkling 2 verify blocks exact on M1-class GPUs

Both block-vs-chain tests failed on M1 Ultra because of the matmul overlay's few-row GEMV route (#2587): on GPU generations 13 and 14 a dense product of at most `MLXCEL_DENSE_GEMV_ROWS` (default 6) rows in one batch runs each row through the one-row GEMV, and anything larger takes the steel GEMM tile. Setting the variable to 0 makes both tests pass on M1; setting it to 16 moves the Inkling failure to width 8.

Inkling 2: the attention-residual mix (`AttentionResidual::forward`) multiplies `[B, L, S, H]` by a shared `[H, Q]` query, which MLX folds into M = L * S, and then mixes over L batches. A decode step and a verify block therefore took different kernels on M1. Inside a verify block the mix now runs per position through `row_invariant::per_position`, at the decode step's shapes; decode steps and prefill are unchanged. On a real Inkling 2 Mini 4-bit checkpoint on M1 Ultra the probe goes from Diverges to Equal at widths 2, 4 and 8.

DeepSeek V2: the negative control's widths 2 and 4 fall inside the GEMV route, so the decompressed layout already matched the chain on M1. The control now also runs widths 8 and 12, where the decompressed layout differs at every row, and it still fails with the row-invariant scope forced on.

The ignored real-checkpoint diagnostic also prints the probe verdict the DSpark gate reads.

Refs #3468

* perf(models): split the Inkling 2 residual mix only on M1 and M2

The per-position attention-residual mix that keeps an Inkling 2 verify block exact is needed only where the matmul overlay's few-row GEMV route runs (GPU generations 13 and 14). On M3 and later the block already matched the chain with a single mix, so the split only added cost there.

`AppleSiliconGen::few_row_dense_gemv` names the generation half of the overlay predicate (true for M1, M2 and `Unknown`), and `AttentionResidual::forward` splits only where it holds. `MLXCEL_DENSE_GEMV_ROWS` is not read: with the route disabled the split is still exact, just slower. A misread generation can only switch the drafter off through the exactness probe, never change output.

Measured on M1 Ultra, Inkling 2 Mini 4-bit, `verify_round_timing`, three interleaved runs per arm: verify width 4 median 75.1 to 75.4 ms with the split against 69.5 to 69.9 ms without (+7.7%), width 8 111.5 to 112.1 ms against 101.7 to 101.8 ms (+9.8%), argmax digests identical. That is the cost M3 and later no longer pay. On M1 Ultra the split stays on and `probe_block_chain_exactness` on the real checkpoint is Equal at widths 2, 4 and 8. The M3-class run of the no-split branch is still pending.

Refs #3468

* docs: note the M1 and M2 per-position residual mix in the DSpark row

The Inkling 2 DSpark row listed the verify-block exactness mechanisms but not the per-position attention residual mix that runs on Apple GPU generations 13 and 14 (M1, M2), and it stated the block-versus-chain probe result on an M3 Ultra only.

Add the mechanism and the measured M1 Ultra result, scoped to Mini 4-bit at widths 2, 4 and 8.

Refs #3468

* fix(models): keep the Inkling 2 residual split off CUDA and ROCm

The generation predicate reads `AppleSiliconGen::Unknown` as true so an unidentified Apple chip keeps the exact split, but CUDA and ROCm also report `Unknown`, so every Inkling 2 verify block there paid the per-position residual mix for a few-row GEMV route that exists only in the Metal matmul overlay. `HardwareCapabilities::few_row_dense_gemv` now also requires the Apple vendor tag, and the residual mix asks it instead of the bare generation. Non-Apple backends keep the single mix they ran before #3475.

Validated on M1 Ultra: the new vendor test, `deepseek_v2::`, `inkling2` and `dense_verify_block` filters (97 passed), and the real-checkpoint probe on `Inkling-2-Mini-4bit` at width 8 (Equal). The CUDA arm is covered by the unit test only; no CUDA host was used.

Refs #3468

* fix(server): gate the WebUI-only clock helpers on the webui feature

#3462 added `unix_micros`, `rfc3339`, `unix_micros_now` and `rfc3339_now` to `src/server/clock.rs`, but every caller outside the clock tests sits behind the `webui` feature. Builds without it, such as the OpenXLA feature compile job under `RUSTFLAGS=-D warnings`, failed on dead code, and that job has been red on main since #3462. The two `_now` wrappers now compile with `webui` only and the two formatters with `webui` or tests.

Validated with `cargo clippy --no-default-features --features metal,accelerate --lib --tests -- -D warnings`, the workspace clippy at default features, and the `server::clock` tests.
inureyes added a commit that referenced this pull request Nov 28, 2026
Bumps every version-tracking workspace crate (mlxcel, mlxcel-core, mlxcel-mlx-pin, mlxcel-surgery, mlxcel-xla) to 0.9.0-beta.3 through `make bump-version` and syncs Cargo.lock. `make verify-versions` passes.

Renames the Unreleased changelog section to v0.9.0-beta.3 and covers the 58 commits since v0.9.0-beta.2. The existing entries are kept, and the commits that had none gain entries: the OpenXLA hybrids (Falcon-H1, Jamba, PLaMo 2, Mamba1, Falcon-Mamba) and sigmoid MoE routing, the speculative exactness work, the vision resize and parser parity fixes, ERNIE-4.5 and Nemotron 3 Nano loading, and the CLI and Responses validation fixes. Dependencies, CI/CD, Docs and Known Issues sections and the compare link are added. The chrono to jiff entry that #3462 wrote into the beta.2 section moves here. Known Issues drop #2975 and #3407, which are closed, and add the open Raon-1 mini follow-ups.

Regenerates `recipes/registry/` from a release build and repoints CURRENT. It adds `raon1_mini` and the `llava_onevision2` model type on Mage-VL, and removes nothing.

Updates the release pointers: the README main-branch line and a Raon-1 mini highlight, CITATION.cff, the bug report placeholder, the cluster note in `docs/distributed.md` and `cluster_handshake.rs`, and the version example in `TECHNICAL_REPORTS/README.md`. The reports index is unchanged because 0.9 is still the line under development; `make verify-reports-index` passes.
@inureyes inureyes added this to the 0.9 milestone Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:medium Medium priority status:review Under review type:dependency Dependency updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update(deps): replace the unmaintained chrono crate with time

2 participants