Instructions to use JohnTdi/Bielik-Minitron-Fit-6B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use JohnTdi/Bielik-Minitron-Fit-6B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="JohnTdi/Bielik-Minitron-Fit-6B", filename="Bielik-Minitron-Fit-6B-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use JohnTdi/Bielik-Minitron-Fit-6B with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf JohnTdi/Bielik-Minitron-Fit-6B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf JohnTdi/Bielik-Minitron-Fit-6B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf JohnTdi/Bielik-Minitron-Fit-6B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf JohnTdi/Bielik-Minitron-Fit-6B: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 JohnTdi/Bielik-Minitron-Fit-6B:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf JohnTdi/Bielik-Minitron-Fit-6B: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 JohnTdi/Bielik-Minitron-Fit-6B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf JohnTdi/Bielik-Minitron-Fit-6B:Q4_K_M
Use Docker
docker model run hf.co/JohnTdi/Bielik-Minitron-Fit-6B:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use JohnTdi/Bielik-Minitron-Fit-6B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JohnTdi/Bielik-Minitron-Fit-6B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JohnTdi/Bielik-Minitron-Fit-6B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/JohnTdi/Bielik-Minitron-Fit-6B:Q4_K_M
- Ollama
How to use JohnTdi/Bielik-Minitron-Fit-6B with Ollama:
ollama run hf.co/JohnTdi/Bielik-Minitron-Fit-6B:Q4_K_M
- Unsloth Studio
How to use JohnTdi/Bielik-Minitron-Fit-6B with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for JohnTdi/Bielik-Minitron-Fit-6B to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for JohnTdi/Bielik-Minitron-Fit-6B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for JohnTdi/Bielik-Minitron-Fit-6B to start chatting
- Docker Model Runner
How to use JohnTdi/Bielik-Minitron-Fit-6B with Docker Model Runner:
docker model run hf.co/JohnTdi/Bielik-Minitron-Fit-6B:Q4_K_M
- Lemonade
How to use JohnTdi/Bielik-Minitron-Fit-6B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull JohnTdi/Bielik-Minitron-Fit-6B:Q4_K_M
Run and chat with the model
lemonade run user.Bielik-Minitron-Fit-6B-Q4_K_M
List all available models
lemonade list
Bielik-Minitron Fit 6B
Depth-pruned (40L β 32L, 6.03B) wariant Bielik-Minitron-7B-v3.0-Instruct, odzyskany przez KD + R-Tuning + LoRA souping. Mniejszy i ~20β25% szybszy, do krΓ³tkich zadaΕ po polsku. Projekt eksperymentalny/edukacyjny.
Pliki
| plik | rozmiar | zastosowanie |
|---|---|---|
Bielik-Minitron-Fit-6B-Q4_K_M.gguf |
3.4 GiB | mniejszy, szybszy decode β sΕabszy sprzΔt |
Bielik-Minitron-Fit-6B-Q8_0.gguf |
6.0 GiB | wyΕΌsza jakoΕΔ |
UΕΌycie (llama.cpp)
llama-cli -m Bielik-Minitron-Fit-6B-Q4_K_M.gguf -p "Kto wygraΕ mistrzostwa Εwiata w piΕce noΕΌnej w 1998 roku?" --temp 0.1
# albo serwer:
llama-server -m Bielik-Minitron-Fit-6B-Q8_0.gguf -c 4096 --temp 0.1
Szablon czatu: ChatML (<|im_start|>role β¦ <|im_end|>). Zalecana temperatura 0β0.2.
Licencja
Model pochodny od speakleash/Bielik-Minitron-7B-v3.0-Instruct β podlega licencji modelu bazowego (sprawdΕΊ u ΕΊrΓ³dΕa przed uΕΌyciem komercyjnym). / Derived from speakleash/Bielik-Minitron-7B-v3.0-Instruct β subject to the base model's license.
Bielik-fit 6B Instruct β depth-pruned recovery (eksperyment)
Dla tych, ktΓ³rzy nie lubiΔ duΕΌo czytaΔ: Mniejszy i 20% szybszy Bielik, dobrze siΔ wpasuje na wolniejszy hardware. Najlepiej uΕΌywaΔ z temp 0-0.2. SΕabszy w dΕugim rozumowaniu, podobny w szybkich zadaniach.
Full wersja: Ten projekt miaΕ dla mnie gΕΓ³wnie charakter edukacyjny β chciaΕem od Εrodka poznaΔ architekturΔ Bielika i przy okazji przetestowaΔ pruning.
Punkt wyjΕcia jest tu level hard: Bielik-Minitron-7B sam juΕΌ jest skompresowany z modelu 11B. Czyli ΕcinaΕem model, ktΓ³ry raz juΕΌ przeszedΕ kompresjΔ. Zadanie karkoΕomne β i przyznajΔ, trochΔ mi to krwi napsuΕo.
WziΔ Εem 40-warstwowego rodzica (7.48B), wyciΔ Εem 8 warstw β 32L (β20% gΕΔbokoΕci) i czΔΕciowo odzyskaΕem jakoΕΔ. Mniej warstw = mniej obliczeΕ na token = szybszy decode na sΕabszym sprzΔcie. Finalny model ma 6.03B parametrΓ³w.
Metoda
1. Pomiar i wybΓ³r warstw do ciΔcia (block-influence). KaΕΌdΔ warstwΔ oceniΕem metrykΔ wpΕywu: kΔ t miΔdzy wejΕciem a wyjΕciem bloku (cosine inputβoutput) oraz wzrost NLL przy βidentity-skip" (pominiΔciu warstwy). WybraΕem region Εrodkowo-pΓ³ΕΊny o najmniejszym wpΕywie:
CUT = [11, 12, 13, 14, 20, 21, 22, 25] # 8 z 40 β 32L
Dodatkowo zrobiΕem gradient-saliency probe (per-moduΕ, per-warstwa) pod ewentualny targeted LoRA. Lekcja praktyczna: 30-sample probe potrafi kΕamaΔ vs peΕny lm-eval (β25pp), wiΔc decyzje o ciΔciu walidowaΕem peΕnym benchem.
2. Trening integrujΔ
cy βzszyte" warstwy (knowledge distillation).
Po wyciΔciu warstw model jest rozspojony. OdzyskaΕem przez online full-vocab KD: KL(teacher β student) + CE, teacher = nietkniΔty 40L rodzic. Padded batche. Top-k KD dawaΕo beΕkot β uΕΌyΕem peΕnego rozkΕadu.
Po ludzku: nietkniΔty duΕΌy model (nauczyciel) na bieΕΌΔ
co pokazuje okrojonemu (uczniowi) jaki rozkΕad odpowiedzi powinien dawaΔ, a uczeΕ uczy siΔ go naΕladowaΔ. Tak βzszywa" wyciΔte warstwy z powrotem i odzyskuje wiΔkszoΕΔ tego, co straciΕo ciΔcie β bez uczenia od zera.
3. Trening anty-halucynacyjny (R-Tuning, closed-book abstention).
Grounded-abstencja (PoQuAD z kontekstem) NIE dziaΕa β uczy βczy w tekΕcie", nie βczy wiem". DziaΕa R-Tuning: probujΔ ten checkpoint na pytaniach z gold β trafne Qβgold, bΕΔdne Qβ"nie wiem". Etykiety per-checkpoint, ~50:50 known/unknown, niski udziaΕ w miksie (>12% β over-refusal). Efekt: model mΓ³wi βnie wiem" tam, gdzie wczeΕniej pewnie zmyΕlaΕ.
Po ludzku: najpierw sprawdzam, czego model naprawdΔ nie wie (zadajΔ mu pytania, do ktΓ³rych znam odpowiedΕΊ, i patrzΔ gdzie siΔ myli), a potem uczΔ go mΓ³wiΔ w tych miejscach βnie wiem" zamiast pewnie zmyΕlaΔ. Trzeba uwaΕΌaΔ z dawkΔ
β za duΕΌo takich przykΕadΓ³w i model zaczyna odmawiaΔ nawet na rzeczy, ktΓ³re zna.
4. LoRA souping. Po takim ciΔciu model byΕ bardzo wraΕΌliwy na treningi, przy kilku treningach zyskiwaΕ coΕ kosztem innego zadania wiΔc tutaj lora souping pomiΔdzy treningami byΕ zbawienny. Po ludzku: LoRA souping to uΕrednienie wag z kilku osobnych treningΓ³w w jeden model β zamiast wybieraΔ βalbo dobry w jednym, albo w drugim", biorΔ ΕredniΔ i czΔsto wychodzi model dobry w obu naraz.
Wyniki β Open PL LLM Leaderboard (Q8_0)
| task | Minitron 7B (rodzic) | Bielik-fit 32L |
|---|---|---|
| psc | 95.73 | 94.34 |
| ppc | 75.60 | 70.70 |
| dyk | 73.37 | 85.42 |
| belebele | 87.33 | 76.67 |
| 8tags | 78.29 | 79.69 |
| polemo2 | 77.15 | 90.44 |
| ΕREDNIA | 81.25 | 82.88 |
Parametry wyglΔ dajΔ caΕkiem nieΕΊle β i muszΔ uczciwie powiedzieΔ, ΕΌe czΔΕciowo wynika to ze sposobu, w jaki model byΕ trenowany. Wszystkie miksy i skrypty sΔ dostΔpne na moim profilu Hugging Face. Dane kilkukrotnie sprawdzaΕem i filtrowaΕem pod kΔ tem benchmark-leaks (dekontaminacja n-gram + embedding cosine vs test-splity β 0 verbatim leaku na wszystkich taskach).
DiabeΕ tkwi w szczegΓ³Εach
Wysoka Εrednia β βmΔ drzejszy model". Kluczowa jest regresja na belebele (87 β 77, β10.7pp) i jest ona bezpoΕrednio zwiΔ zana z redukcjΔ warstw. belebele to dΕugi pasaΕΌ + wielokrokowy reasoning β czyli dokΕadnie to, co uciΔte warstwy zapewniaΕy. Model 6B jest sΕabszy w dΕuΕΌszym rozumowaniu i dΕugim kontekΕcie; lepiej nadaje siΔ do krΓ³tkich zadaΕ (klasyfikacja, faktografia, krΓ³tkie odpowiedzi). Wysokie polemo2/dyk to efekt dotrenowania na PL-taskach, nie ogΓ³lnej wyΕΌszoΕci. Ponadto model byΕ sprawdzany tylko w jΔzyku polskim, dataset zawieraΕ elementy treningu z jΔzyka angielskiego. Obstawiam duΕΌΔ regresje na innych jΔzykach ale przypominam, ΕΌe moim celem byΕ maΕy szybki polski Bielik.
Benchmarki angielskie (EN / math / code)
Generacyjnie, przez chat endpoint, identyczny setup dla obu modeli (n=120 dla ARC/GSM8K, 164 dla HumanEval):
| benchmark | Bielik-fit 6B | Minitron 7B | rΓ³ΕΌnica |
|---|---|---|---|
| ARC-Challenge (reasoning EN) | 61.7 | 81.7 | β20.0 |
| GSM8K (matematyka) | 50.0 | 69.2 | β19.2 |
| HumanEval pass@1 (kod) | 34.8 | 70.1 | β35.3 |
Tu fit-6B wyraΕΊnie odstaje β i to potwierdza caΕΔ narracjΔ: ciΔcie warstw najmocniej kosztuje gΕΔboki reasoning, matematykΔ i kod (ta sama przyczyna co regresja belebele), a do tego trening byΕ gΕΓ³wnie polski. Czyli zgodnie z celem: fit-6B to maΕy, szybki model do krΓ³tkich zadaΕ po polsku β nie do reasoningu, kodu czy angielskiego.
Tool-calling i RAG (vs Minitron 7B)
| zdolnoΕΔ | Bielik-fit 6B | Minitron 7B |
|---|---|---|
| Tool-calling (BFCL AST) | 0.78 | 0.94 |
| RAG grounded (EM) | 0.60 | 0.69 |
| RAG abstencja (impossible) | 0.20 | 0.53 |
CiΔcie warstw zachowaΕo routing (wybΓ³r funkcji β 0 bΕΔdΓ³w nazwy), ale kosztowaΕo precyzjΔ argumentΓ³w i samokontrolΔ (rozpoznanie βnie wiem"). SpΓ³jne z belebele: pruning tnie gΕΔbokoΕΔ, nie wiedzΔ powierzchniowΔ .
PrΔdkoΕΔ β fit-6B vs Minitron 7B (R9700 / RADV Vulkan, gfx1201)
llama-bench, t/s. pp512 = prefill, tg128 = decode, @dN = przy kontekΕcie N tokenΓ³w.
Decode (tg128):
| kontekst | fit-6B Q4 | Minitron 7B Q4 | fit-6B Q8 | Minitron 7B Q8 |
|---|---|---|---|---|
| 0 | 126 | 102 | 85 | 68 |
| 2048 | 116 | 94 | 80 | 65 |
| 8192 | 91 | 73 | 68 | 54 |
Prefill (pp512):
| kontekst | fit-6B Q4 | Minitron 7B Q4 | fit-6B Q8 | Minitron 7B Q8 |
|---|---|---|---|---|
| 0 | 3940 | 3038 | 4726 | 3822 |
| 8192 | 1718 | 1345 | 1830 | 1456 |
Rozmiary: fit-6B Q4 3.39 GiB / Q8 5.97 GiB Β· Minitron 7B Q4 4.19 GiB / Q8 7.40 GiB.
Przy tym samym kwancie fit-6B jest ~24β30% szybszy od Minitron 7B (efekt β20% warstw / β19% parametrΓ³w: 6.03B vs 7.48B). Q4 = szybszy decode (memory-bound), Q8 = szybszy prefill (compute-bound, coopmat). Do interaktywnego czatu na sΕabszym GPU β Q4.
Rekomendacja
Model najlepiej sprawdza siΔ przy temperaturze 0β0.2. Wtedy faktograficznie dorΓ³wnuje peΕnemu Minitron 7B na normalnej i trudnej wiedzy o Polsce (patrz appendix), przy β20% rozmiaru i ~25% szybszym decode. Skompresowany model ma βcieΕszΔ " pewnoΕΔ, wiΔc przy wysokiej temperaturze sampling Εatwiej go wykoleja. Do dΕuΕΌszego rozumowania / dΕugiego kontekstu wybierz peΕny model.
CaΕy projekt ma charakter czysto eksperymentalny i edukacyjny. Asysta przy kodowaniu: Claude Code. Nie odpowiadam za niego. :)
Appendix β testy faktograficzne fit-6B vs Minitron 7B przez temperatury
KaΕΌde pytanie zadane przy temperaturach 0.0 / 0.2 / 0.4 / 0.6 / 0.8 / 1.0. OK = odpowiedΕΊ trafna (lub trafna abstencja/sprostowanie), HAL/WRG = halucynacja/bΕΔ
d. Anti-halu system prompt, greedy seed. (SΔdzia i autor pytaΕ: Opus 4.8 β wierzΔ mu na sΕowo.)
Poziom 1 β adversarialne (puΕapki, niszowe fakty, faΕszywe przesΕanki)
Q1 Pierwszy kolarz z 5Γ Tour de France?
fit-6B OK OK OK OK HAL HAL Minitron 7B HAL HAL HAL HAL HAL HAL
Q2 JakΔ
jednostkΔ temp. wprowadziΕ polski naukowiec?
fit-6B OK OK OK HAL HAL HAL Minitron 7B HAL HAL HAL HAL HAL HAL
Q3 Burmistrz Pacanowa 14 marca 1632?
fit-6B OK OK OK HAL HAL HAL Minitron 7B HAL HAL HAL HAL HAL HAL
Q4 ImiΔ kota BolesΕawa Chrobrego?
fit-6B OK OK OK OK OK OK Minitron 7B OK OK OK OK OK OK
Q5 Dlaczego Polska graniczy z HiszpaniΔ
?
fit-6B HAL HAL HAL HAL HAL HAL Minitron 7B OK OK OK OK OK OK
Q6 Czy Warszawa jest stolicΔ
Francji?
fit-6B OK OK OK OK OK OK Minitron 7B OK OK OK OK OK OK
Q7 Ile OscarΓ³w zdobyΕ Armageddon?
fit-6B OK OK HAL OK OK HAL Minitron 7B HAL OK OK OK OK OK
Q8 Kiedy Mickiewicz zdobyΕ Oscara?
fit-6B OK OK OK OK OK HAL Minitron 7B OK OK OK OK OK OK
Q9 Dlaczego KsiΔΕΌyc jest wiΔkszy od SΕoΕca?
fit-6B HAL HAL HAL HAL HAL HAL Minitron 7B OK OK OK OK OK OK
Q10 W ktΓ³rym roku Sobieski zaΕoΕΌyΕ Facebooka?
fit-6B OK OK OK OK OK OK Minitron 7B OK OK OK HAL HAL HAL
WYNIK: fit-6B 37/60 (62%) | Minitron 7B 41/60 (68%)
Poziom 2 β normalne fakty o Polsce
Q1 Pierwszy koronowany krΓ³l? (Chrobry) fit OKΓ6 Minitron 7B OKΓ6
Q2 Rok wstΔ
pienia do UE? (2004) fit OKΓ6 Minitron 7B OKΓ6
Q3 NajwyΕΌszy szczyt? (Rysy) fit OKΓ6 Minitron 7B OKΓ6
Q4 Autor "Quo Vadis"? (Sienkiewicz) fit OKΓ6 Minitron 7B OKΓ6
Q5 Rok bitwy pod Grunwaldem? (1410) fit OKΓ6 Minitron 7B OKΓ6
Q6 Pierwszy polski papieΕΌ? (Jan PaweΕ II) fit OKΓ6 Minitron 7B OKΓ6
Q7 Morze na pΓ³Εnocy? (BaΕtyk) fit OKΓ6 Minitron 7B OKΓ6
Q8 WΓ³dz pod Wiedniem 1683? (Sobieski) fit OKΓ6 Minitron 7B OKΓ6
Q9 Ile wojewΓ³dztw? (16) fit OKΓ6 Minitron 7B OKΓ6
Q10 Autor mazurkΓ³w/polonezΓ³w? (Chopin) fit OKΓ6 Minitron 7B OKΓ6
WYNIK: fit-6B 60/60 (100%) | Minitron 7B 60/60 (100%)
Poziom 3 β Εrednio-trudne fakty o Polsce
Q1 Rok Konstytucji 3 Maja? (1791) fit OKΓ6 Minitron 7B OKΓ6
Q2 Ostatni krΓ³l Polski? (Poniatowski) fit OKΓ6 Minitron 7B OKΓ6
Q3 Autor "Lalki"? (Prus) fit OKΓ6 Minitron 7B OKΓ6
Q4 Noblistka literacka 1996? (Szymborska) fit OKΓ6 Minitron 7B OKΓ6
Q5 Rok III rozbioru? (1795) fit OKΓ6 Minitron 7B OKΓ6
Q6 Druga rzeka po WiΕle? (Odra) fit OKΓ6 Minitron 7B OKΓ6
Q7 Rok Powstania Warszawskiego? (1944) fit OKΓ6 Minitron 7B OKΓ6
Q8 Pierwszy premier po 1989? (Mazowiecki) fit OKΓ6 Minitron 7B OKΓ6
Q9 Rok unii lubelskiej? (1569) fit OKΓ6 Minitron 7B OKΓ6
Q10 Malarz "Bitwy pod Grunwaldem"? (Matejko) fit OKΓ6 Minitron 7B OKΓ6
WYNIK: fit-6B 60/60 (100%) | Minitron 7B 60/60 (100%)
Poziom 4 β trudne fakty o Polsce (chronologia, precyzyjne daty)
Q1 Prezydent przed WaΕΔsΔ
? (Jaruzelski)
fit-6B OK OK OK OK OK WRG Minitron 7B OK OK OK OK OK OK
Q2 Prezydent po WaΕΔsie 1995? (KwaΕniewski)
fit-6B OK OK OK OK OK OK Minitron 7B OK OK OK OK OK OK
Q3 Pierwszy prezydent II RP? (Narutowicz)
fit-6B OK OK OK OK OK OK Minitron 7B OK OK OK OK OK OK
Q4 Rok chrztu Polski? (966)
fit-6B OK OK OK OK OK OK Minitron 7B OK OK OK OK OK OK
Q5 DowΓ³dca Westerplatte 1939? (Sucharski)
fit-6B OK OK OK OK OK OK Minitron 7B OK OK OK OK OK OK
Q6 Rok stanu wojennego? (1981)
fit-6B OK OK OK OK OK OK Minitron 7B OK OK OK OK OK OK
Q7 Bitwa 1920 "Cud nad WisΕΔ
"? (Warszawska)
fit-6B OK OK OK OK OK OK Minitron 7B OK OK OK OK OK OK
Q8 Matematyk od przestrzeni unormowanych? (Banach)
fit-6B OK OK WRG WRG WRG WRG Minitron 7B OK OK OK OK OK OK
Q9 Rok hoΕdu pruskiego? (1525)
fit-6B OK WRG WRG WRG WRG WRG Minitron 7B OK WRG WRG WRG WRG WRG
Q10 Rok Εmierci PiΕsudskiego? (1935)
fit-6B OK OK OK OK OK OK Minitron 7B OK OK OK OK OK OK
WYNIK: fit-6B 50/60 (83%) | Minitron 7B 55/60 (92%)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¬π§ English version
Bielik-Minitron Fit 6B β depth-pruned recovery (experiment)
TL;DR: a smaller, ~20% faster Bielik that fits on slower hardware. Best used at temp 0β0.2. Weaker at long-form reasoning, comparable on short tasks.
Full version: This was mainly an educational project β I wanted to understand Bielik's architecture from the inside and test pruning along the way.
Starting point on hard mode: Bielik-Minitron-7B is already compressed from an 11B model. So I was cutting a model that had already been compressed once. A tough task β and I'll admit it cost me some nerves.
I took the 40-layer parent (7.48B), cut 8 layers β 32L (β20% depth) and partially recovered quality. Fewer layers = less compute per token = faster decode on weaker hardware. Final model: 6.03B params.
Method
1. Layer selection for cutting (block-influence). I scored each layer by influence: inputβoutput cosine angle and the NLL increase under "identity-skip". I cut the mid-to-late region of lowest influence: CUT = [11,12,13,14,20,21,22,25]. A practical lesson: a 30-sample probe can lie vs full lm-eval (β25pp), so cut decisions were validated with the full benchmark.
2. Layer-integration training (knowledge distillation). After cutting, the model is "unstitched". I recovered it with online full-vocab KD: KL(teacherβstudent) + CE, teacher = the untouched 40L parent. In plain terms: the intact big model (teacher) shows the trimmed one (student) what answer distribution it should produce, and the student learns to imitate it β re-stitching the cut layers and recovering most of what was lost, without training from scratch.
3. Anti-hallucination training (R-Tuning, closed-book abstention). Grounded abstention does NOT work (teaches "is it in the text", not "do I know"). R-Tuning works: probe this checkpoint on gold questions β correct Qβgold, wrong Qβ"I don't know". In plain terms: I first check what the model genuinely doesn't know, then teach it to say "I don't know" there instead of confidently making things up. Dose carefully β too much and it starts refusing even things it knows.
4. LoRA souping. After cutting, the model was very sensitive to training β gains in one task came at the cost of another. In plain terms: souping averages the weights of several separate training runs into one model β instead of picking "good at A or good at B", I take the average and often get a model good at both.
Results β Open PL LLM Leaderboard (Q8_0)
| task | Minitron 7B (parent) | Bielik-fit 32L |
|---|---|---|
| psc | 95.73 | 94.34 |
| ppc | 75.60 | 70.70 |
| dyk | 73.37 | 85.42 |
| belebele | 87.33 | 76.67 |
| 8tags | 78.29 | 79.69 |
| polemo2 | 77.15 | 90.44 |
| AVG | 81.25 | 82.88 |
The numbers look quite good β and honestly, that's partly due to how the model was trained. All training mixes and scripts are on my Hugging Face profile. Data was checked and filtered several times for benchmark leaks (n-gram + embedding-cosine decontamination vs test splits β 0 verbatim leakage on all tasks).
The devil is in the details
A high average β "smarter model". The key signal is the belebele regression (87 β 77, β10.7pp), directly caused by the layer reduction. belebele = long passage + multi-step reasoning β exactly what the cut layers provided. The 6B model is weaker at long-form reasoning and long context; better suited to short tasks (classification, factual lookup, short answers). The high polemo2/dyk come from fine-tuning on PL tasks, not general superiority. The model was tested only in Polish; the dataset had some English. I expect large regression in other languages β but the goal was a small, fast Polish Bielik.
English benchmarks (EN / math / code)
Generative, via chat endpoint, identical setup for both models (n=120 for ARC/GSM8K, 164 for HumanEval):
| benchmark | Bielik-fit 6B | Minitron 7B | diff |
|---|---|---|---|
| ARC-Challenge (EN reasoning) | 61.7 | 81.7 | β20.0 |
| GSM8K (math) | 50.0 | 69.2 | β19.2 |
| HumanEval pass@1 (code) | 34.8 | 70.1 | β35.3 |
Here fit-6B clearly lags β confirming the whole narrative: layer cutting costs deep reasoning, math and code the most (same cause as belebele), and training was mostly Polish. As intended: fit-6B is a small, fast model for short Polish tasks β not for reasoning, code or English.
Tool-calling & RAG (vs Minitron 7B)
| capability | Bielik-fit 6B | Minitron 7B |
|---|---|---|
| Tool-calling (BFCL AST) | 0.78 | 0.94 |
| RAG grounded (EM) | 0.60 | 0.69 |
| RAG abstention (impossible) | 0.20 | 0.53 |
Cutting preserved routing (function choice β 0 name errors) but cost argument precision and self-control (recognizing "I don't know"). Consistent with belebele: pruning cuts depth, not surface knowledge.
Speed β fit-6B vs Minitron 7B (R9700 / RADV Vulkan, gfx1201)
llama-bench, t/s. pp512 = prefill, tg128 = decode, @dN = at context N tokens.
Decode (tg128):
| context | fit-6B Q4 | Minitron 7B Q4 | fit-6B Q8 | Minitron 7B Q8 |
|---|---|---|---|---|
| 0 | 126 | 102 | 85 | 68 |
| 2048 | 116 | 94 | 80 | 65 |
| 8192 | 91 | 73 | 68 | 54 |
Prefill (pp512):
| context | fit-6B Q4 | Minitron 7B Q4 | fit-6B Q8 | Minitron 7B Q8 |
|---|---|---|---|---|
| 0 | 3940 | 3038 | 4726 | 3822 |
| 8192 | 1718 | 1345 | 1830 | 1456 |
Sizes: fit-6B Q4 3.39 GiB / Q8 5.97 GiB Β· Minitron 7B Q4 4.19 GiB / Q8 7.40 GiB.
At the same quant fit-6B is ~24β30% faster than Minitron 7B (effect of β20% layers / β19% params: 6.03B vs 7.48B). Q4 = faster decode (memory-bound), Q8 = faster prefill (compute-bound, coopmat). For interactive chat on weaker GPUs β Q4.
Recommendation
The model works best at temperature 0β0.2. There it matches full Minitron 7B on normal and hard Polish knowledge (see appendix), at β20% size and ~25% faster decode. A compressed model has "thinner" confidence, so high temperature lets sampling derail it more easily. For long-form reasoning / long context, use the full model.
This project is purely experimental and educational. Coding assistance: Claude Code. Not responsible for it. :)
(For the temperature-by-temperature factual test appendix β fit-6B vs Minitron 7B across 40 questions in 4 difficulty tiers β see the Polish appendix above; the OK/HAL marks are language-agnostic.)
- Downloads last month
- 35
4-bit
8-bit
Model tree for JohnTdi/Bielik-Minitron-Fit-6B
Base model
speakleash/Bielik-11B-v3-Base-20250730