foryourhealth111-pixel/Vibe-Skills / bundled/skills/nowait-reasoning-optimizer
nowait-reasoning-optimizer
VerifiedImplements the NOWAIT technique for efficient reasoning in R1-style LLMs. Use when optimizing inference of reasoning models (QwQ, DeepSeek-R1, Phi4-Reasoning, Qwen3, Kimi-VL, QvQ), reducing chain-of-thought token usage by 27-51% while preserving accuracy. Triggers on "optimize reasoning", "reduce thinking tokens", "efficient inference", "suppress reflection tokens", or when working with verbose CoT outputs.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.8 KB |
| refrences/keywords.md | markdown | 4.0 KB |
| scripts/nowait_processor.py | script | 9.9 KB |
refrences/keywords.md
View on GitHub# NOWAIT Keywords Reference
Complete reference for reflection keywords used in the NOWAIT technique.
## Primary Keywords (from paper)
These keywords were empirically identified from 32 independent runs of QwQ-32B on AIME 2025, using `\n\n` as delimiters to identify the 15 most frequent monolingual transition words.
### Core Suppression List
```python
KEYWORDS = [
"wait", # Most common reflection trigger
"alternatively", # Indicates exploring different approach
"hmm", # Hesitation marker
"but", # Contradiction/reconsideration
"however", # Contradiction/reconsideration
"alternative", # Exploring options
"another", # Switching approach
"check", # Verification trigger
"double-check", # Re-verification
"oh", # Realization marker
"maybe", # Uncertainty/reconsideration
"verify", # Verification trigger
"other", # Exploring alternatives
"again", # Repetition/re-check
"now", # Transition marker
"ah", # Realization marker
"any", # Exploring possibilities
]
```
## Excluded Patterns
These patterns should NOT be suppressed as they are false positives:
```python
EXCLUDED = [
"ohio", # Contains "oh" but is a proper noun
"butane", # Contains "but" but is a chemical
"button", # Contains "but" but is a UI element
"butterfly", # Contains "but" but is a noun
"checkout", # Contains "check" but is a noun/verb
"checksum", # Contains "check" but is technical term
"another's", # Possessive form, often necessary
]
```
## Token Expansion
For each keyword, the processor expands to all vocabulary variants:
| Keyword | Expanded Variants |
|---------|-------------------|
| wait | wait, Wait, WAIT, " wait", " Wait", ".wait", ",wait", etc. |
| hmm | hmm, Hmm, HMM, " hmm", "...hmm", etc. |
| alternatively | alternatively, Alternatively, " Alternatively", etc. |
## Model-Specific Tuning
Different models may benefit from adjusted keyword lists:
### QwQ-32B / DeepSeek-R1
- Use full default list
- High reduction potential (30%+)
### Phi4-Reasoning-Plus
- Use full default list
- Consider adding: "let me think", "I wonder"
### Kimi-VL (Multimodal)
- Use full default list
- Very high reduction (40-60%)
- May need domain-specific additions for visual tasks
### Qwen3 Series
- RL-based (32B): Use full list
- Distilled (4B/8B/14B): Consider removing "but", "however" to preserve some reasoning flow
## Keyword Categories
### Self-Reflection Markers
- `wait`, `hmm`, `oh`, `ah`
- Signal: Model is pausing to reconsider
### Verification Triggers
- `check`, `double-check`, `verify`
- Signal: Model is validating previous work
### Alternative Exploration
- `alternatively`, `alternative`, `another`, `other`
- Signal: Model is exploring different approaches
### Contradiction/Reconsideration
- `but`, `however`, `maybe`
- Signal: Model is reconsidering previous conclusion
### Transition Markers
- `now`, `again`, `any`
- Signal: Model is shifting focus or repeating
## Benchmark Results by Keyword Removal
| Keywords Removed | AIME 2025 ACC | Token Reduction |
|-----------------|---------------|-----------------|
| None (baseline) | 66.67% | 0% |
| wait only | 67.33% | 15% |
| wait + hmm | 67.67% | 22% |
| All 17 keywords | 68.00% | 31% |
## Implementation Notes
### Logit Suppression Value
- Default: `-1e10` (effectively negative infinity)
- Alternative: `-100` (softer suppression, allows rare occurrence)
### Vocabulary Iteration
```python
def build_suppressed_tokens(tokenizer, keywords):
suppressed = set()
vocab = tokenizer.get_vocab()
for token_text, token_id in vocab.items():
for keyword in keywords:
if keyword.lower() in token_text.lower():
suppressed.add(token_id)
break
return suppressed
```
### Performance Considerations
- Token set is built once at initialization
- Lookup is O(1) per token during generation
- Memory overhead: ~few KB for token ID setRelated skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |