Instructions to use JhCIFT/CIRF-Qwen3-8B-Instruct-Full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JhCIFT/CIRF-Qwen3-8B-Instruct-Full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JhCIFT/CIRF-Qwen3-8B-Instruct-Full")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JhCIFT/CIRF-Qwen3-8B-Instruct-Full") model = AutoModelForCausalLM.from_pretrained("JhCIFT/CIRF-Qwen3-8B-Instruct-Full", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JhCIFT/CIRF-Qwen3-8B-Instruct-Full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JhCIFT/CIRF-Qwen3-8B-Instruct-Full" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JhCIFT/CIRF-Qwen3-8B-Instruct-Full", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JhCIFT/CIRF-Qwen3-8B-Instruct-Full
- SGLang
How to use JhCIFT/CIRF-Qwen3-8B-Instruct-Full 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 "JhCIFT/CIRF-Qwen3-8B-Instruct-Full" \ --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": "JhCIFT/CIRF-Qwen3-8B-Instruct-Full", "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 "JhCIFT/CIRF-Qwen3-8B-Instruct-Full" \ --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": "JhCIFT/CIRF-Qwen3-8B-Instruct-Full", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JhCIFT/CIRF-Qwen3-8B-Instruct-Full with Docker Model Runner:
docker model run hf.co/JhCIFT/CIRF-Qwen3-8B-Instruct-Full
Configuration Parsing Warning:In tokenizer_config.json: "tokenizer_config.chat_template" does not match any of the allowed types
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.
- Downloads last month
- 288