Reads input text from --text, --file, or uses a built-in example
Loads a GGUF model via inference.LoadFile
Constructs a summarization prompt and generates a concise summary
Prints the summary to stdout
Usage
go build -o summarization ./examples/summarization/
# Summarize inline text
./summarization --model path/to/model.gguf --text "Your long text here..."
# Summarize a file
./summarization --model path/to/model.gguf --file article.txt
# Use the built-in example
./summarization --model path/to/model.gguf
# With GPU acceleration
./summarization --model path/to/model.gguf --device cuda
Command summarization demonstrates text summarization using a GGUF language model.
It reads text from a file or flag, prompts the model to produce a concise summary,
and prints the result. Useful for condensing long documents, articles, or logs.
Usage:
go build -o summarization ./examples/summarization/
./summarization --model path/to/model.gguf --text "Long text to summarize..."
./summarization --model path/to/model.gguf --file article.txt