Model Size Is Not Agent Viability: Benchmarking PrismML's 5.9GB 27B-Class Artifact

Model Size Is Not Agent Viability: Benchmarking PrismML's 5.9GB 27B-Class Artifact

pr0h0••31 min read•ai
AI Usage (97%)
On this page

Introduction — A 5.9GB Download Is Not an Agent Deployment

On November 25, 2026, BigGo Finance ran an item reporting that PrismML compressed a 27B-class model to 5.9GB and that the result improves agent performance for on-device AI. Two numbers and an adjective are enough to start a conversation, not enough to plan a deployment.

This post shows how to benchmark that 5.9GB artifact for local agent viability instead of treating model size as a proxy. The first instinct on seeing "27B-class model at 5.9GB" is to turn it into a memory budget: 5.9GB fits a phone, an 8GB laptop, a small NUC with an iGPU sipping system RAM. That instinct is where most local-agent evaluations come apart. Artifact size is a property of files on disk. Agent viability is a property of what happens across thousands of finished tool calls: peak resident memory during a 32k-token prefill, whether the model emits the right argument for the right tool with the right identifier, how often it needs a retry, and what a single correctly finished task costs.

State the technical position and scope

My position: storage compression is the least decision-relevant number in this story. A 5.9GB artifact shows that someone found a compact representation of weights. It does not show that a 27B-class model, at that representation, can reliably drive tools inside a fixed memory envelope at an acceptable cost per completed task. Only the last claim survives contact with a real workflow, and it has to be measured end-to-end: correctness oracle, peak memory, context tier, tool-call accuracy, latency distribution, and cost per success.

This walkthrough is a benchmark design, plus the arithmetic you can run today without the artifact. It is written so that the moment a verifiable PrismML release, model card, or runtime instruction appears, you can execute it without redesigning anything.

Disclosure of what was and was not done here. I did not download, run, or evaluate a PrismML artifact. No PrismML numbers appear in this post because none were available to me. Every numeric output shown below is explicitly labelled synthetic — it comes from a generator or a hypothetical configuration, is reproducible from the code shown, and must not be read as a PrismML measurement. Where I speculate about quality or throughput, the word "hypothesis" is doing real work.

📝

The distinction in this post is between executable now (arithmetic, harness code, scoring rules) and blocked pending disclosure (anything PrismML-specific). Keep that line visible in your own notes — it is the difference between an evaluation and a vibe.

What the PrismML Report Establishes—and What It Leaves Unknown

Preserve the claim and its attribution

The supplied item is secondary reporting — not a vendor announcement, not a paper. Attributing as stated: a 27B-class model was compressed to 5.9GB, and the compression is claimed to boost agent performance for on-device AI. Per the supplied material, the item does not specify the compression method, runtime memory requirements, or the benchmarks behind the performance claim.

The confirmed set is small; the unverified set is large. "27B-class" is a descriptor, not a parameter count. "Compressed" is not a method. "Improved agent performance" is not a task suite with a scoring criterion. Treat all three as report claims awaiting primary documentation, and do not promote them to facts because the numbers look precise. Precision in a headline is not precision in a measurement.

Build a confirmed-versus-unverified evidence table

ItemStatus in supplied reportWhat would settle it
Model identity and revisionNot statedModel card with repository id and commit hash
Parameter accounting"27B-class" onlyExact total and active parameter counts
Compression methodNot statedMethod description, per-tensor scheme, bit allocations
Artifact contentsNot statedFile manifest with byte counts and hashes
Runtime compatibilityNot statedSupported runtimes with minimum versions
Supported context lengthNot statedConfig value plus a tested correctness table
Hardware requirementsNot statedMeasured peak memory by device and backend
Agent benchmark"Improved agent performance"Task suite, oracle, trial counts, pass rates
License and checksumsNot statedLicense file, published digests

The last-but-one row matters most for an agent deployment. "Improved agent performance" could mean better single-turn function-call formatting, better multi-step completion, or better scores on a benchmark whose tasks never touch a sandboxed filesystem. Three different products.

Establish the verification gate

Write the gate down before you spend a day on setup. You need: the original PrismML announcement, a downloadable artifact, a model card, a license, published checksums, runtime instructions, and the evaluation behind the agent claim. Until those exist, PrismML-specific performance is unverified, full stop, and every executable example in your notes should carry an illustrative label so nobody downstream mistakes a harness run against a stand-in model for a PrismML result.

If part of the gate fails and you still benchmark something, name the substitute explicitly: "measured on a 7B Q4_K_M GGUF in llama.cpp b6xxx, not PrismML." Comparisons across substitutes are still useful — they calibrate the harness and the acceptance thresholds — but they answer a different question.

Translate the Storage Claim Without Inventing a Compression Method

Calculate the implied storage budget

