Skip to content

Latest commit

 

History

History
99 lines (76 loc) · 3.51 KB

File metadata and controls

99 lines (76 loc) · 3.51 KB

Local Counter-Reading Model Layer

What the code does

The participant first chooses an authored position. If the counter-reading condition is selected, the browser loads a small instruction model through a locally installed JavaScript runtime, supplies only the scenario and authored position labels, and asks for two sentences arguing against the selected position. The participant must then accept, overrule or revise.

This is a real local generation path. It uses no API key, application server or hosted inference.

Exact generator

Field Value
Model SmolLM2-360M-Instruct
Revision 6849e9f
Parameters 360 million
Runtime Transformers.js 3.8.1
Device WebGPU
Quantisation q4f16
Maximum output 96 new tokens
Declared model origin https://huggingface.co

The runtime is installed locally and bundled with the demo; it is not loaded as a third-party script. On first successful use, model assets are requested with GET or HEAD, without a request body, from the declared model origin. The runtime uses the browser cache. Browser eviction can require another model download.

Network enforcement

  • The baseline application code makes no request after its static module graph loads.
  • The model module is imported only for the counter-reading condition.
  • The model request guard permits same-origin static assets and bodyless GET/HEAD requests under the pinned model path at the declared origin.
  • Any other origin, method or request body throws before the request is made.
  • No prompt, position, reason, receipt or model output is placed in a request.
  • No analytics or telemetry code is present.

Input and output boundary

The prompt contains:

  • the authored scenario;
  • the three authored position labels;
  • the selected position;
  • an instruction to argue the other side without deciding for the participant.

It does not include the participant's free-text reason. There is no retrieval, search, private corpus or participant profile. Output is rejected when it contains a URL, numerical claim, source claim, falls outside the length limit or lacks minimum lexical overlap with the scenario.

This is input and output constraint, not removal of the model's pretrained knowledge. A passing output may still contain a poor inference. The participant therefore sees it as a contestable argument, never a verdict.

In supported-browser verification, the runtime reported that a small number of shape-related operations were assigned to CPU for performance while the model session used the WebGPU execution provider. This was a runtime performance notice, not scripted fallback or hosted inference.

Scripted fallback

If WebGPU is absent, model loading fails or generated output fails the boundary check, the interface shows an authored counter-reading and states: “This counter-reading is scripted, not model-generated.”

The receipt then records:

{
  "kind": "scripted-fallback",
  "script_name": "lsp-counter-reading-fallback",
  "script_version": "CRF-001",
  "fallback_reason": "webgpu-unavailable"
}

Scripted encounters are not counted as model-generated encounters in the proposed primary analysis.

Receipt rule

Every completed counter-reading receipt records:

  • initial position;
  • counter-reading verbatim;
  • generator kind, name and version, or scripted-fallback version;
  • participant response;
  • mandatory reason when the participant overrules;
  • final position.

No receipt asserts that the response was correct or that an autonomy effect occurred.