Instructions to use sharthokrayanpal/PCCG-Qwen3-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sharthokrayanpal/PCCG-Qwen3-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sharthokrayanpal/PCCG-Qwen3-4B")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("sharthokrayanpal/PCCG-Qwen3-4B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sharthokrayanpal/PCCG-Qwen3-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sharthokrayanpal/PCCG-Qwen3-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sharthokrayanpal/PCCG-Qwen3-4B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sharthokrayanpal/PCCG-Qwen3-4B
- SGLang
How to use sharthokrayanpal/PCCG-Qwen3-4B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "sharthokrayanpal/PCCG-Qwen3-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sharthokrayanpal/PCCG-Qwen3-4B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "sharthokrayanpal/PCCG-Qwen3-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sharthokrayanpal/PCCG-Qwen3-4B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sharthokrayanpal/PCCG-Qwen3-4B with Docker Model Runner:
docker model run hf.co/sharthokrayanpal/PCCG-Qwen3-4B
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.