PCCG-Qwen3-4B: Equality-Conditioned Continuation

Rayan Pal
getswiftapi.com
Independent Researcher

Qwen3-4B-derived open-weight model trained to compare four-digit operands and select GO or native EOS.

The model generates a four-bit comparison trace inside <think>. Each bit records whether the corresponding digits match. Equal operands produce GO followed by EOS. Unequal operands produce EOS immediately after </think>, with zero final-answer payload.

This release is limited to fixed-width four-digit equality and the tested GO/EOS continuation policy; it does not claim general prerequisite reasoning.

System prompt:

A binding condition is the prerequisite that must hold for valid continuation.
User input Raw generated sequence
CONDITION: EQ(2019,2019) <think>1 1 1 1</think>GO<|im_end|>
CONDITION: EQ(2019,2011) <think>1 1 1 0</think><|im_end|>

<|im_end|> is native EOS, token ID 151645.

Run

Download the complete package, including weights/. Use Linux, Python 3.11 or newer, and a CUDA GPU with native BF16 support and at least 12 GiB of free GPU memory. A 16 GB GPU is suitable.

From this directory:

python reproduce.py

The command prepares the pinned dependencies, loads the fused weights once, and runs both inputs above with thinking enabled and native greedy decoding. It prints the exact messages, generated token IDs, untrimmed decoded text, and PASS: 2/2 exact sequences. A mismatch prints the actual output and returns a nonzero exit code.

Matching installed dependencies are reused. Otherwise, the command creates an isolated environment under ~/.cache/equality-model/ (XDG_CACHE_HOME overrides the cache location). It does not install into the system environment or fall back to CPU.

The command reports setup, model-load, and generation time separately. First-time dependency installation and the approximately 8 GB model download can take more than two minutes.

Verify

python verify.py

This separate command checks package hashes, the fused-model identity, and all 4,096 saved token sequences and logit records. It recalculates the digit-comparison targets and scores. It uses the Python standard library, requires no GPU, and does not generate new outputs.

Evaluation

Exact comparison traces and output sequences: 4,096 / 4,096, including 1,024 / 1,024 on the separate final set.

Results and records. Training specification.

Files

  • weights/: fused model and tokenizer.
  • reproduce.py: one-command environment setup and paired inference.
  • infer.py: model loading, native generation, and output checking.
  • verify.py: offline package and recorded-result verification.
  • evaluation/: evaluation cases, generated tokens, raw logits, and scores.
  • training/selected-training.json: final-stage training examples.
  • provenance/: recorded fine-tuning lineage, source identities, training-data audit, and portable overlap verification.
  • SHA256SUMS: package file hashes.
  • LICENSE: Apache 2.0.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support