Instructions to use cenkierpiotr/MEMORYDistillPL-1.5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cenkierpiotr/MEMORYDistillPL-1.5b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cenkierpiotr/MEMORYDistillPL-1.5b") 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("cenkierpiotr/MEMORYDistillPL-1.5b") model = AutoModelForCausalLM.from_pretrained("cenkierpiotr/MEMORYDistillPL-1.5b", 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]:])) - PEFT
How to use cenkierpiotr/MEMORYDistillPL-1.5b with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use cenkierpiotr/MEMORYDistillPL-1.5b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M # Run inference directly in the terminal: llama cli -hf cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M # Run inference directly in the terminal: llama cli -hf cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
Use Docker
docker model run hf.co/cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use cenkierpiotr/MEMORYDistillPL-1.5b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cenkierpiotr/MEMORYDistillPL-1.5b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cenkierpiotr/MEMORYDistillPL-1.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
- SGLang
How to use cenkierpiotr/MEMORYDistillPL-1.5b 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 "cenkierpiotr/MEMORYDistillPL-1.5b" \ --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": "cenkierpiotr/MEMORYDistillPL-1.5b", "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 "cenkierpiotr/MEMORYDistillPL-1.5b" \ --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": "cenkierpiotr/MEMORYDistillPL-1.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use cenkierpiotr/MEMORYDistillPL-1.5b with Ollama:
ollama run hf.co/cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
- Unsloth Desktop
- Pi
How to use cenkierpiotr/MEMORYDistillPL-1.5b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use cenkierpiotr/MEMORYDistillPL-1.5b with Docker Model Runner:
docker model run hf.co/cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
- Lemonade
How to use cenkierpiotr/MEMORYDistillPL-1.5b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
Run and chat with the model
lemonade run user.MEMORYDistillPL-1.5b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use cenkierpiotr/MEMORYDistillPL-1.5b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use cenkierpiotr/MEMORYDistillPL-1.5b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "cenkierpiotr/MEMORYDistillPL-1.5b:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
MEMORYDistillPL-1.5b
๐ฌ๐ง English ยท ๐ต๐ฑ Polski
English
MEMORYDistillPL-1.5b is a Polish-language fine-tune of Qwen2.5-1.5B-Instruct, trained with QLoRA to distill long conversational transcripts into concise, structured memory notes โ summarizing what was discussed and extracting the entities (people, organizations, decisions, facts) mentioned in the conversation.
The model is optimized for this one narrow task rather than general-purpose chat: given a Polish-language conversation transcript, it produces a compact, structured summary suitable for long-term storage and later retrieval, rather than free-form conversational responses.
Model Details
- Base model: Qwen/Qwen2.5-1.5B-Instruct
- Architecture: Qwen2, 28 layers, hidden size 1536, 12 attention heads / 2 KV heads (GQA), vocab size 151,936, 32,768 token context window
- Fine-tuning method: QLoRA (4-bit NF4 base weights, LoRA adapters), via Unsloth + PEFT/TRL
- Language: Polish (primary); the base model retains general multilingual ability
- License: Apache 2.0 (inherited from the Qwen2.5-1.5B-Instruct base model)
Intended Use
- Distilling Polish-language conversation transcripts into structured, factual summaries with entity extraction.
- A lightweight, fast alternative to much larger general-purpose LLMs for this specific summarization/extraction task.
Not intended for: general open-domain chat or instruction-following outside the summarization/extraction task, use in languages other than Polish (untested and unoptimized), or high-stakes use without human verification of the output.
Training Data
- 1,394 training examples / 164 validation / 82 held-out test examples (1,640 total).
- Each example pairs a conversation transcript with a target structured summary (teacher-model generated, then used as supervised fine-tuning targets).
- Data is domain-general conversational Polish text. The training corpus itself is not published alongside the model weights.
Training Procedure
QLoRA hyperparameters
| Parameter | Value |
|---|---|
| LoRA rank (r) | 16 |
| LoRA alpha | 16 |
| LoRA dropout | 0 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Max sequence length | 8,192 tokens |
| Epochs | 3 |
| Effective batch size | 8 (1 ร 8 gradient accumulation) |
| Learning rate | 2e-4, cosine schedule, 3% warmup |
| Optimizer | AdamW (8-bit) |
| Precision | bf16 |
| Total steps | 525 |
| Final train loss | 0.277 (started at 0.88) |
Training ran on a single GPU using Unsloth for accelerated QLoRA fine-tuning; total wall-clock training time was approximately 1.5 hours.
Evaluation
The fine-tuned model was compared against the unmodified Qwen2.5-7B-Instruct model on 82 held-out test transcripts. Outputs from both models were judged pairwise (blind, order-randomized) by an independent LLM judge on faithfulness to the source transcript and completeness of the extracted information.
Result: MEMORYDistillPL-1.5b was preferred in approximately 55/82 (~67%) of comparisons against the 7B baseline, despite being roughly 4.5x smaller.
Limitations and Known Issues
- Abbreviation hallucination: the model occasionally invents plausible-looking but incorrect English expansions for Polish domain abbreviations that do not appear in the source text.
- Occasional missed entities: in a minority of cases the model omits an entity that should have been extracted.
- Evaluated only on Polish-language conversational transcripts up to 8k tokens; behavior on other languages, domains, or longer inputs is untested.
- As with any LLM-based summarizer, outputs should not be treated as guaranteed-faithful to the source without verification in high-stakes use cases.
How to Use
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "cenkierpiotr/MEMORYDistillPL-1.5b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
messages = [
{"role": "system", "content": "Jesteล asystentem streszczajฤ
cym rozmowy w ustrukturyzowanฤ
notatkฤ."},
{"role": "user", "content": "<transkrypt rozmowy>"},
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))
Quantized GGUF builds are also provided for llama.cpp-compatible runtimes (e.g. Ollama, LM Studio) โ see the format table below.
Files in This Repository
model.safetensors,config.json,tokenizer.json,tokenizer_config.json,chat_template.jinja,generation_config.jsonโ merged bf16 weights, ready fortransformersadapter/adapter_model.safetensors,adapter/adapter_config.jsonโ the LoRA adapter alone, for use with PEFT on top of the base model- GGUF quantized builds,
MEMORYDistillPL-1.5b.<TYPE>.gguf:
| Variant | Size | Notes |
|---|---|---|
| F16 | 3.09 GB | full precision โ reference / re-quantization base |
| Q8_0 | 1.65 GB | near-lossless |
| Q6_K | 1.27 GB | very high quality |
| Q5_K_M | 1.13 GB | high quality, good balance |
| Q5_K_S | 1.10 GB | high quality, slightly smaller |
| Q4_K_M | 986 MB | recommended default โ best quality/size balance |
| Q4_K_S | 940 MB | smaller, noticeable quality drop |
| Q4_0 | 935 MB | legacy 4-bit format, broad compatibility |
| Q3_K_L | 880 MB | acceptable quality at further reduction |
| Q3_K_M | 824 MB | noticeably lower quality |
| Q3_K_S | 761 MB | markedly lower quality |
| Q2_K | 676 MB | smallest, lowest quality |
At this model size (1.5B), low-bit quantization (Q3/Q2) degrades quality more noticeably than on larger models โ Q4_K_M or higher is recommended for most uses.
Polski
MEMORYDistillPL-1.5b to dostrojona wersja Qwen2.5-1.5B-Instruct, wytrenowana metodฤ QLoRA do jednego, wฤ skiego zadania: zamiany dลugiego, polskojฤzycznego transkryptu rozmowy w zwiฤzลฤ , ustrukturyzowanฤ notatkฤ pamiฤciowฤ โ streszczenie tego, co zostaลo ustalone, wraz z wyodrฤbnionymi encjami (osoby, organizacje, decyzje, fakty) wymienionymi w rozmowie.
Model nie jest modelem ogรณlnego przeznaczenia do swobodnej konwersacji โ jest zoptymalizowany pod jedno zadanie ekstrakcyjno-streszczajฤ ce, kosztem wszechstronnoลci.
Szczegรณลy modelu
- Model bazowy: Qwen/Qwen2.5-1.5B-Instruct
- Architektura: Qwen2 โ 28 warstw, hidden 1536, 12 gลรณw uwagi / 2 KV (GQA), sลownik 151 936, okno kontekstu 32 768 tok.
- Metoda dostrojenia: QLoRA (baza 4-bit NF4 + adaptery LoRA), przez Unsloth + PEFT/TRL
- Jฤzyk: polski (podstawowy); model bazowy zachowuje ogรณlnฤ wielojฤzycznoลฤ
- Licencja: Apache 2.0 (dziedziczona po modelu bazowym Qwen2.5-1.5B-Instruct)
Przeznaczenie
- Destylacja polskojฤzycznych transkryptรณw rozmรณw w zwiฤzลฤ , ustrukturyzowanฤ notatkฤ
- Ekstrakcja encji (osoby, organizacje, decyzje, fakty) z tekstu rozmowy
- Lekka, szybka alternatywa dla duลผo wiฤkszych modeli ogรณlnego przeznaczenia โ przy tym jednym, wฤ skim zadaniu
Do czego model NIE jest przeznaczony: ogรณlna konwersacja i podฤ ลผanie za dowolnymi instrukcjami poza zadaniem streszczania/ekstrakcji, jฤzyki inne niลผ polski (nietestowane i nieoptymalizowane), zastosowania o wysokiej stawce bez weryfikacji przez czลowieka.
Dane treningowe
- 1394 przykลady treningowe / 164 walidacyjne / 82 testowe (held-out), ลฤ cznie 1640.
- Kaลผdy przykลad to para: transkrypt rozmowy โ docelowa ustrukturyzowana notatka (cele treningowe wygenerowane przez model nauczycielski i uลผyte jako dane do uczenia nadzorowanego).
- Dane to ogรณlnodomenowy polskojฤzyczny tekst konwersacyjny. Sam korpus treningowy nie jest publikowany razem z wagami modelu.
Procedura treningu
Hiperparametry QLoRA
| Parametr | Wartoลฤ |
|---|---|
| LoRA rank (r) | 16 |
| LoRA alpha | 16 |
| LoRA dropout | 0 |
| Moduลy docelowe | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Maks. dลugoลฤ sekwencji | 8192 tok. |
| Epoki | 3 |
| Efektywny batch size | 8 (1 ร 8 grad. accum.) |
| Learning rate | 2e-4, cosine, warmup 3% |
| Optymalizator | AdamW 8-bit |
| Precyzja | bf16 |
| Kroki ลฤ cznie | 525 |
| Strata koลcowa (train loss) | 0.277 (start: 0.88) |
Trening przeprowadzony na pojedynczej karcie GPU przy uลผyciu Unsloth (przyspieszony QLoRA) + PEFT/TRL; ลฤ czny czas treningu ok. 1,5 h.
Ewaluacja
Model porรณwnano z niedostrojonym Qwen2.5-7B-Instruct na 82 przykลadach testowych (held-out). Odpowiedzi obu modeli oceniaล ลlepo, w losowej kolejnoลci, niezaleลผny model-sฤdzia โ pod kฤ tem wiernoลci ลบrรณdลowemu transkryptowi i kompletnoลci wyodrฤbnionych informacji.
Wynik: MEMORYDistillPL-1.5b byล preferowany w ok. 55/82 (~67%) porรณwnaล wzglฤdem bazy 7B, mimo ลผe jest ok. 4,5x mniejszy.
Ograniczenia i znane problemy
- Halucynacje rozwiniฤฤ skrรณtรณw: model sporadycznie wymyลla wiarygodnie brzmiฤ ce, ale bลฤdne angielskie rozwiniฤcia polskich skrรณtรณw branลผowych, ktรณrych nie ma w tekลcie ลบrรณdลowym.
- Pomijane encje: w mniejszoลci przypadkรณw model pomija encjฤ, ktรณra powinna zostaฤ wyodrฤbniona z transkryptu.
- Ewaluacja objฤลa wyลฤ cznie polskojฤzyczne transkrypty konwersacyjne o dลugoลci do 8k tokenรณw โ zachowanie poza tym zakresem (inne jฤzyki, dลuลผsze wejลcia, inne domeny) nie zostaลo zbadane.
- Jak w przypadku kaลผdego streszczenia generowanego przez LLM, wynik nie powinien byฤ traktowany jako gwarantowanie wierny ลบrรณdลu bez weryfikacji w zastosowaniach o wysokiej stawce.
Sposรณb uลผycia
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "cenkierpiotr/MEMORYDistillPL-1.5b"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
messages = [
{"role": "system", "content": "Jesteล asystentem streszczajฤ
cym rozmowy w ustrukturyzowanฤ
notatkฤ."},
{"role": "user", "content": "<transkrypt rozmowy>"},
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))
Skwantyzowane buildy GGUF sฤ rรณwnieลผ dostฤpne dla runtime'รณw zgodnych z llama.cpp (np. Ollama, LM Studio) โ patrz tabela formatรณw niลผej.
Pliki w tym repozytorium
model.safetensors,config.json,tokenizer.json,tokenizer_config.json,chat_template.jinja,generation_config.jsonโ scalone wagi bf16, gotowe dotransformersadapter/adapter_model.safetensors,adapter/adapter_config.jsonโ sam adapter LoRA, do uลผycia z PEFT na modelu bazowym- Skwantyzowane buildy GGUF,
MEMORYDistillPL-1.5b.<TYP>.gguf:
| Wariant | Rozmiar | Uwagi |
|---|---|---|
| F16 | 3.09 GB | peลna precyzja โ baza referencyjna / do rekwantyzacji |
| Q8_0 | 1.65 GB | praktycznie bezstratny |
| Q6_K | 1.27 GB | bardzo wysoka jakoลฤ |
| Q5_K_M | 1.13 GB | wysoka jakoลฤ, dobry balans |
| Q5_K_S | 1.10 GB | wysoka jakoลฤ, nieco mniejszy |
| Q4_K_M | 986 MB | zalecany domyลlny โ najlepszy balans jakoลฤ/rozmiar |
| Q4_K_S | 940 MB | mniejszy, zauwaลผalny spadek jakoลci |
| Q4_0 | 935 MB | starszy format 4-bit, szeroka kompatybilnoลฤ |
| Q3_K_L | 880 MB | akceptowalna jakoลฤ przy dalszej redukcji |
| Q3_K_M | 824 MB | zauwaลผalnie niลผsza jakoลฤ |
| Q3_K_S | 761 MB | wyraลบnie niลผsza jakoลฤ |
| Q2_K | 676 MB | najmniejszy, najniลผsza jakoลฤ |
Przy modelu tej wielkoลci (1.5B) niskobitowe warianty (Q3/Q2) tracฤ na jakoลci wyraลบniej niลผ przy duลผych modelach โ dla wiฤkszoลci zastosowaล zalecany Q4_K_M lub wyลผej.
- Downloads last month
- 566