tiny-random-Qwen3_5ForCausalLM-onnx
A 4-layer Qwen3_5ForCausalLM with random weights, exported to ONNX (opset 17) for the tests of the Unity package tools.doji.transformers. Layers 0 to 2 use the linear attention of Gated DeltaNet, and layer 3 uses full attention, as in Qwen3.5. It uses the tokenizer of Qwen/Qwen3.5-0.8B (revision 2fc06364715b967f1860aea9cf38778875588b17, Apache 2.0 license). It generates random text.
The gated delta rule of each linear attention layer is one node of the custom domain ai.doji: GatedDeltaRule, with the inputs query, key, value, g, beta and initialState, the outputs output and finalState, and the float attribute scale. tools.doji.onnx-model-loader loads it as the GatedDeltaRule layer of tools.doji.sentis-utils. All other nodes use standard ops.
One model runs the prompt and each new token:
- In:
input_ids,attention_mask,position_ids. For each full attention layer,past_key_values.{i}.key/value. For each linear attention layer,past_conv.{i}(the state of the causal convolution) andpast_recurrent.{i}(the state of the gated delta rule). - Out:
logits,present.{i}.key/value,present_conv.{i}andpresent_recurrent.{i}.
Made with tools/causal_lm/make_models.py tiny --arch qwen3_5 in the package repository.
- Downloads last month
- 26