Skip to content

Releases

whisper-0.8.0

Choose a tag to compare

@sonic182 sonic182 released this 30 Nov 23:35
38de454
  • Breaking: whisper asks for Agentica 0.40.0 (ml#302).
  • whisper keeps its modules in src/; pkg/whisper/NAME imports are unchanged (ml#302).

vision-0.8.0

Choose a tag to compare

@sonic182 sonic182 released this 30 Nov 23:35
38de454
  • Breaking: vision asks for Agentica 0.40.0 (ml#302).
  • vision keeps its modules in src/; pkg/vision/NAME imports are unchanged (ml#302).

transformers-0.8.0

Choose a tag to compare

@sonic182 sonic182 released this 30 Nov 23:35
38de454
  • Breaking: transformers asks for Agentica 0.40.0 and keeps its modules in src/: pkg/transformers/NAME imports are unchanged, and pkg/transformers/src/NAME (Llama) becomes pkg/transformers/NAME (ml#302).
  • On XLA a step's plan is one per batch width and KV room: caches grow to their room before a step, and Generate.step_batch(g, rows, width:) pads a batch with dropped rows; Serving pads batches to the next power of two, up to the rows that can be active, and counts them in padded_runs (ml#477).
  • A prompt step compiles as Trace.Phase.Prompt and every step over a cache as Trace.Phase.Decode, so a NeuronCore compiles each with its own flags (ml#490).
  • Generate.counters(g) reports what the compiled steps of a generator cost: compiles, plan hits, and the ms of compiling, running, uploading, fetching and picking (Stepping.Counters, ml#477).
  • Fix: speculative decoding no longer fails with add needs two tensors of one shape when a verification step grew the KV cache and a rejected draft rolled it back under the old capacity (ml#478).
  • Generation runs on Backend.Xla(Device.Neuron(0)), batched rows included; tools/bench_qwen.agc takes BATCH=n (ml#375, ml#476).
  • Generate of pkg/transformers/generate_qwen4_exp generates with Qwen4-Exp over a cache (attention and QSA indexer keys, delta and PLE states, the n-gram context), with the greedy ids of Hugging Face's generate; KvDecoder.Stepper takes inputs the host makes from the ids fed so far (ml#436).
  • Qwen4Exp reads the configs Hugging Face accepts (no layer_types, no expert sizes, no indexer_* fields without indexed layers, an empty eos_token_id without PLE, n-gram shards of any sizes), and is tested on XLA and libtorch (ml#466).
  • Qwen4Exp (pkg/transformers/qwen4_exp) loads and runs the text model of a Qwen4-Exp checkpoint (the architecture of Qwen3.8-Flash-Next), with QSA, the hashed n-gram PLE, the hyper-connections and the experts, matching Hugging Face's logits (ml#436).
  • Qwen3.8-27B loads with Qwen3_5.open: its config is qwen3_5, and the fields it adds (output_gate_type, the multi-token-prediction fields) change nothing, as in Hugging Face (ml#436).
  • Serving.Limits(reuse_prefixes: true) names the full blocks of each sequence that ends, so a later prompt that starts with them prefills only the rest; Serving.Stats counts reused_tokens and prefilled_tokens (ml#422).
  • Serving.Limits(kv_blocks:, kv_block_size:) serves every sequence from one paged pool, with the ids of a cache per sequence; a request waits for the blocks it may hold and fails when the pool could never hold it; the server takes --kv-blocks and --kv-block-size (ml#92).
  • Generate.step_batch_paged decodes many sequences of one pool in one graph, with the ids of step_batch over their contiguous caches, on the reference backend, ggml's CPU engine and Vulkan (ml#92).
  • Generate.prefill_paged reuses the published blocks a prompt starts with and feeds the rest in one step; KvDecoder.fork_paged shares a sequence, a shared or published block is copied before a write, and a paged cache on XLA or libtorch is refused until it is tested (ml#92).
  • A paged KV cache for Qwen3: Generate.open_pool(g, blocks, size) makes one pool for many sequences, and Generate.step_paged and step_paged_logits step a sequence through its block table with the logits of the contiguous cache exactly, on the reference backend, ggml's CPU engine and Vulkan; a model with recurrent states and Placement.Kv.Host are refused (ml#92).
  • LlamaGguf.open takes llama.rope.scaling.type default like none, and a llama.rope.dimension_count other than the head size is an error (ml#303).
  • LlamaGguf.open reads the GGUF files of llama.cpp's converter: the reordered query and key rows and rope_freqs.weight (the llama3 scaling); before, such a file gave wrong ids. Breaking: the llama.rope.scaling.* keys are no longer read, and a llama.rope.scaling.type other than none is an error (ml#303).
  • tools/generate_llama_check.agc checks the greedy ids of Llama 3.2 1B Instruct against Hugging Face, from safetensors and GGUF, on ggml CPU and Vulkan (ml#303).
  • Qwen3.open(dir, xla, BF16) keeps a bfloat16 checkpoint's big matrices as they are stored, and gives the logits of the same checkpoint read as F32. tools/bench_qwen.agc takes xla; on an RTX 4060 the estimated unique weight storage of Qwen3-0.6B is 1.19 GB against 2.38 GB, at the same decode speed (benchmarks/README.md).
  • tools/minilm_finetune.agc takes torch, which fine-tunes MiniLM on libtorch, every weight (ml#203, ml#394).
  • WordPiece reads a tokenizer file with a fixed padding ("strategy": {"Fixed": 128}) as the padding to the longest, so sentence-transformers/all-MiniLM-L6-v2 opens; no tokenizer here pads (ml#377).
  • tools/fetch_minilm.sh fetches all-MiniLM-L6-v2 at a pinned revision and sha256, and tools/minilm_finetune.agc loads it and fine-tunes it for a few steps on ggml CPU or Vulkan (ml#377).
  • A BERT fine-tunes on Backend.Xla(Device.Cpu): the gradients of the cosine loss match the reference and Train.fit_batches lowers the loss, and tools/minilm_finetune.agc takes xla (all-MiniLM-L6-v2: the loss falls from 0.01137 to 0.00236 in six steps, as on ggml) (ml#243).
  • tools/finetune_stsb.agc fine-tunes all-MiniLM-L6-v2 on the scored pairs of STS-B on cpu, vulkan, xla or torch, with tools/fetch_stsb.sh for the pinned files; the guide is the page train/finetune-minilm.md. It trains every weight on libtorch too (ml#394).
  • tools/finetune_stsb.agc and its guide train through Loop (a Loop.spearman metric on a seeded validation sample, a step-and-loss handler) and take the epochs, the validation sample size and an optional time budget in seconds as arguments (ml#397).
  • Generate of Qwen3 runs on Backend.Xla(Device.Cpu): the steps of the cache are compiled by XLA, and Lift.staged compiles the forward there too (ml#243). Checked on the tiny model of the tests; the check against Hugging Face on Qwen3-0.6B and the speed are not done yet.
  • Bert.weights, Bert.with_weights and Bert.pooled name the weights of a BERT as the checkpoint does and run its mean embedding inside a trace, so Train.fit and Params fine-tune it (sentence-transformers/all-MiniLM-L6-v2 sized models); DistilBert shares the helpers (ml#377).
  • GraniteMoe.open(dir, backend, weights, layers_on_device): the layers from the nth on, with their experts and keys, run on the CPU under a Vulkan device, as for Qwen3 (ml#331).
  • Lfm3.open(dir, backend, weights, layers_on_device): the layers from the nth on, with their convolution states and keys, run on the CPU under a Vulkan device, as for Qwen3 (ml#331).
  • Qwen3_5.open(dir, backend, weights, layers_on_device): the layers from the nth on, with their keys and states, run on the CPU under a Vulkan device, with the table and the head placed as for Qwen3 (ml#331).
  • Qwen3.layers_that_fit and Qwen3.layers_within take kv: Placement.Kv.Host and then count no KV cache on the card (ml#331).
  • Qwen3.layers_that_fit(dir, backend, weights, max_device_bytes) gives the layers_on_device that fills the free memory of a Vulkan device (less a reserve, up to a cap), and AGENTICA_ML_MAX_DEVICE_BYTES sets the cap for bench_qwen (ml#331).
  • Placement.footprint(c, ...) counts the Footprint of a model from its checkpoint (ml#331).
  • Placement.fit(footprint, budget) gives the largest layers_on_device whose layout fits a budget in bytes, and Placement.budget(free, reserve, cap) the budget; both are pure, the first step of a memory budget for layers_on_device (ml#331).

train-0.8.0

Choose a tag to compare

@sonic182 sonic182 released this 30 Nov 23:35
38de454
  • Breaking: train asks for Agentica 0.40.0 (ml#302).
  • train keeps its modules in src/; pkg/train/NAME imports are unchanged (ml#302).
  • Loop.checkpoint(dir, every:, keep:) writes the weights, the optimizer state and the position of a run to a new folder, whole or not at all, and keeps the last few; Loop.checkpoints and Loop.read_checkpoint read them, and Loop.Info carries the state and the seed (ml#402).
  • Loop.resume(trainer, dir) goes on from the last checkpoint of dir, at its epoch and batch, with the same shuffle; Train.fit and Train.fit_batches take skip: for it (ml#402).
  • A run emits telemetry events for handlers that an app attaches: train.step (loss, learning rate, step), train.epoch (mean loss) and train.metric (each Loop.metric value), with the run name from the new run argument of Train.fit, Train.fit_batches and Loop.trainer; train depends on the telemetry package (ml#400).
  • Optim.save and Optim.load write and read the step count and the moments of an optimizer state, Train.fit and fit_batches take a start state that the schedule goes on from, and Train.Epoch and StepInfo carry the run's state (ml#402).
  • Loop.handle(event, f, every:) calls a function at Started, StepCompleted or EpochCompleted, and Loop.stop(info) ends a run early with its Fit, and Train.fit takes an optional on_step. Breaking: on_epoch and on_step answer a Result[Train.Control] (Continue, Stop or an error), and a failed metric stops the run at the end of its epoch (ml#397).
  • Loop.trainer and Loop.run (Loop.run_batches for a batch function) run a training as a pipe over Train.fit, and Optim.sgd, Optim.adam and Optim.adamw are short optimizer constructors (ml#397).
  • Loop.metric measures a Loop.Metric at the end of every epoch into Fit.metrics; Loop.mean and Loop.spearman reduce its rows, and Train.Epoch carries the epoch's params; finetune_stsb.agc moves to Loop.spearman in a later step (ml#397).
  • Table.read(path) reads a CSV file (the csv package) into named columns, and Data.from_table(table, inputs, target, backend, target_dtype) makes a Dataset of its numeric columns for a Loader (ml#318).
  • Table.read reads a .parquet file too (the parquet package), and Data.from_table makes a Dataset of its columns (ml#318).
  • A Parquet column with a NaN or an infinity is an error that names the column and the row, as a CSV cell that is not finite keeps its column text; train/examples/ has a CSV and a Parquet example with goldens, and train/data.md the text-column path with Train.fit_batches (ml#318).
  • Breaking: train, transformers, vision and tools/skills ask for Agentica 0.40.0-beta.2 (the parquet package needs it); CI already ran on it (ml#318).
  • Table.read reads a CSV or Parquet file over 1 MiB, in chunks (ml#378).

tensor-0.8.0

Choose a tag to compare

@sonic182 sonic182 released this 30 Nov 23:34
38de454
  • Breaking: tensor asks for Agentica 0.40.0 and keeps its modules in src/: pkg/tensor/tensor and pkg/tensor/trace are unchanged, an import of pkg/tensor/src/NAME becomes pkg/tensor/NAME (ml#302).
  • On XLA a program is compiled once for every device and runs on the device of its call (a portable PJRT program), so the NeuronCores of a process share their programs; a plugin that refuses a portable program, or AGENTICA_ML_XLA_PORTABLE=0, compiles one per device, as before (ml#508).
  • On a NeuronCore the prompt and decode phases add --internal-hlo2tensorizer-options=--modular-flow-mac-threshold=10, and every program is compiled for the scratchpad page of the runtime (NEURON_SCRATCHPAD_PAGE_SIZE); Tensor.xla_scratchpad(bytes) sets the page before the plugin opens, and Qwen3.open asks for one that holds a layer's KV cache of one sequence (ml#508). The programs in Neuron's compile cache compile once more under the new flags.
  • On a NeuronCore each compiled program gets the compiler flags of its phase: Trace.compile(specs, f, phase) takes Trace.Phase.Prompt, Decode or Any (the default). A prompt adds --model-type=transformer -O1 to NEURON_CC_FLAGS and a decode step --model-type=transformer -O2, as NxD Inference does; AGENTICA_ML_NEURON_PROMPT_FLAGS and AGENTICA_ML_NEURON_DECODE_FLAGS replace them. The flags are part of what a program is, so the same text with other flags compiles again (ml#490).
  • On XLA, a compiled function writes a set_rows into its cache in place when the cache is an input that nothing else reads and the result is an output, as ggml does: the run consumes the old cache tensor, even when it fails, and answers the new one. Any other cache is copied, as before (ml#491).
  • Backend.Xla serves every NeuronCore the process sees, Neuron(0), Neuron(1) and up (Tensor.xla_devices()); a compiled function runs on the core of its inputs, and to_device copies between cores; two cores have run with our CPU plugin standing in, not yet on an inf2 (ml#477).
  • On a NeuronCore, top_ids compiles (chlo.top_k), to_dtype from a float to an integer truncates, an index of scatter_add or set_rows outside the rows is the usual error, and half weights compute as F32 (ml#475). In the text of Trace.stablehlo those indices are clamped into the rows, so an index outside them writes the nearest row where XLA dropped it.
  • Breaking: Tensor.Device has a new variant, Neuron(Int), so an exhaustive case over it needs its arm (ml#241).
  • Backend.Xla runs on an AWS NeuronCore: AGENTICA_ML_NEURON_PLUGIN names Neuron's PJRT plugin, Tensor.xla_device() gives Neuron(0) then, and the site has a guide (ml#241).
  • On ggml a gather reads the rows of an F16 cache that a set_rows wrote, widened to F32: how a paged cache reads its pool (ml#92).
  • exp on Backend.Torch flushes a denormal result to 0 on purpose (an input below -87.33 in F32, -708.39 in F64; libtorch is 3 to 10 times slower on them), so a masked softmax and the gradient of gelu_erf run faster; every result of 1.18e-38 or more is kept. The finite checks of the torch ops are one aminmax reduction instead of a boolean temporary and a scan, so sigmoid and gelu_erf run in half the time (ml#407).
  • Dtype.BF16: ggml, libtorch and XLA keep checkpoint weights in 16-bit buffers. Tensor.from_file(..., dtype: BF16) preserves BF16 file values and rounds F32 or F16 sources to nearest even. Products with F32 activations widen BF16 weights at compute time, and embeddings can widen only the selected rows.
  • Backend.Xla holds F16 tensors: Tensor.from_file(..., dtype: F16), from_bytes and from_list make half weights in 16-bit buffers, and a compiled product or lookup widens them to F32 inside the program; Qwen3.open(dir, xla, F16) and the other weights: F16 models load on XLA (ml#386).
  • The StableHLO emitter builds every op with agc-ir, so Trace.stablehlo and the programs XLA compiles are in MLIR's generic form ("stablehlo.reduce"(...) ({...}) {dimensions = array<i64: 1>}), each reduction's, sort's and scatter's combiner an explicit region; only the module, its function and the gated-delta call stay text. The programs compute the same: the IREE goldens of train/ are unchanged (ml#417).
  • Tensor.adam_step on Backend.Torch is one native pass over the weight and its moments, where it was ten libtorch kernels per weight (ml#407).
  • The default build of the optional torch module, without libtorch, stops with one clear error (no libtorch found, and how to find it) instead of errors about pread and O_CLOEXEC (ml#379).
  • A traced run on Backend.Torch frees each node's tensor after its last reader, and the Adam step of a computing backend makes one statement at a time: a MiniLM step with every weight trained peaks at 1.4 GiB of resident memory (it was killed at 2.5 GB), and a Trace.eval of 16 sentences of 64 tokens no longer keeps 660 MB per call (ml#394).
  • Torch.memory reads the bytes of the live libtorch tensors and their peak, for the tests of what a run frees (ml#394).
  • Tensor.batch_matmul runs on Backend.Torch(Cpu), so the gradient of Tensor.attention (written with it) runs on libtorch too: 51 of the 52 primitives (ml#203).
  • The StableHLO emitter (so Backend.Xla) compiles sigmoid, pow, clamp, to_dtype, permute, concat, stack, squeeze, unsqueeze, batch_matmul and argmax (ml#243).
  • The StableHLO emitter compiles layer_norm, rms_norm, gelu_erf and rope too (ml#243).
  • The StableHLO emitter compiles attention and scatter_add (the gradient of an embedding) too, and a program with a scatter_add checks its indices as one with a gather does (ml#243).
  • The StableHLO emitter compiles top_ids too (ml#243).
  • Tensor.from_file and Tensor.from_bytes on Backend.Xla read and widen the range in C, straight into the buffer, as ggml does (no list of floats): Qwen3-0.6B opens in 2.8 GB instead of over 6 GB (ml#243).
  • Tensor.device_memory(backend) gives the free and total bytes of the device of a ggml backend (ggml_backend_dev_memory), for a memory budget of layers_on_device (ml#331).

server-0.8.0

Choose a tag to compare

@sonic182 sonic182 released this 30 Nov 23:35
38de454
  • Breaking: server asks for Agentica 0.40.0 (ml#302).
  • Breaking: server keeps its modules in src/: run it as agentica src/server.agc from server/; pkg/server/NAME imports are unchanged (ml#302).
  • --warm-context N compiles the plans of prompts and answers up to N tokens before the server listens, on XLA and without --kv-blocks, each logged with its ms (ml#477).
  • --log-level debug (or AGENTICA_ML_SERVING_DEBUG=1) prints a line per scheduler step with its device, rows, positions, KV room, plan (compiled or found) and the split of its time; /metrics adds each replica's compiles, plan hits, compile, execute and transfer ms, and the p50 and p95 step time (ml#477).
  • --backend xla serves a replica per device of the XLA plugin (each NeuronCore under AGENTICA_ML_NEURON_PLUGIN, run so far with our CPU plugin standing in), and the requests go round them in turn; Server.start takes the backends, and /metrics sums the replicas and lists each under replicas (ml#477).
  • --api-key-env NAME turns on an API key from the environment: every route needs Authorization: Bearer <key>, compared in constant time, and anything else is a 401; a host that is not loopback needs the key or --no-auth (ml#457).
  • A message whose content holds the text of a special token of the tokenizer, such as <|im_start|>, is a 400 in both routes (ml#422).
  • POST /v1/responses streams an answer in the Responses API shape, and previous_response_id continues the stored tokens of a response of the same client; with --kv-blocks and the new --reuse-prefixes the continuation reuses the KV of the turns before it (ml#422).

nn-0.8.0

Choose a tag to compare

@sonic182 sonic182 released this 30 Nov 23:35
38de454
  • Breaking: nn asks for Agentica 0.40.0 and keeps its modules in src/; pkg/nn/NAME imports are unchanged (ml#302).
  • Delta.GatedDeltaNet takes sigmoid_gate, the output_gate_type: sigmoid of Qwen4-Exp (ml#436).
  • NGram (pkg/nn/ngram) computes the hashed n-gram ids of Qwen4-Exp (Qwen3.8-Flash-Next) and embeds them, with the ids of Hugging Face's Qwen4ExpTextNGramEmbedding (ml#436).
  • Nn.Rope with inv_freq takes neox: false, which turns the columns 2i and 2i + 1 together (ml#303).
  • Paged (pkg/nn/paged) keeps the blocks of a paged KV cache: a pool of blocks with ref counts, a table of blocks per sequence, copy-on-write of a shared block, and the pool rows a step writes and reads; no tensors yet (ml#92).
  • Hyper (pkg/nn/hyper) and Ple (pkg/nn/ple) are the hyper-connections and the per-layer embedding of Qwen4-Exp (Qwen3.8-Flash-Next), and Nn.LayerNorm takes a group, the grouped RMS norm they use, as Hugging Face's Qwen4ExpTextGatedResidual, Qwen4ExpTextPLELayer and Qwen4ExpTextRMSNorm compute them (ml#436).
  • Paged.publish names the full blocks of a table by a hash of their tokens and Paged.reuse gives a new prompt the named blocks it starts with; a named block no table holds stays idle until a block is needed, the least recently idle first, and is copied before a write (ml#92).
  • Qsa.mask takes query_at, the position of each query over a padded cache, and Ple.ple takes a Delta.padding (Ple.span) for a padded prompt (ml#436).
  • Qsa (pkg/nn/qsa) is the token selection of the indexed attention of Qwen4-Exp (Qwen3.8-Flash-Next): the mask of the keys each query reads, as Hugging Face's Qwen4ExpTextQSAIndexer selects them (ml#436).

hub-0.8.0

Choose a tag to compare

@sonic182 sonic182 released this 30 Nov 23:35
38de454
  • Breaking: hub asks for Agentica 0.40.0 (ml#302).
  • hub keeps its modules in src/; pkg/hub/NAME imports are unchanged (ml#302).
  • weights: BF16 keeps the big matrices of a checkpoint as BF16 weights on Torch and XLA, and as F16 on ggml, as weights: F16 does, where a value beyond 65504 is an error (ggml would multiply a BF16 weight through an F32 copy in every step); Load.weights_from_env reads WEIGHTS=bf16 (ml#444).
  • Load.max_device_bytes_from_env reads AGENTICA_ML_MAX_DEVICE_BYTES for the tools (ml#331).
  • Load.held_bytes(c, name, weights) counts the bytes a weight takes on a ggml device under weights, without reading it (ml#331).

asr-0.8.0

Choose a tag to compare

@sonic182 sonic182 released this 30 Nov 23:35
38de454
  • Breaking: asr asks for Agentica 0.40.0 (ml#302).
  • asr keeps its modules in src/; pkg/asr/NAME imports are unchanged (ml#302).

agc-ir-0.8.0

Choose a tag to compare

@sonic182 sonic182 released this 30 Nov 23:34
38de454
  • Breaking: agc-ir asks for Agentica 0.40.0 (ml#302).
  • Element.BF16 (bf16).
  • Element.I8, I16 and U8 (ui8), and Attr.DenseLiteral(payload, type), a dense attribute whose payload the dialect formats; an empty Attr.I64Array prints as array<i64>, the form MLIR parses (ml#417).