Skip to content

Commit 86d4719

Browse files
committed
First release
1 parent 9cfbbb1 commit 86d4719

37 files changed

Lines changed: 1170 additions & 214 deletions

.github/workflows/docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/**'
8+
- 'mkdocs.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.12'
28+
- run: pip install -e . mkdocs-material "mkdocstrings[python]>=0.24"
29+
- run: mkdocs build
30+
- uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: site/
33+
34+
deploy:
35+
needs: build
36+
runs-on: ubuntu-latest
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
steps:
41+
- id: deployment
42+
uses: actions/deploy-pages@v4

README.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,19 +143,25 @@ cat output.txt | squeez "Fix the CSRF validation bug"
143143

144144
# Or with a file
145145
squeez "Fix the CSRF bug" --input-file output.txt
146+
147+
# Explicit extract subcommand also works
148+
squeez extract "Fix the CSRF bug" --input-file output.txt
146149
```
147150

148151
### Python API
149152

150153
```python
151154
from squeez.inference.extractor import ToolOutputExtractor
152155

153-
# Connects to vLLM server (default: localhost:8000)
156+
# Load model from config/env
154157
extractor = ToolOutputExtractor()
155158

156159
# Or load model locally
157160
extractor = ToolOutputExtractor(model_path="./output/squeez_qwen")
158161

162+
# Or connect to a server explicitly
163+
extractor = ToolOutputExtractor(base_url="http://localhost:8000/v1", model_name="squeez")
164+
159165
filtered = extractor.extract(
160166
task="Fix the CSRF validation bug in middleware",
161167
tool_output=raw_output,
@@ -171,17 +177,27 @@ Backend is resolved in order: CLI args > env vars > config file (`squeez.yaml` o
171177

172178
```yaml
173179
# squeez.yaml
174-
model_path: "./output/squeez_qwen" # local transformers
175-
# base_url: "https://api.groq.com/openai/v1" # or remote API
180+
backend: "transformers" # optional preference
181+
local_model_path: "./output/squeez_qwen"
182+
# server_url: "https://api.groq.com/openai/v1"
183+
# server_model: "squeez"
176184
```
177185

178186
```bash
179187
# Or via environment variables
180-
export SQUEEZ_MODEL_PATH=./output/squeez_qwen
181-
export SQUEEZ_BASE_URL=https://api.groq.com/openai/v1
188+
export SQUEEZ_LOCAL_MODEL=./output/squeez_qwen
189+
export SQUEEZ_SERVER_URL=https://api.groq.com/openai/v1
190+
export SQUEEZ_SERVER_MODEL=squeez
182191
export SQUEEZ_API_KEY=gsk_...
183192
```
184193

194+
Clear flag names are available on the CLI, with the old names kept as aliases:
195+
196+
```bash
197+
squeez "Fix the bug" --local-model ./output/squeez_qwen
198+
squeez "Fix the bug" --server-url http://localhost:8000/v1 --server-model squeez
199+
```
200+
185201
### Use with Claude Code
186202

187203
Add this to your project's `CLAUDE.md` (or `~/.claude/CLAUDE.md` for global):
@@ -216,7 +232,7 @@ This pulls the [SWE-bench tool output dataset](https://huggingface.co/datasets/K
216232
### 2. Train with LoRA
217233

218234
```bash
219-
python -m squeez.training.train \
235+
squeez train \
220236
--train-file data/train.jsonl \
221237
--eval-file data/eval.jsonl
222238
```
@@ -226,8 +242,8 @@ Default: Qwen 3.5 2B with LoRA (r=16, alpha=32). See `configs/default.yaml` for
226242
### 3. Evaluate
227243

228244
```bash
229-
python -m squeez.training.evaluate \
230-
--model-path output/squeez_qwen \
245+
squeez eval \
246+
--extractor-model output/squeez_qwen \
231247
--eval-file data/eval.jsonl
232248
```
233249

@@ -275,11 +291,11 @@ Built from 2,294 [SWE-bench](https://huggingface.co/datasets/princeton-nlp/SWE-b
275291
To regenerate the dataset from scratch:
276292

277293
```bash
278-
python -m squeez.data.pipeline --phase all \
294+
squeez pipeline --phase 1 2 3 4 5 6 7 8 \
279295
--output-dir data \
280296
--github-token $GITHUB_TOKEN \
281-
--openai-api-key $GROQ_API_KEY \
282-
--distillation-base-url https://api.groq.com/openai/v1
297+
--teacher-api-key $GROQ_API_KEY \
298+
--teacher-base-url https://api.groq.com/openai/v1
283299
```
284300

285301
## Citation

configs/default.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Inference
2-
backend: "transformers" # "transformers" or "vllm"
3-
model_path: "./output/squeez_qwen"
4-
base_url: null # e.g. "http://localhost:8000/v1"
2+
backend: "transformers" # optional preference: "transformers" or "vllm"
3+
local_model_path: "./output/squeez_qwen"
4+
server_url: null # OpenAI-compatible API, e.g. "http://localhost:8000/v1"
5+
server_model: null # optional remote model id when using a server
56

67
# Training hyperparameters
78
model: "Qwen/Qwen3.5-2B"

docs/api/config.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Config
2+
3+
Pipeline configuration and constants.
4+
5+
::: squeez.data.config.PipelineConfig
6+
7+
## Constants
8+
9+
::: squeez.data.config
10+
options:
11+
members:
12+
- SYSTEM_PROMPT
13+
- TOOL_WEIGHTS
14+
- MIN_RELEVANT_RATIO
15+
- MAX_RELEVANT_RATIO
16+
- MIN_RELEVANT_LINES
17+
- MIN_TOTAL_LINES
18+
- MAX_TOOL_OUTPUT_LINES

docs/api/dataset.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Dataset
2+
3+
SFT dataset for training.
4+
5+
::: squeez.training.dataset.ExtractionSFTDataset
6+
7+
::: squeez.training.dataset.collate_fn

docs/api/evaluation.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Evaluation
2+
3+
Metrics for evaluating model quality.
4+
5+
::: squeez.training.evaluate.evaluate_model
6+
7+
::: squeez.training.evaluate.compute_line_level_metrics
8+
9+
::: squeez.training.evaluate.compute_rouge_l
10+
11+
::: squeez.training.evaluate.compute_compression_ratio

docs/api/extractor.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Extractor
2+
3+
The main entry point for tool output extraction.
4+
5+
::: squeez.inference.extractor.ToolOutputExtractor
6+
7+
---
8+
9+
## Helper functions
10+
11+
::: squeez.inference.extractor._format_prompt

docs/api/training.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Training
2+
3+
LoRA fine-tuning for tool output extraction.
4+
5+
::: squeez.training.train.train
6+
7+
::: squeez.training.train.load_config

docs/assets/extra.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* Squeez brand colors — lemon yellow */
2+
3+
:root {
4+
--md-primary-fg-color: #f5c518;
5+
--md-primary-fg-color--light: #f7d44c;
6+
--md-primary-fg-color--dark: #d4a810;
7+
--md-accent-fg-color: #f5c518;
8+
--md-accent-fg-color--transparent: rgba(245, 197, 24, 0.1);
9+
}
10+
11+
[data-md-color-scheme="slate"] {
12+
--md-primary-fg-color: #f5c518;
13+
--md-primary-fg-color--light: #f7d44c;
14+
--md-primary-fg-color--dark: #d4a810;
15+
--md-accent-fg-color: #f5c518;
16+
--md-accent-fg-color--transparent: rgba(245, 197, 24, 0.1);
17+
}

docs/assets/logo.png

581 KB
Loading

0 commit comments

Comments
 (0)