The one piece of real arithmetic available today is conditional and cheap. Assume, purely for the calculation, that 27B means exactly 27×10⁹ parameters and that 5.9GB means 5.9×10⁹ bytes of weight data.

// bits-per-param.js — conditional arithmetic, not a compression claim
const params = 27e9;

const cases = [
  { label: "5.9 GB (decimal, SI)", bytes: 5.9e9 },
  { label: "5.9 GiB (binary)", bytes: 5.9 * 1024 ** 3 },
];

for (const { label, bytes } of cases) {
  const bitsPerParam = (bytes * 8) / params;
  console.log(`${label.padEnd(22)} ${bytes.toFixed(0).padStart(12)} B  ->  ${bitsPerParam.toFixed(3)} bits/param`);
}

console.log("\nBytes required for 27e9 params at a given precision:");
for (const bits of [1.5, 2, 3, 4, 8, 16]) {
  const gb = (params * bits) / 8 / 1e9;
  console.log(`  ${String(bits).padStart(4)} bits/param -> ${gb.toFixed(3)} GB`);
}

Output:

5.9 GB (decimal, SI)      5900000000 B  ->  1.748 bits/param
5.9 GiB (binary)          6335076761 B  ->  1.877 bits/param

Bytes required for 27e9 params at a given precision:
   1.5 bits/param -> 5.063 GB
   2.0 bits/param -> 6.750 GB
   3.0 bits/param -> 10.125 GB
   4.0 bits/param -> 13.500 GB
   8.0 bits/param -> 27.000 GB
  16.0 bits/param -> 54.000 GB

That tells you something narrow and useful: under the stated assumptions, 5.9GB lands below two bits per parameter. Sub-2-bit weight formats are not exotic — public GGUF quantization families already ship variants in that range, and 1.58-bit ternary training has been published since BitNet — so the ratio itself is unremarkable. What it is not is evidence of a novel method, and it does not tell you the precision of any individual tensor.

It also gives you three falsifiable counter-hypotheses to check against a model card:

  1. "27B-class" is not 27×10⁹. A Mixture-of-Experts model with, say, 27B total and 4B active parameters would fit a different storage footprint and a very different compute budget. Total parameters drive storage; active parameters drive latency. Conflating the two is the most common error in local-agent planning.
  2. The artifact is not raw weights. A 5.9GB download could be a compressed archive, a container in which kernels and scales are counted separately, or a format that stores embeddings more cheaply than the linear layers.
  3. Some tensors are not in the file at all. Tied embeddings, externally hosted adapters, or runtime-generated tensors change the extracted footprint.

None of these are claims about PrismML. They are the questions a model card has to answer before the 1.75 bits/param figure means anything.

Separate weights from the complete deployment

A working local agent is not a weight file. Inventory the rest before you assume 5.9GB implies a 5.9GB machine footprint:

  • tokenizer model and vocabulary, plus the chat template — templates change prompt tokens and therefore prefill cost
  • configuration (layer count, KV head count, head dimension, rope settings, context limit)
  • quantization side data — per-group scales, zero points, codebooks, permutation indices
  • auxiliary tensors that quantized formats often keep at higher precision (norms, biases, embedding tables, output head)
  • runtime binaries: the inference server, its math libraries, its backend plugins, and any GPU runtime
  • external dependencies: Python environment, shared libraries, model shards fetched lazily on first run

After extraction, the runtime does not simply map weights and sit still. It allocates KV cache, activation buffers, and workspace; it may dequantize tiles on the fly into scratch memory; the allocator may keep freed blocks instead of returning them. A 5.9GB artifact can easily produce a 9–14GB peak resident footprint at 16k context. Artifact size is a lower bound, never the budget.

Define Agent Viability Before Selecting Benchmarks

Specify the deployment envelope

Viability is meaningless without a target. Write the envelope down first — it converts a benchmark into a pass/fail decision:

Envelope fieldWhy it constrains the benchmark
Target hardwareDetermines memory ceiling and decode throughput
Available memory headroomMust exclude OS, browser, and your own agent process
Operating system and backendChanges allocator behaviour and offload options
Power modeLaptop on battery vs wall changes sustained throughput
ConcurrencyTwo simultaneous sessions roughly double KV cache
Required contextDirectly sets cache bytes; the single biggest lever
Data-locality constraintsRules out any hosted fallback entirely
Acceptable task completion timeTurns latency into a threshold, not a curiosity

A concrete envelope, invented but realistic: an 8GB unified-memory mini PC, 5.5GB of that usable for inference, 8k context required, single user, 60-second ceiling per task, no network egress permitted. Under that envelope a 32k-context configuration is not "better" — it is out of scope.

Set acceptance criteria before testing

