Make summarize fast: abstract-based input (~7s/paper vs ~2min)
Feeding 16k chars of body to an 8B model took 126s/paper (42h for the vault). The abstract already carries the gist, so cap the body excerpt to 2.5k chars and num_predict to 500 -> ~7s/paper (~2.3h total), still valid structured JSON. Add --model flag (default gemma4:E4B). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
c1da5ad249
commit
0706d18799
@@ -183,7 +183,7 @@ def cmd_summarize(args: argparse.Namespace) -> int:
|
||||
from .summarize import append_insight, has_summary, summarize_one
|
||||
|
||||
config, _ = _load(args.config, args.topics)
|
||||
oc = OllamaClient()
|
||||
oc = OllamaClient(text_model=args.model)
|
||||
if not oc.is_up():
|
||||
console.print("[red]Ollama not reachable.[/red]")
|
||||
return 2
|
||||
@@ -313,6 +313,7 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
pm = sub.add_parser("summarize", help="LLM structured summaries (gemma4 via Ollama)")
|
||||
pm.add_argument("--limit", type=int, default=None)
|
||||
pm.add_argument("--force", action="store_true", help="re-summarize even if done")
|
||||
pm.add_argument("--model", default="gemma4:E4B", help="Ollama model for summaries")
|
||||
pm.set_defaults(func=cmd_summarize)
|
||||
|
||||
pb = sub.add_parser("embed", help="embed papers for semantic search (nomic via Ollama)")
|
||||
|
||||
Reference in New Issue
Block a user