Microsoft FastContext-1.0-4B-SFT Speeds Up AI Code Search

FastContext-1.0-4B-SFT is a lightweight repository exploration subagent designed to assist large language model coding agents. It works by separating the task of exploring a codebase from the actual problem solving process. When called upon by a main agent, it runs parallel read-only tool calls and returns focused file paths and line ranges.
Microsoft known for the Lens models developed this tool to help coding agents find relevant code more efficiently. They trained the model using supervised fine-tuning and reinforcement learning to improve its search and citation abilities. The company designed it to reduce the heavy token consumption that usually happens during repository exploration.
Core capabilities and practical applications
- Returns compact file paths and line ranges.
- Runs multiple parallel read-only tool calls.
- Handles up to 262K context length.
- Built on the Qwen3-4B-Instruct model backbone.
- Reduces main agent total token consumption.
This tool is built for developers who use AI coding agents to manage large codebases. It helps them save computing power by cutting down the tokens the main agent needs to read and search files. Teams can use this subagent to improve their problem resolution rates while keeping their local AI setups efficient.
Technical details and training process
The model uses only three tools to explore code: READ, GLOB, and GREP. Training occurred in two stages, starting with supervised fine-tuning and followed by task-grounded reinforcement learning. Testing shows that integrating this tool can improve resolution rates by up to 5.5 percent while cutting token use by up to 60 percent.
"FastContext moves this work into a dedicated subagent so the main agent receives clean, grounded evidence rather than the long trail of exploratory reads and searches." Source: Hugging Face