Downloads · 30 days
821
100% of all-time downloads
junshim/When2Think-1.5B
When2Think-1.5B is a text generation model from junshim. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
When2Think-1.5B is a post-trained hybrid reasoning model that learns both whether to reason explicitly and how much reasoning to allocate to each problem.
Downloads · 30 days
821
100% of all-time downloads
All-time downloads
821
Public
Parameters
1.8B
7.1 GB on disk
Likes
3
Trending 2
Click a slice to open those files.
.safetensors7.1 GB · 100%
From the Hugging Face model README
When2Think-1.5B is a post-trained hybrid reasoning model that learns both whether to reason explicitly and how much reasoning to allocate to each problem.
The model encourages direct answering on easier instances while preserving extended reasoning on harder ones. Unlike uniform length-compression methods, When2Think treats reasoning depth as an instance-adaptive resource.
When2Think-1.5B is an RLVR-post-trained version of deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B The model learns two reasoning behaviors:
When2Think is trained with Instance-level Difficulty-Aware Control (IDAC), which regulates reasoning depth using pre-computed reference accuracy and token-usage statistics. Batch-Wise Standardization (BWS) converts the resulting trajectory rewards into standardized advantages, enabling stable critic-free PPO-style optimization.
Importance sampling (IS) is used during post-training to balance exploration between Think and NoThink. These training components are not required at inference time. The released model generates its learned hybrid reasoning behavior as a standalone causal language model.
<!-- - **Developed by:** [More Information Needed] - **Funded by [optional]:** [More Information Needed] - **Shared by [optional]:** [More Information Needed] - **Model type:** [More Information Needed] - **Language(s) (NLP):** [More Information Needed] - **License:** [More Information Needed] - **Finetuned from model [optional]:** [More Information Needed] -->| Model | Whether to Think | How Deeply to Think |
|---|---|---|
| When2Think-1.5B | Learned through IS-based hybrid exploration | Controlled through IDAC |
| ThinkOnly-1.5B | Always Think (without IS) | Controlled through IDAC |
When2Think-1.5B is intended for:
The model can be loaded as a standard causal language model using Hugging Face Transformers. No separate router, verifier, critic, difficulty estimator, reward model, or reference policy is required for inference.
The checkpoint may be used as a starting point for:
Use the code below to get started with the model.
from transformers import pipeline
model_path = "junshim/When2Think-1.5B"
prompt = "Find the value of $x$ that satisfies the equation $4x+5 = 6x+7$."
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": prompt}
]
generator = pipeline(
"text-generation",
model=model_path,
device_map="auto",
dtype="auto"
)
outputs = generator(
messages,
max_new_tokens=512,
clean_up_tokenization_spaces=False
)
from accelerate import Accelerator
from transformers import AutoModelForCausalLM, AutoTokenizer
accelerator = Accelerator()
device = accelerator.device
model = AutoModelForCausalLM.from_pretrained(
model_path,
torch_dtype="auto",
device_map=device
)
tokenizer = AutoTokenizer.from_pretrained(model_path)
print(model.generation_config, device)
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer([text], return_tensors="pt").to(device)
generated_ids = model.generate(
**inputs,
max_new_tokens=512
)
output_text = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
import re
ASSISTANT_RE = re.compile(
r"<|Assistant|>(.*?)(?=<|User|>|<|end of sentence|>|$)",
re.DOTALL,
)
THINK_RE = re.compile(r"<think>(.*?)</think>", re.DOTALL)
def parse_deepseek_r1(text: str) -> list[dict]:
dialogue = []
for match in ASSISTANT_RE.finditer(text):
assistant = match.group(1).strip()
think = THINK_RE.search(assistant)
if think:
reasoning = think.group(1).strip()
content = (
assistant[:think.start()] + assistant[think.end():]
).strip()
else:
reasoning = None
content = assistant
dialogue.append({
"reasoning": reasoning,
"content": content,
})
return dialogue
parse_deepseek_r1(output_text)
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
BibTeX:
@misc{shim2026when2think,
title = {When2Think: Learning Difficulty-Aware Length Control for Efficient Hybrid Reasoning Models},
author = {Jaejun Shim and HyunJin Kim and Young Jin Kim and JinYeong Bak},
year = {2026},
eprint = {2609.19671},
url = {https://arxiv.org/abs/2609.19671}
}
[More Information Needed]