Squeez-2B is a 2B parameter model fine-tuned from Qwen 3.5 2B for task-conditioned tool-output pruning in coding agents. Given a focused query and one raw tool observation, it extracts the smallest verbatim evidence block the agent should inspect next — removing 92% of input tokens while retaining 0.86 recall.
The fine-tuned 2B model is also the most precise system in the comparison, indicating it has learned a tool-specific extraction policy rather than relying on generic instruction following.
Qualitative patterns
Pattern
Example
Squeez-2B
Baseline failure
Precise selection
git_log, 21 lines — find one commit
Selects the single correct entry
Qwen 35B picks a plausible but wrong commit
Failure-block extraction
Service log, 176 lines — two similar TLS errors
Returns the correct 5-line block
Qwen 35B picks the wrong TLS error (different timestamp)
Correct empty prediction
docker_logs, 316 lines — no matching evidence
Returns empty output
Qwen 35B generates "No relevant lines found..."
Adjacent over-selection
Build output, 110 lines — Dockerfile error
Finds the right error + nearby noise
Qwen 35B misses the Dockerfile error entirely
On the 59 negative examples in the test set, Squeez-2B correctly returns empty output 80% of the time. Qwen 35B returns empty only 7% of the time.
Quick Start
CLI (recommended)
bash
1pip install squeez
23# With vLLM server4vllm serve KRLabsOrg/squeez-2b --dtype bfloat16 --max-model-len 163845exportSQUEEZ_SERVER_URL=http://localhost:8000/v1
67pytest -q 2>&1| squeez "find the failure block"8git log --oneline -50 | squeez "find the commit that changed CSRF handling"9cat src/auth/middleware.py | squeez "find the referer validation logic"
Python API
python
1from squeez.inference.extractor import ToolOutputExtractor
23# vLLM server4extractor = ToolOutputExtractor(base_url="http://localhost:8000/v1")56# Or local7extractor = ToolOutputExtractor(model_path="KRLabsOrg/squeez-2b")89filtered = extractor.extract(10 task="Find the failing test block",11 tool_output=raw_output,12)
With transformers directly
python
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
34model_name ="KRLabsOrg/squeez-2b"5tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)6model = AutoModelForCausalLM.from_pretrained(7 model_name,8 torch_dtype=torch.bfloat16,9 device_map="auto",10 trust_remote_code=True,11)1213messages =[14{"role":"system","content":(15"You prune verbose tool output for a coding agent. "16"Given a focused extraction query and one tool output, return only the "17"smallest verbatim evidence block(s) the agent should read next. "18"Return the kept text inside <relevant_lines> tags. "19"Do not rewrite, summarize, or invent lines."20)},21{"role":"user","content":(22"<query>\nFind the failing authentication test\n</query>\n"23"<tool_output>\n"24"PASSED tests/test_login.py::test_valid_credentials\n"25"FAILED tests/test_login.py::test_token_refresh - AssertionError: expected 200 got 401\n"26"PASSED tests/test_login.py::test_logout\n"27"</tool_output>"28)},29]3031prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)32inputs = tokenizer(prompt, return_tensors="pt").to(model.device)3334with torch.no_grad():35 outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.1, do_sample=True)3637response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)38print(response)39# <relevant_lines>40# FAILED tests/test_login.py::test_token_refresh - AssertionError: expected 200 got 40141# </relevant_lines>
When you invoke a shell command, pipe it through `squeez` and describe what you need.
Examples:
- bun test 2>&1 | squeez "did the tests pass?"
- git log --oneline -50 | squeez "find the commit that broke CSRF"
- cat src/auth/middleware.py | squeez "find the referer validation logic"