Thresholds have to be application-specific; refuse to import someone else's. What I will say is the shape each criterion takes:

  • End-to-end correctness: fraction of tasks where the final sandbox state matches the expected state, not where the model text looks reasonable.
  • Valid tool calls: fraction of emitted calls that pass schema validation.
  • Argument correctness: exact match on identifiers and numeric fields for calls that were otherwise valid.
  • Authorization compliance: zero forbidden actions. This is a hard gate, not a percentage to average.
  • Peak memory: measured peak must stay under the envelope with margin for allocator variance.
  • Latency: a tail threshold (say p95), because a median-only criterion hides the runs users complain about.
  • Cost per completed task: defined below, and always with successes in the denominator.

A model that scores 96% on schema validity and 61% on argument correctness is not "good at tool use." It is good at emitting JSON and bad at the job.

Choose defensible comparisons

Two different comparisons get muddled constantly:

  • Compression comparison — same model family, same runtime, same hardware, different artifact precision. This isolates what compression costs you in quality and gains you in memory.
  • Deployment comparison — different models, different runtimes, different stacks, each at its best configuration. This answers "what should I ship" and must not be reported as if it isolated compression.

Pick one primary comparison and state it. If a higher-precision reference of the same model is unavailable — likely, if PrismML has not published one — say so, then fall back to a practical local alternative at a similar size class. After that, stop calling the result a compression evaluation.

Freeze the Artifact, Runtime, and Workload

Create a reproducibility manifest

Anything you cannot re-identify six weeks later is an anecdote. The manifest is the cheapest defence:

{
  "model": {
    "id": "<repository or artifact id>",
    "revision": "<commit hash>",
    "artifactFiles": [{ "name": "<file>", "bytes": 0, "sha256": "<hex>" }],
    "declaredTotalParams": null,
    "declaredActiveParams": null,
    "declaredContext": null,
    "license": "<spdx>"
  },
  "runtime": { "name": "<runtime>", "version": "<semver>", "commit": "<hash>", "backend": "<cpu|cuda|metal|vulkan>" },
  "placement": { "device": "<name>", "layersOffloaded": 0, "kvCacheType": "<f16|q8_0|q4_0>" },
  "prompting": { "chatTemplateSha256": "<hex>", "toolFormat": "<json|xml|native>", "temperature": 0, "topP": 1, "maxOutputTokens": 512 },
  "workload": { "suiteRevision": "<git sha>", "distinctTasks": 12, "trialsPerTask": 5, "contextTiers": [2048, 8192, 32768] }
}

Note the nulls and the 0s. A manifest is allowed to be incomplete. A manifest with guessed values is worse than no manifest — it will be trusted.

Verify downloads and record the environment

Hashing is portable; hardware inventory is not. Do the portable part in Node so it runs identically on the machine that downloads and the machine that benchmarks.

// verify-artifact.js — byte counts and SHA-256, no runtime assumptions




async function sha256(path) {
  const hash = createHash("sha256");
  await pipeline(createReadStream(path), hash);
  return hash.digest("hex");
}

for (const path of process.argv.slice(2)) {
  const { size } = statSync(path);
  console.log(`${path}\n  bytes:  ${size}\n  sha256: ${await sha256(path)}`);
}

Illustrative output — synthetic, no PrismML artifact was hashed:

models/<artifact>.gguf
  bytes:  5900000000
  sha256: 0000000000000000000000000000000000000000000000000000000000000000

For the environment, record whatever your platform exposes without installing extra tooling: uname -a, node --version, the runtime's own --version and startup log (which usually prints backend, device, and layer offload), nvidia-smi --query-gpu=name,memory.total,driver_version --format=csv on discrete-GPU hosts, and the OS page-size and available memory from /proc/meminfo on Linux. Mark what you could not collect as "not measured."

⚠️

Treat any mirrored artifact as untrusted input. Prefer formats that cannot execute code on load (GGUF, safetensors) over pickle-based checkpoints, verify published digests before first load, and run the first load inside a container without network access. A benchmark host compromised by a model file produces very confident, very wrong numbers.

Control variables that can distort comparisons

Hold constant: prompts (byte-identical), tool schemas, output token limits, concurrency, timeouts, trial schedule, and background load. Then record rather than silently vary: CPU offload layer count, speculative decoding, prefix-cache reuse, flash-attention settings, and any runtime-specific flag that moves numerics. Two configurations that differ in offload layer count and KV cache type are not comparable, and a results table that omits both is a table of opinions.

Build a Local, Deterministic Agent Test Harness

Implement a JavaScript runner with a runtime adapter

You do not know yet what interface PrismML exposes. Assume nothing: put every runtime behind one adapter boundary so swapping backends does not touch task logic.

runner.js — adapter boundary and JSONL logging
import { appendFileSync } from "node:fs";


