Downloads · 30 days
80
7% of all-time downloads
HattoriHanzo1/Qapricorn-4B-GGUF
Qapricorn-4B-GGUF is a text generation model from HattoriHanzo1. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
"Nusquam est qui ubique est" — Kto jest wszędzie, nie jest nigdzie. Qapricorn jest tam gdzie trzeba — reasoning, nie encyklopedia.
Downloads · 30 days
80
7% of all-time downloads
All-time downloads
1.2K
Public
Repo size
18.1 GB
Likes
0
Public
Click a slice to open those files.
.gguf18.1 GB · 100%
From the Hugging Face model README
"Nusquam est qui ubique est" — Kto jest wszędzie, nie jest nigdzie.
Qapricorn jest tam gdzie trzeba — reasoning, nie encyklopedia.
Qapricorn-4B is a fine-tuned version of Qwen3-4B with enhanced reasoning capabilities, Polish language support, and coding skills. The model was trained using QLoRA with a carefully curated multilingual dataset combining mathematical reasoning, coding tasks, and Polish language data.
The name Qapricorn comes from:
A model built with persistence, on a free GPU, step by step. 💪
<think> reasoning — inherited from Qwen3-4B and strengthened through trainingPrompt: Stała Kaprekara to liczba 6174. Zastosuj algorytm dla liczby 1234.
<think>
Algorytm Kaprekara działa tak:
- Iteracja 1: 4321 - 1234 = 3087
- Iteracja 2: 8730 - 0378 = 8352
- Iteracja 3: 8532 - 2358 = 6174 ✓
Warto też wspomnieć że dla liczb trzycyfrowych analogiczna stała to 495...
</think>
Algorytm Kaprekara dla 1234:
- Iteracja 1: 4321 - 1234 = 3087
- Iteracja 2: 8730 - 0378 = 8352
- Iteracja 3: 8532 - 2358 = **6174** ✓
The model correctly solved the Kaprekar constant problem AND independently noted the analogous constant (495) for 3-digit numbers — demonstrating genuine reasoning, not pattern matching.
unsloth/Qwen3-4B-unsloth-bnb-4bit| Phase | Steps | LR | Scheduler | Notes |
|---|---|---|---|---|
| 1 | 0→100 | 2e-4 | linear | Initial learning |
| 2 | 100→300 | 5e-5 | cosine | Main training |
| 3 | 300→600 | 5e-5 | cosine | Stabilization |
| 4 | 600→1100 | 1e-5 | cosine | Fine-tuning |
| 5 | 1100→1500 | 5e-6 | cosine | Final polish |
Phase 1: ~1.8 → 1.1 (rapid learning)
Phase 2: avg 0.755 (best convergence)
Phase 3: avg 1.114 (new cosine cycle)
Phase 4: avg 1.076 (gradual improvement)
Phase 5: avg 1.046 (final polish, min=0.600)
Mixed multilingual dataset (~48k records, 269MB):
| Source | Records | Type |
|---|---|---|
| Math Reasoning PL | 25,357 | Math + <think> CoT |
| Claude Opus 4.5 | 250 | Coding + <think> |
| Polish Language CSV | 7,799 | Polish language |
| Synthia-Coder v1.5 | 14,982 | Coding instructions |
| Total | 48,388 |
All datasets were converted to ChatML format with <think> blocks preserved.
| File | Size | Recommended for |
|---|---|---|
qapricorn_f16.gguf | ~7.5 GB | Further quantization |
qapricorn_Q8_0.gguf | ~4.3 GB | Best quality, 6GB+ VRAM |
qapricorn_Q6_K.gguf | ~3.3 GB | Great quality, 4GB+ VRAM |
qapricorn_Q4_K_M.gguf | ~2.5 GB | Best speed/quality ratio |
./llama-cli \
-m qapricorn_Q4_K_M.gguf \
-p "Czym jest ciąg geometryczny? Wyjaśnij krok po kroku." \
--temp 0.6 \
--top-p 0.95 \
-n 512
./llama-server \
-m qapricorn_Q4_K_M.gguf \
--port 8080 \
--ctx-size 4096 \
--temp 0.6
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("HattoriHanzo1/Qapricorn-4B-merged-bf16")
tokenizer = AutoTokenizer.from_pretrained("HattoriHanzo1/Qapricorn-4B-merged-bf16")
messages = [
{"role": "system", "content": "Jesteś pomocnym asystentem AI."},
{"role": "user", "content": "Wyjaśnij algorytm Kaprekara."}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.6, do_sample=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Qapricorn inherits Qwen3's thinking toggle:
/think — enable thinking (default)
/no_think — disable thinking for faster responses
| Task | Result |
|---|---|
| Kaprekar constant (4B model) | ✅ Solved + found 3-digit analogy |
| Polish mathematical reasoning | ✅ Step-by-step with verification |
| Linked list reversal (Python) | ✅ With edge cases |
| Lateral thinking puzzles | ✅ Level 3/4 reasoning |
| Sentiment analysis (Polish) | ✅ With justification |
| Multilingual switching | ✅ Auto-detects prompt language |
Apache 2.0 — same as base model Qwen3-4B.
Built on a free GPU, on a Sunday, step by step.
"Heghlu'meH QaQ jajvam" — Today is a good day to train. ⚔️