CIRF-Qwen3-8B-Instruct-Full
A CIRF reasoning model fine-tuned from Qwen3-8B, trained with full explicit result supervision: every intermediate result is written out in the training targets.
The LoRA update is merged into the dense BF16 weights and the 514 new tokens ([sof], [eof], [f_0] to [f_511])
are included with their trained embedding and output rows, so the model loads with plain Transformers (no PEFT, base checkpoint or CIRF code needed).
Prompt format
QUESTION[sof]
No chat template. The model writes a trace of functional tokens with optional result values, then [eof] and the final answer, and stops at the tokenizer's EOS token. Stop on EOS, not on [eof], and decode with skip_special_tokens=False to keep the boundaries.
Inference
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "JhCIFT/CIRF-Qwen3-8B-Instruct-Full"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(repo_id, dtype=torch.bfloat16, device_map="auto").eval()
prompt = "What is 2 + 2?[sof]"
inputs = tokenizer(prompt, add_special_tokens=False, return_tensors="pt").to(model.device)
with torch.inference_mode():
output = model.generate(**inputs, max_new_tokens=384, do_sample=False,
eos_token_id=tokenizer.eos_token_id, pad_token_id=tokenizer.pad_token_id)
ids = output[0, inputs.input_ids.shape[1]:].tolist()
if tokenizer.eos_token_id in ids:
ids = ids[:ids.index(tokenizer.eos_token_id)]
trace = tokenizer.decode(ids, skip_special_tokens=False)
print(trace)
print(trace.split("[eof]", 1)[1].strip() if "[eof]" in trace else None)
The evaluation below additionally limits each trace to 32 functional tokens (forcing [eof] when the limit is reached). The included inference.py reproduces that protocol and needs only Torch and Transformers:
python inference.py --model JhCIFT/CIRF-Qwen3-8B-Instruct-Full --question "What is 2 + 2?"
Test accuracy
| Test set | Questions | Accuracy |
|---|---|---|
| GSM8K | 1,319 | 73.62% |
| MultiArith | 178 | 100.00% |
| SVAMP | 300 | 87.00% |
| CommonsenseQA | 1,221 | 82.56% |
| Coin Flip (parity-corrected) | 3,333 | 99.73% |
Greedy decoding, at most 384 new tokens and 32 functional tokens, exact-match answer scoring. Coin Flip is scored against the parity of the flips stated in the question, because about 20% of the dataset's labels disagree with it. The full per-dataset results, including MATH-500, StrategyQA and batch-1 latency, are in test_results.json; training_config.json, provenance.json and export_verification.json record the training settings, source checkpoint hashes and export checks.
Related models
- CIRF-Qwen3-8B-Instruct-Full (this model)
- CIRF-Qwen3-8B-Instruct-Zero-Results
- CIRF-Qwen3-8B-Instruct-Backward-Greedy-3
- CIRF-Qwen3-8B-Instruct-Backward-Greedy-6
- CIRF-Qwen3-8B-Instruct-Backward-Greedy-12
- CIRF-Qwen3-8B-Instruct-Backward-Greedy-18
- CIRF-Qwen3-8B-Instruct-Backward-Greedy-24
License
The base model is Qwen/Qwen3-8B, released under Apache 2.0; this derivative keeps that license (LICENSE). Changes comprise the CIRF functional-token vocabulary, learned embedding and output rows, supervised adaptation, and the merged LoRA update.