A file hash proves that two machines loaded the same model. It does not prove that they will behave the same way. CertiK, a Web3 security firm, has published a demonstration of a technique called Weight2Shell. In this method, the same model is treated differently by using common hardware differences. On a machine the model follows the prompts naturally. The same prompt in another forces the model to call a tool.

test

CertiK sends the same prompt to both systems: "hello Mr Andersen". For an Alibaba Qwen model. On a local MacBook, the model triggers a tool call, which launches the Calculator app. A cloud server running an NVIDIA A100 GPU greets the model as expected: "Hello! How can I assist you today, Mr. Andersen?"

The weights were identical. The difference comes from how each platform does the math.

numerical gap

Computers store decimal numbers in floating-point format. Very small values, called subnormal numbers, lose precision, and hardware and software libraries do not handle them in the same way. CertiK has run a simple test. 2^-130 doubling the subnormal value results in zero on an Apple Mac. The same operation gives 2^-129 on the cloud server.

This gap may seem insignificant. But in a neural network it can have a big impact.

Why does a small value change the answer?

Large language models are built by concatenating many transformer layers. Each layer contains a gated multi-layer perceptron, which determines how much information will flow. The output of the gate often comes from an activation function such as SiLU. A gate value close to zero acts like a switch, almost closed. This switch can control whether Python uses model coding knowledge when looking at syntax, or suppresses that knowledge for a creative writing request.

When the gate value is too small, the fate is determined by the platform. In Mac the value is rounded to zero and the neuron is disabled. The value is persisted to the cloud server and the neuron is active. As a result, two machines start from the same weight and process different signals.

CertiK compares this attack to an environment gate training. The attacker constructs the model in such a way that this gate has a large effect on one platform and almost no effect on another. As a result the model either rejects or responds depending on where it is running. In demonstration, it asks an agent to run the tool on one platform and throttles that request on another.

Supply-chain risk

When the agent has permission to run the tool, the risk increases. If a model tells an agent to execute a command, it can have real effects on the host system. A vendor can provide weights that pass review on a test server and then become active in production.

CertiK states: "Floating-point differences between hardware and inference stacks can act as backdoor triggers in large language models." (The floating-point difference between the hardware and the inference stack can act as a backdoor trigger in large language models.) The company also notes that the same checkpoint gave a polite greeting in their Codex test on the A100, while Apple opened Calculator on the Silicon Mac.

For those evaluating third-party models, the learning is straightforward. If the hash matches, the file is confirmed. But it says nothing about how the behavior will be on your hardware.

to be done

CertiK recommends several steps:

Validate each model in the environment where the model will run. Check the GPU, driver, runtime and precision settings used in production.

Test not only the model, but the agent together with its serving layer and tool permissions.

Match each tool request made by the model to the client's execution log. Identify any requests that appear without a user's associated action.

Rerun these tests when the inference stack changes, including updates to drivers, libraries, quantization, or hardware.

Teams running mixed fleet models such as developer laptops and cloud GPUs will also need to decide which platform to consider as a reference. If a developer tests on a Mac and the service runs on NVIDIA, the test results indicate the wrong system.

Weight2Shell does not rely on any new software bugs. It depends on the gap between what a file says and what a platform actually calculates. Organizations installing models from outside sources should adopt behavioral testing as a standard control in production environments, just as they adopt code reviews and signed builds.