Expand description
Micro Evolution Mode — For 0.8B-3B Parameter Models
Small models struggle with:
- Large context windows (>4K tokens)
- Complex multi-file reasoning
- Precise JSON array formatting
- Multi-step search-and-replace
This module provides simplified mutation strategies that trade sophistication for reliability on resource-constrained hardware.
Constants§
- MICRO_
MAX_ CONTEXT_ CHARS - Maximum context size for micro mode (in characters) ~4K tokens ≈ 16K chars for code
- MICRO_
MAX_ EDITS - Maximum edits per hypothesis in micro mode Small models do better with single, focused changes
- MICRO_
MAX_ FILES - Maximum files to include in micro mode context
Functions§
- build_
micro_ context - Build micro-mode context with aggressive truncation
- build_
micro_ system_ prompt - Simplified system prompt for micro models
- is_
micro_ model - Detect if we should use micro mode based on model name. Matches small parameter counts as word-bounded tokens to avoid false positives (e.g. “32b” matching “2b”, “13b” matching “3b”).
- select_
micro_ targets - Filter and limit mutation targets for micro mode Returns the smallest files first, limited by MICRO_MAX_FILES
- validate_
micro_ hypothesis - Validate that a hypothesis is “micro-safe”