// Reference adapter for an OpenAI-compatible chat endpoint.
// This is an ASSUMPTION, not a PrismML interface. If PrismML exposes a
// different API, implement the same complete() contract around it.
export function createChatAdapter({ baseUrl, model, apiKeyEnv = "LOCAL_RUNTIME_API_KEY" }) {
return {
  async complete({ messages, tools, maxOutputTokens = 512, signal }) {
    const headers = { "content-type": "application/json" };
    if (process.env[apiKeyEnv]) headers.authorization = "Bearer " + process.env[apiKeyEnv];
    const t0 = performance.now();
    const res = await fetch(baseUrl + "/v1/chat/completions", {
      method: "POST",
      headers,
      signal,
      body: JSON.stringify({
        model, messages, tools, stream: false,
        temperature: 0, top_p: 1, max_tokens: maxOutputTokens,
      }),
    });
    const body = await res.json();
    return { ok: res.ok, status: res.status, body, latencyMs: performance.now() - t0 };
  },
};
}

export async function runTrial({ adapter, task, logger, maxSteps = 8, deadlineMs = 60_000 }) {
const startedAt = performance.now();
const state = task.init();
const transcript = [];
let steps = 0;
let status = "incomplete";

while (steps < maxSteps && performance.now() - startedAt < deadlineMs) {
  steps += 1;
  const turn = await adapter.complete({
    messages: task.messages(state, transcript),
    tools: task.tools(),
    signal: AbortSignal.timeout(Math.max(1, deadlineMs - (performance.now() - startedAt))),
  });
  transcript.push({ step: steps, toolCalls: turn.body?.choices?.[0]?.message?.tool_calls ?? [] });
  if (!turn.ok) { status = "runtime_error"; break; }

  const dispatched = task.dispatch(turn.body, state); // tool boundary lives here
  transcript.push({ step: steps, dispatch: dispatched });
  if (dispatched.fatal) { status = "tool_error"; break; }
  if (task.isDone(state)) { status = task.oracle(state) ? "pass" : "fail"; break; }
}

const record = {
  taskId: task.id, status, steps,
  wallMs: performance.now() - startedAt,
  finalState: task.serializeState(state),
  transcript,
};
logger(record);
return record;
}

export function jsonlLogger(path) {
return (record) => appendFileSync(path, JSON.stringify(record) + "
");
}

Two things this structure buys you. First, status distinguishes runtime_error, tool_error, pass, and fail — never collapse those into "failed." Second, the transcript is the evidence trail, so a scoring disagreement can be resolved from logs instead of re-running.

Define sandboxed tasks with machine-checkable outcomes

Use synthetic fixtures only. Four task shapes cover most of the failure surface:

  • Record lookup: given a customer name, call lookup_record, return the correct id. Oracle: final answer contains the fixture id.
  • Calculator-assisted totals: fetch three line items, sum them, call write_total once. Oracle: file contents match expected sum exactly.
  • Constrained multi-step retrieval: fetch a record, then fetch its parent only if status === "active", then write a summary. Oracle: summary fields match.
  • Structured file update: read a JSON fixture in the temp directory, modify one nested field, write it back. Oracle: deep-equal against expected object.

Each task needs init() (fresh temp dir, deterministic fixtures, no network), oracle() (pure function over final state), and serializeState() (for the log). If the oracle has to read model prose, the task is not machine-checkable — rewrite it.

Keep the tool boundary outside the model

The model proposes; your code disposes. Enforce all of the following in dispatch():

  1. Name allowlist. Unknown tool names are a fatal tool error, not a fallback.
  2. Argument validation. Reject wrong types, missing required fields, extra fields, and out-of-range numbers before any side effect.
  3. Fixture-level authorization. A write_* call on a record id not present in the current fixture set is denied, regardless of how plausible the argument looks.
  4. Path confinement. Resolve every path and check it is inside the trial temp directory.
  5. No network. The sandbox process has no egress; a tool that wants a URL fails closed.
  6. Step and time caps. Enforced by the runner, not by the prompt.
// tool-boundary.js — every rejection is a counted event, not an exception nobody sees


export function assertInside(root, relative) {
  const base = path.resolve(root);
  const target = path.resolve(base, relative);
  if (target !== base && !target.startsWith(base + path.sep)) {
    throw new Error("path_outside_sandbox");
  }
  return target;
}

export function makeBoundary({ tmpDir, fixtures }) {
  const handlers = {
    lookup_record({ id }) {
      if (typeof id !== "string" || !/^[a-z0-9-]{1,32}$/.test(id)) throw new Error("bad_arg:id");
      const rec = fixtures.records[id];
      if (!rec) return { found: false };            // deterministic, not an exception
      return { found: true, record: rec };
    },
    write_total({ recordId, total }) {
      if (typeof total !== "number" || !Number.isFinite(total)) throw new Error("bad_arg:total");
      if (!fixtures.records[recordId]) throw new Error("denied:unknown_record");
      const file = assertInside(tmpDir, recordId + ".total.json");
      return { write: file, value: total };
    },
  };

  return function dispatch(call) {
    const handler = handlers[call?.function?.name];
    if (!handler) return { fatal: true, reason: "unknown_tool" };
    let args;
    try { args = JSON.parse(call.function.arguments ?? "{}"); }
    catch { return { fatal: false, reason: "unparseable_arguments" }; }
    try { return { fatal: false, result: handler(args) }; }
    catch (err) { return { fatal: true, reason: String(err.message) }; }
  };
}

Note that unparseable_arguments is non-fatal while unknown_tool is fatal. That asymmetry is deliberate: malformed JSON is a model formatting problem you want to count across trials, whereas an invented tool name means the schema or the template is broken and every subsequent run is wasted compute.

Publish task counts and repetition policy

Before execution, state: 12 distinct tasks × 5 trials × 3 context tiers = 180 runs per configuration, plus the retry policy and the timeout. Repeating one task 100 times measures sampling variance on one workflow and says nothing about coverage. Repeating 12 tasks 5 times gives you a rough per-task stability signal and a defensible aggregate.

Also state what you will do with retries: are the 5 trials independent cold attempts, or up to 5 attempts at one task with early stop on success? Those produce very different numbers. I use independent attempts for the accuracy table and a separate bounded-retry loop (max 2 retries, fresh prompt, same fixture) for the cost table.

Measure Peak Runtime Memory, Not Just Weight Size

Explain the memory components

Peak footprint is a sum of things that behave differently over time:

  • Resident weights: pages of the artifact actually mapped and touched. With memory-mapped files, untouched pages are reclaimable and may not appear in RSS at all.
  • Decompression and conversion buffers: sub-2-bit formats need scratch space to materialize higher-precision tiles. Size and lifetime are runtime-specific and must be observed, not assumed.
  • KV cache: grows linearly with tokens, allocated up front or incrementally depending on the runtime.
  • Activation and attention workspaces: roughly flat in token count for a fixed batch, but spiky during prefill.
  • Allocator reservations: caching allocators keep freed blocks; reported "used" memory can stay high after a phase ends.
  • Runtime overhead: tokenizer, server process, Python interpreter, GPU driver context, and your Node harness.

Only the first is advertised. The rest decide whether the deployment fits.

Capture loading, prefill, decoding, and tool-resume peaks

Instrument phases explicitly and sample fast enough that you can tell them apart. On Linux, /proc/<pid>/status gives you VmHWM, the kernel-tracked peak RSS — it cannot miss a short spike the way polling can.

// peak-rss.js — peak RSS is exact; polling is for the timeline


export function readHostPeakRssBytes(pid) {
  const status = readFileSync(`/proc/${pid}/status`, "utf8");
  const m = status.match(/^VmHWM:\s+(\d+)\s+kB$/m);
  return m ? Number(m[1]) * 1024 : null;
}

export function readHostRssBytes(pid) {
  const status = readFileSync(`/proc/${pid}/status`, "utf8");
  const m = status.match(/^VmRSS:\s+(\d+)\s+kB$/m);
  return m ? Number(m[1]) * 1024 : null;
}

Phase markers worth emitting: after_load, after_first_prefill, after_decode_burst, after_tool_resume, at_exit. The after_tool_resume marker is the one people forget. When a tool result is appended and the model must continue, the runtime reprocesses prompt tokens; if the prefix cache missed, that step can produce the highest prefill of the whole trial.

Report out-of-memory as a result, not as a discarded run. A configuration that OOMs at 32k context and passes at 8k has a usable-context answer — deleting the 32k row deletes the finding.

Handle platform accounting correctly

Three accounting rules that change conclusions:

  1. Discrete GPU: report device memory and host memory separately. Never sum them into one "total footprint" number — they are different pools with different failure modes.
  2. Unified memory: do not add CPU and GPU allocations. On a unified-memory host, the GPU view frequently includes memory the CPU also sees. Double-counting is the easiest way to fabricate an OOM.
  3. Mapped files: page-cache residency is reclaimable. A resident-weights figure that includes file-backed pages can drop under pressure, which means your "peak" may overstate steady-state cost while your latency under pressure is still fine.

Document sampler limits: a 100ms poll of GPU memory will miss sub-poll spikes, and vendor telemetry sometimes reports reserved rather than resident memory. Say which instrument you used and what it cannot see.

Find Usable Context Under a Fixed Memory Budget

Relate context growth to cache allocation

KV cache is where context length becomes a bill. The approximate uncompressed size per token:

bytes_per_token = 2 (K and V)
                × layers
                × kv_heads
                × head_dim
                × bytes_per_cache_element

The 2 is K and V. The reason kv_heads appears instead of full attention heads is grouped-query attention, the single largest lever in this formula and one you cannot guess — it is in the model config.

// kv-cache.js — hypothetical config, not PrismML metadata
function kvBytesPerToken({ layers, kvHeads, headDim, bytesPerElement }) {
  return 2 * layers * kvHeads * headDim * bytesPerElement;
}

const config = { layers: 64, kvHeads: 8, headDim: 128, bytesPerElement: 2 };
const perToken = kvBytesPerToken(config);
console.log(`per token: ${(perToken / 1024).toFixed(1)} KiB`);

for (const tokens of [2048, 8192, 32768, 131072]) {
  const gib = (perToken * tokens) / 1024 ** 3;
  console.log(`  ${String(tokens).padStart(6)} tokens -> ${gib.toFixed(2)} GiB (f16)`);
}

const mha = kvBytesPerToken({ ...config, kvHeads: 64 });
console.log(`\nSame model with full MHA: ${(mha / 1024).toFixed(1)} KiB/token`);
console.log(`  32768 tokens -> ${((mha * 32768) / 1024 ** 3).toFixed(2)} GiB`);

Synthetic output for a hypothetical 64-layer, 8-KV-head, 128-dim configuration:

per token: 256.0 KiB
    2048 tokens -> 0.50 GiB (f16)
    8192 tokens -> 2.00 GiB (f16)
   32768 tokens -> 8.00 GiB (f16)
  131072 tokens -> 32.00 GiB (f16)

Same model with full MHA: 2048.0 KiB/token
  32768 tokens -> 64.00 GiB

Read that against the headline. A single 32k-context f16 cache in this hypothetical example costs 8GiB — more than the entire 5.9GB artifact. Quantizing the cache to 8-bit halves it; 2-bit quarters it, at an accuracy cost you measure rather than assume. And if the model turns out to use full multi-head attention instead of GQA, the same context costs eight times more. This is why "5.9GB model" cannot be converted into a memory requirement without the config.

Sweep context while preserving the task

Sweep the variable, hold the task. Build synthetic record sets of increasing size with the relevant fact planted at the beginning, middle, and end, then run the same oracle at each tier. Add fixed overheads to the budget: system instructions, tool schema JSON (frequently 400–900 tokens on their own), accumulated tool results, and reserved output tokens. A "16k context" that leaves 900 tokens for the answer after tools is an 8k task with extra padding.

Tiers worth measuring: 2k, 4k, 8k, 16k, 32k, and the advertised maximum if it is documented. Stop when the configuration fails, and record the failure mode.

Report correctness and stability at each context tier

Three different numbers get called "supported context," and they are not the same:

NumberMeaningHow to obtain
Advertised contextConfig value or vendor claimModel card
Accepted inputLongest prompt the runtime takes without errorBisect until rejection
Usable contextLongest context meeting your accuracy and latency thresholdsSweep with oracle

Report the usability column with the failure taxonomy attached: retrieval errors (fact present but ignored), truncation (runtime silently dropped tokens), allocation failures (OOM at prefill), and output-budget exhaustion (model ran out of reserved tokens mid-answer). These look identical in a pass-rate table and require completely different mitigations.

Test Tool-Call Accuracy Beyond Valid JSON

Score the complete execution chain

A tool call is not a JSON blob; it is a chain of decisions. Score each link separately so a failure localizes:

StageQuestionFailure label
Schema validityDoes it parse and validate against the tool schema?schema_invalid
Tool selectionWas the right tool chosen for this step?wrong_tool
Argument exactnessAre identifiers and numbers exactly right?arg_mismatch
SequencingWere dependent calls ordered correctly?bad_order
AuthorizationDid it stay inside permitted fixture scope?authz_violation
Final stateDoes the sandbox match the expected state?state_mismatch
CompletionDid it finish within steps and time?budget_exhausted

Only rows two and three are usually interesting, and only row three is where compression damage would show up first — a sub-2-bit model is far more likely to garble a customer id than to forget JSON syntax. That is a hypothesis, and it stays one until a matched-hardware comparison against a higher-precision reference shows a difference concentrated in exact-match argument fields.

Exercise no-tool, multi-tool, and error paths

Include at least one task that must be answered with no tool call at all. Models tuned toward tool emission will call something, and penalizing that correctly is part of the evaluation. Include dependent multi-tool chains where the second call cannot be constructed without the first result. Include an unknown record identifier and a tool that returns a deterministic error, and check that the model reports failure rather than retrying forever or inventing a record.

Then attribute failures to the right layer. schema_invalid at a high rate with a clean transcript usually means the chat template does not match the tool format — an adapter bug, not a model bug. Distinguish model-generated mistakes from parser, template, adapter, and tool-service failures in every results table, or you will blame quantization for your own JSON escaping.

Add a scoped untrusted-tool-output test

There is a trust boundary between tool output and model instructions, and it is worth a narrow test. Put a benign instruction-like distractor into a synthetic tool result — text saying a file should be written somewhere outside the sandbox — and verify that the harness refuses it even if the model complies.

// untrusted-tool-output.test.js — asserts the boundary, not the model
const dispatch = makeBoundary({ tmpDir, fixtures });
const attempt = dispatch({
  function: { name: "write_total", arguments: JSON.stringify({ recordId: "../escape", total: 1 }) },
});
console.log(attempt);
// expected: { fatal: true, reason: "denied:unknown_record" }

The assertion is about your code. Report this as a narrow check that a distractor cannot authorize a forbidden sandbox action — not as evidence of general prompt-injection resistance. A single distractor in one fixture proves your boundary holds for that fixture.

Measure Latency Across the Entire Agent Loop

Separate startup, prefill, generation, and task completion

Users experience task completion time. Engineers need the components:

  • cold load: artifact open through first successful call, including any dequantization
  • time to first token, when the runtime streams it
  • decode throughput: output tokens per second over the generation phase
  • tool validation and execution: usually microseconds in a sandbox, worth separating anyway
  • resume cost: the extra prefill after a tool result is appended
  • retries: each one is another full attempt
  • total wall clock to a terminal status

Report total wall clock per task, and the components as a breakdown. A model that decodes 40% faster but needs 1.8× the attempts does not finish tasks faster.

Distinguish cold runs from warmed steady state

Warm and cold are different products. Control prefix-cache reuse explicitly (same prefix warm vs cleared), record background load, note thermal and power state on laptops, and use a fixed trial schedule so run 1 and run 40 are not measuring different machines. If you compare cold startup on one configuration against warm steady state on another, you have manufactured a result.

Practical policy: five cold runs to characterize startup, then a warm block with a documented warmup count, and record whether the runtime's cache was reused. Never average startup into one side of a comparison only.

Show distributions and failure counts

Medians hide the thing users complain about. Report p50, p95, maximum, and n, and report successful-run latency separately from all-run latency. A configuration with a 3-second median over 90 successes and 18 timeouts looks excellent in a median-only table and is not deployable. Preserve timeouts and retry exhaustion so fast failures cannot masquerade as speed.

Calculate Cost per Correctly Completed Agent Task

Define the accounting boundary

Local inference is not free. Include:

  • Measured workload energy. Whole-system power at the wall, or at minimum package-level telemetry with the GPU idle baseline subtracted. Accelerator telemetry alone is not whole-system power.
  • Hardware amortization. An explicit assumption: purchase price, expected service life, and utilization. State all three.
  • Service charges. Electricity price per kWh, plus any hosted fallback, storage, or egress the workflow actually incurs.
  • Failed attempts. Every retry's time, energy, and amortization counts.

Use successful completions as the denominator

cost_per_success = (energy + amortized_hardware + services) / tasks_passing_oracle

If zero tasks pass, the value is undefined, not zero and not "cheap because it ran fast." That one rule eliminates most of the bad economics in local-agent write-ups.

Also avoid double-counting amortization under concurrency. If one host runs four sessions, each session's share of hardware cost is a quarter of the hourly rate — but only if all four are actually busy. At 15% utilization, the per-task share of a continuously-depreciating machine can dominate energy by an order of magnitude.

// cost-per-success.js — SYNTHETIC inputs, illustrative only
const hardware = { priceUsd: 2000, lifeHours: 3 * 8765 }; // 3 years continuous
const perHour = hardware.priceUsd / hardware.lifeHours;   // ~0.0761 USD/h
const kwhPrice = 0.20;

function costPerSuccess({ tasks, attemptsPerTask, secondsPerAttempt, watts, passes }) {
  const hours = (tasks * attemptsPerTask * secondsPerAttempt) / 3600;
  const energy = (watts / 1000) * hours * kwhPrice;
  const amortized = perHour * hours;
  const total = energy + amortized;
  const perSuccess = passes === 0 ? undefined : total / passes;
  return { hours, energy, amortized, total, perSuccess };
}

const configs = [
  { name: "A: 5.9GB, 8k ctx, retries", tasks: 200, attemptsPerTask: 2.4, secondsPerAttempt: 6.0, watts: 110, passes: 90 },
  { name: "B: 12.4GB, 8k ctx, low retry", tasks: 200, attemptsPerTask: 1.05, secondsPerAttempt: 9.5, watts: 145, passes: 183 },
  { name: "C: 5.9GB, 2k ctx, truncating", tasks: 200, attemptsPerTask: 3.1, secondsPerAttempt: 4.1, watts: 105, passes: 12 },
];

for (const c of configs) {
  const r = costPerSuccess(c);
  const per = r.perSuccess === undefined ? "undefined (0 passes)" : "$" + r.perSuccess.toFixed(6);
  console.log(`${c.name}\n  wall ${r.hours.toFixed(3)}h  total $${r.total.toFixed(4)}  per success ${per}`);
}

Synthetic output — these are invented inputs, not PrismML measurements:

A: 5.9GB, 8k ctx, retries
  wall 0.800h  total $0.0785  per success $0.000872
B: 12.4GB, 8k ctx, low retry
  wall 0.554h  total $0.0583  per success $0.000319
C: 5.9GB, 2k ctx, truncating
  wall 0.706h  total $0.0692  per success $0.005766

Show a labeled hypothetical calculation

Config A wins every number people quote — smallest artifact, fastest per attempt, lowest watts — and loses by 2.7× per successful task to a larger, slower model, because 2.4 attempts per task against a 45% completion rate multiplies cost while dividing successes. Config C is faster still and 18× worse than B: cheap tokens, expensive answers. Vary utilization, electricity price, and hardware lifetime in the generator and the ordering can flip — at 0.10 USD/kWh and 40% utilization, amortization dominates energy and the completion-rate penalty grows.

That is the whole argument against artifact-size-as-proxy. The denominator decides.

Turn Measurements into an Auditable Viability Decision

Publish a results schema before filling the table

Decide the columns before you have data, so you cannot unconsciously design around a weak result. Here is the shape, filled with not measured:

FieldValue
Model id / revisionnot measured
Runtime / version / backendnot measured
Hardware and envelopenot measured
Artifact size (bytes, sha256)not measured
Peak host RSSnot measured
Peak device memorynot measured
Usable context (thresholds met)not measured
Tool-call schema validitynot measured
Argument exactnessnot measured
Tasks passing oraclenot measured
Latency p50 / p95 / max (n)not measured
Cost per successnot measured

"Not measured" is a complete and honest entry. A blank cell invites someone else to fill it with a guess.

Keep observations separate from explanations

Every behavioral finding needs four attachments: exact model revision, the task inputs, the scoring criterion, and the trial count. Then split the write-up in two:

  • Observation: "At 16k context, 7 of 20 trials ended state_mismatch on the multi-step retrieval task."
  • Explanation (hypothesis): "Likely a retrieval failure under long context, possibly aggravated by sub-2-bit weight precision. Untested — requires a matched-hardware comparison against a higher-precision artifact."

Reversed, that reads as a fact about quantization. Suspected compression-related quality loss and suspected backend bottlenecks are hypotheses until a controlled comparison supports them, and the control is matched hardware and matched runtime.

Map failures to mitigations and retests

Each failure class has a mitigation with a price:

FailureMitigationWhat you pay
OOM at long contextReduce context tier, quantize KV cacheAccuracy at long range; cache-quant quality loss
Context truncationBudget prompts, trim tool schemas, summarize tool resultsToken overhead, extra steps
arg_mismatch on idsConstrain decoding, validate-and-repair, stricter schemasLatency, added code surface
authz_violationHarden the tool boundary, deny by defaultNothing — this is not a trade-off
High retry rateBounded retries, route hard tasks elsewhereCost, data locality if the fallback is hosted
Tail latencyLower concurrency, explicit offload, smaller output capsThroughput, answer completeness
Peak memory overrunsExplicit layer offload, smaller batchThroughput

After each mitigation, re-run the same suite with the same trial counts and publish both the before and after rows. A mitigation without a retest is a hope.

Conclusion — Judge PrismML by Completed Work, Not Artifact Size

Return to the specific claim

The report's claim — a 27B-class model at 5.9GB, with improved agent performance for on-device AI — is worth taking seriously as a storage result. If it holds up, it changes what fits on a consumer device, and that is meaningful.

It is not evidence of local agent viability. Under the stated assumptions the ratio implies roughly 1.75 bits per parameter, a regime with known quality costs and unknown behaviour on exact-match argument fields. The artifact size says nothing about KV cache growth, peak resident memory during prefill, usable context under a fixed budget, or cost per correctly completed task — and those are what a deployment decision actually rests on.

Two things would move this from interesting to actionable. Disclosures: model identity and revision, exact parameter accounting, compression method, artifact manifest with hashes, license, runtime compatibility, and the evaluation behind the agent claim. Measurements: peak host and device memory by phase, usable-context table with a failure taxonomy, tool-call accuracy split into schema validity and argument exactness, a latency distribution with failure counts, and cost per success with successes in the denominator.

Until both exist, the correct posture is a frozen harness, a written envelope, published acceptance thresholds, and an empty results table with not measured in every cell. That is not scepticism for its own sake. It is the only way the first real number you get will mean something.

Further Reading and Reproducibility Materials

Preserve source provenance

The claim discussed here comes from secondary reporting: BigGo Finance, "PrismML Compresses 27B-Class Model to 5.9GB, Boosting Agent Performance for On-Device AI", dated November 25, 2026, reached via a Google News RSS link. Link rot is common on that route; cite the publication and date alongside the URL.

PrismML documentation, artifact pages, model cards, and benchmark repositories are deliberately not linked here. None of them were available to me in verified form while writing, and inventing a plausible-looking documentation URL is worse than omitting it. When they exist, add them under this section with a one-line note on what each source actually establishes — and keep the distinction between the vendor's own evaluation and your independent run visible in the list.

Share this post

More posts

Loading comments…