SLM Summarizer
Local CPU text distillation engine that compresses long-form documents, articles, and financial notes into structured bullet highlights.
๐ Overview & Capabilities
Local CPU text distillation engine that compresses long-form documents, articles, and financial notes into structured bullet highlights.
Key Features
- Sub-billion parameter local distillation model
- High compression ratio with zero factual hallucinations
- Support for multi-paragraph document inputs
- Sub-200ms latency on standard CPUs
๐ป Installation
Install the local package using pip:
๐ Checkout from GitHub
Clone only this agent's folder from the monorepo using Git sparse-checkout โ no need to download the full repository:
Option 1 โ Sparse Checkout (Recommended)
Option 2 โ Full Repository Clone
๐ก Tip: After checkout, install the package locally with pip install -e ./slm_summarizer to run in editable mode without publishing to PyPI.
โ๏ธ Configuration API
Constructor Parameters
Instantiate SLMSummarizer with performance and runtime options:
| Parameter | Type / Default | Description |
|---|---|---|
model_path | str | None | Local ONNX model path. Default: None. |
temperature | float | 0.3 | Sampling temperature. Default: 0.3. |
top_p | float | 0.9 | Nucleus sampling threshold. Default: 0.9. |
max_tokens | int | 512 | Max token output limit. Default: 512. |
n_threads | int | 4 | CPU threads for inference. Default: 4. |
Methods
| Method Signature | Return Type | Description |
|---|---|---|
summarize(text, ...) | str | Generates concise summary highlights from raw text documents. |
Execution Parameters
Complete list of execution parameters accepted by the primary agent method:
| Parameter | Type / Default | Description |
|---|---|---|
text | str | Raw text content string to summarize. |
system_prompt | str | None | Instruction defining target summary format. Default: None. |
user_input | str | None | Additional topic focus constraints. Default: None. |
temperature | float | 0.3 | Sampling temperature. Default: 0.3. |
top_p | float | 0.9 | Nucleus sampling probability. Default: 0.9. |
max_tokens | int | 512 | Maximum output token limit. Default: 512. |
Quick Start
๐ Verified Output Logs
Diagnostic execution console output running locally on CPU: