Instructions to use delbina/delbina-sum with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use delbina/delbina-sum with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="delbina/delbina-sum") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("delbina/delbina-sum") model = AutoModelForCausalLM.from_pretrained("delbina/delbina-sum", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use delbina/delbina-sum with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "delbina/delbina-sum" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "delbina/delbina-sum", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/delbina/delbina-sum
- SGLang
How to use delbina/delbina-sum with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "delbina/delbina-sum" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "delbina/delbina-sum", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "delbina/delbina-sum" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "delbina/delbina-sum", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use delbina/delbina-sum with Docker Model Runner:
docker model run hf.co/delbina/delbina-sum
delbina-sum (v5, 1.5B)
Status: experimental (first release). Trained and tested on synthetic chats only; not yet measured on real conversations. Check its summaries before relying on them, and keep originals of anything critical.
A 1.5B summarizer for delbina, the context-compression layer
for long chats and agent sessions. It compresses old turns while keeping every specific value
(ports, keys, versions, dates, paths, hosts, owners, decisions, [[SECRET_n]] placeholders), with
only the newest value and under the right project, and drops tool noise.
LoRA (r=16, alpha=32, 2 epochs) on Qwen2.5-1.5B-Instruct, merged. The adapter alone is in adapter/.
GGUF builds (Q8_0, Q4_K_M) for Ollama / llama.cpp: delbina/delbina-sum-GGUF.
Results
Greedy decoding, delbina's production prompt. 300 chats per set. Test sets use project names, fact kinds and phrasings never seen in training. The holdout sets come from the same distribution with new seeds and were scored once, on a model that had already passed every test bar.
| metric (test, v2 set) | Qwen2.5-1.5B-Instruct | delbina-sum |
|---|---|---|
| fact recall (value present) | 22.5 | 98.0 |
| bound recall (value on a line naming its project) | 20.5 | 97.6 |
| recall on fact kinds never seen in training | 23.3 | 97.2 |
| invented values (% of fact lines) | 0.0* | 0.6 |
| chats with a stale (superseded) value | 40.3 | 3.3 |
| chats where a distractor value leaked | 29.1 | 0.6 |
| chats with every fact right | 0.0 | 85.7 |
| summary length, median chars | 454 | 373 |
* the base model invents nothing because it keeps almost no values at all.
| set | fact recall | unseen-kind recall | invented |
|---|---|---|---|
| test v2 | 98.0 | 97.2 | 0.6 |
| test v0 (older, different generator) | 92.7 | 86.3 | 0.5 |
| holdout v2 | 97.8 | 97.6 | 0.6 |
| holdout v0 | 90.6 | 87.3 | 0.5 |
Release bars (all pass on test and holdout, fp16 and both GGUF quants): recall gain β₯ +15 points, invented β€ 2.0%, unseen-kind recall β₯ 70 (β₯ 60 on v0), distractor leaks β€ 5%.
Per-sample test outputs: eval_test.jsonl, eval_test_v0.jsonl. All numbers: results.json, holdout_results.json.
Use with delbina
Easiest is the GGUF through Ollama, see delbina-sum-GGUF. With transformers or any OpenAI-compatible server (vLLM, llama.cpp server, LM Studio):
from delbina import Compressor, openai_summarizer
summarize = openai_summarizer(model="delbina/delbina-sum", base_url="http://localhost:8000/v1", api_key="none")
compressor = Compressor(summarize=summarize)
Use greedy decoding (temperature 0) and a context of at least 8192 tokens; that is how it was evaluated.
Output format
Facts:
- <project>: <what it is>: <value>
Context:
- <up to 3 short notes on decisions or open problems>
Training data
2,000 synthetic agent chats (generator v5 in delbina-sum,
dataset: delbina-sum-data): several projects
per chat, facts said by the user, the assistant or buried in tool output, values that change or get
rejected later, previous summaries to merge, near-miss filler with no values, and [[SECRET_n]]
placeholders. Targets are built from the planted facts, so they are correct by construction; no teacher
model. Trained on 2Γ T4 (fp16 base, fp32 LoRA), effective batch 16, lr 2e-4 cosine, 131 min.
Limitations
- Synthetic data only. Not yet measured on real chats. Content outside the planted fact kinds (long explanations, code, nuanced reasoning) may be compressed away.
- Wrong-project facts: about 0.4% of fact lines put a real value under the wrong project, most often look-alike cluster names; a few facts come out without a project.
- Rare inventions: on unfamiliar input it occasionally writes a default-looking value that is not in
the chat (for example a placeholder database URL with
postgres:password@localhost). - Invented Context notes on very short chats: on tiny inputs (a handful of messages) it sometimes adds Context lines such as "X: not known yet" for things the chat never mentioned. Treat Context lines as unverified and ignore them for very short inputs.
- Recall is weaker on the older v0 style (about 87β93) than on v2 (about 97β98).
- Downloads last month
- 66