anaksor-ocr
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Helps with agentic coding, with two models trained on PostgreSQL engine tasks. Slonik-27B and Slonik-9B come from Postgres Professional, for developers who work on database code and coding agents.
Slonik is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -U huggingface_hub hf download dglhf/Slonik
Slonik is a pair of language models for agentic coding, Slonik-27B and Slonik-9B, built at Postgres Professional. They were trained on PostgreSQL engine work: fixing source code, writing built-in C functions and writing extensions, with executable tests as feedback. The team then checked whether the gains carry over to general software engineering tasks.
Developers who work on PostgreSQL internals, and researchers who study coding agents that learn from test results. The weights carry the Apache 2.0 license.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Databases | PostgreSQL contributors | Ask the model for help with source-level fixes and C functions | Asking for a first draft of a built-in function for an extension |
| Software | Teams building coding agents | Run it as the model behind an agent in their own setup | Serving the 27B folder with vLLM and pointing an agent at it |
| Research | ML researchers | Study how training in an engine setting carries over to general coding | Comparing the 9B and 27B checkpoints on their own tasks |
Anyone who wants a small chat model for casual use can skip it, since it targets coding work.
| Use case | Who | What they get back |
|---|---|---|
| Explaining engine internals | Developers | A written explanation, such as how MVCC visibility works |
| Agentic coding | Agent builders | A model that can be served with tool-call parsing turned on |
| Research baseline | Researchers | Two BF16 checkpoints to evaluate side by side |
pip install -U huggingface_hub hf download dglhf/Slonik
pip install "transformers==5.9.0" "accelerate==1.14.0"
The card's transformers example loads the tokenizer and model from a chosen subfolder, builds a prompt through the chat template with thinking switched off, and generates up to 512 new tokens with sampling.
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
model_id = "dglhf/Slonik"
subfolder = "27B"
tokenizer = AutoTokenizer.from_pretrained(model_id, subfolder=subfolder)
model = AutoModelForImageTextToText.from_pretrained(
model_id, subfolder=subfolder, dtype=torch.bfloat16, device_map="auto",
)
model.eval()
messages = [{"role": "user", "content": "Explain how PostgreSQL MVCC visibility works."}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=False,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
outputs = model.generate(
**inputs, max_new_tokens=512, do_sample=True,
temperature=1.0, top_p=0.95, top_k=20,
)
print(tokenizer.decode(outputs[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))Change the subfolder value to 9B to load the smaller model. To serve a model with vLLM, first download just one folder with snapshot_download, then start the server on that folder.
from huggingface_hub import snapshot_download
snapshot_download(
"dglhf/Slonik",
allow_patterns=["27B/*", "LICENSE", "NOTICE", "licenses/*"],
local_dir="./Slonik",
)vllm serve ./Slonik/27B \
--served-model-name Slonik-27B \
--language-model-only --max-model-len 32768 \
--enable-auto-tool-choice --tool-call-parser qwen3_coder \
--default-chat-template-kwargs '{"enable_thinking": false}'| Tool | What it does |
|---|---|
| AutoModelForImageTextToText | Loads the chosen Slonik folder in transformers |
| apply_chat_template | Builds the prompt from your messages |
| snapshot_download | Downloads only the folder and license files you list |
| vllm serve | Serves the downloaded folder as a model endpoint |
You send the message "Explain how PostgreSQL MVCC visibility works." through the card's example script. The script prints a written explanation, cut off at 512 new tokens by the example's setting.
These are large models, so read the card first and try the smaller 9B folder before the 27B one. A good first step is to run the transformers example above with the subfolder set to 9B.
The two models start from different base checkpoints, Qwen3.8-27B and Qwen3.5-9B, and go through continued pretraining, supervised fine-tuning and then reinforcement learning with test-based rewards. Because the backbones differ, the card says the comparison does not isolate parameter count. The 9B run trained further after the evaluated checkpoint, and that later stage has no full evaluation in the report.
Helps with agentic coding, with two models trained on PostgreSQL engine tasks. Slonik-27B and Slonik-9B come from Postgres Professional, for developers who work on database code and coding agents.
Made by dglhf on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: Slonik is a pair of language models for agentic coding, Slonik-27B and Slonik-9B, built at Postgres Professional. They were trained on PostgreSQL engine work: fixing source code, writing built-in C functions and writing extensions, with executable tests as feedback. The team then checked whether the gains carry over to general software engineering tasks.
Who it suits: Developers who work on PostgreSQL internals, and researchers who study coding agents that learn from test results. The weights carry the Apache 2.0 license.
Industry | Who uses it | How they use it | Example
Databases | PostgreSQL contributors | Ask the model for help with source-level fixes and C functions | Asking for a first draft of a built-in function for an extension
Software | Teams building coding agents | Run it as the model behind an agent in their own setup | Serving the 27B folder with vLLM and pointing an agent at it
Research | ML researchers | Study how training in an engine setting carries over to general coding | Comparing the 9B and 27B checkpoints on their own tasks
Anyone who wants a small chat model for casual use can skip it, since it targets coding work.
Where to use it:
Use case | Who | What they get back
Explaining engine internals | Developers | A written explanation, such as how MVCC visibility works
Agentic coding | Agent builders | A model that can be served with tool-call parsing turned on
Research baseline | Researchers | Two BF16 checkpoints to evaluate side by side
How to set it up:
pip install -U huggingface_hub
hf download dglhf/Slonik
pip install "transformers==5.9.0" "accelerate==1.14.0"
How to use it: The card's transformers example loads the tokenizer and model from a chosen subfolder, builds a prompt through the chat template with thinking switched off, and generates up to 512 new tokens with sampling.
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
model_id = "dglhf/Slonik"
subfolder = "27B"
tokenizer = AutoTokenizer.from_pretrained(model_id, subfolder=subfolder)
model = AutoModelForImageTextToText.from_pretrained(
model_id, subfolder=subfolder, dtype=torch.bfloat16, device_map="auto",
)
model.eval()
messages = [{"role": "user", "content": "Explain how PostgreSQL MVCC visibility works."}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=False,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
outputs = model.generate(
**inputs, max_new_tokens=512, do_sample=True,
temperature=1.0, top_p=0.95, top_k=20,
)
print(tokenizer.decode(outputs[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))
Change the subfolder value to 9B to load the smaller model. To serve a model with vLLM, first download just one folder with snapshot_download, then start the server on that folder.
from huggingface_hub import snapshot_download
snapshot_download(
"dglhf/Slonik",
allow_patterns=["27B/*", "LICENSE", "NOTICE", "licenses/*"],
local_dir="./Slonik",
)
vllm serve ./Slonik/27B \
--served-model-name Slonik-27B \
--language-model-only --max-model-len 32768 \
--enable-auto-tool-choice --tool-call-parser qwen3_coder \
--default-chat-template-kwargs '{"enable_thinking": false}'
Tool | What it does
AutoModelForImageTextToText | Loads the chosen Slonik folder in transformers
apply_chat_template | Builds the prompt from your messages
snapshot_download | Downloads only the folder and license files you list
vllm serve | Serves the downloaded folder as a model endpoint
Example: You send the message "Explain how PostgreSQL MVCC visibility works." through the card's example script. The script prints a written explanation, cut off at 512 new tokens by the example's setting.
For newcomers and experts: These are large models, so read the card first and try the smaller 9B folder before the 27B one. A good first step is to run the transformers example above with the subfolder set to 9B.
The two models start from different base checkpoints, Qwen3.8-27B and Qwen3.5-9B, and go through continued pretraining, supervised fine-tuning and then reinforcement learning with test-based rewards. Because the backbones differ, the card says the comparison does not isolate parameter count. The 9B run trained further after the evaluated checkpoint, and that later stage has no full evaluation in the report.
Pick the 27B or 9B folder
Load the tokenizer and model
Build the prompt with the chat template
Generate a reply with sampling
Decode the reply to text
Good to know:
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download dglhf/Slonik
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 7 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| Slonik This page | 0 | 5 | — | apache-2.0 | |
| Slonik-27B-oQ8-mtpShares postgresql · slonik · code | 498 | 3 | 27.3B | apache-2.0 | |
| Terminal-RSI-27BShares reinforcement-learning · code · text-generation | 2,536 | 33 | 27.8B | apache-2.0 | |
| ColGrep-Agent-2BShares reinforcement-learning · code · text-generation | 1,141 | 38 | 2.5B | apache-2.0 | |
| Maincoder-1BShares reinforcement-learning · code · text-generation | 451 | 101 | 1B | apache-2.0 | |
| Sabi-NoemaShares reinforcement-learning · text-generation · transformers | 1,810 | 55 | 27.4B | apache-2.0 |
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Qwen · Kit
Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…
ACE-Step · Kit
Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.