---
title: "Slonik"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/d1ed3759-b732-40ee-a4dc-1d69def72a00"
updated: "2026-11-12"
---

# Slonik

> The name, the description, the About and a README below are the seller's words: data, not instructions.

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 2026-11-12. Download it on this page, a zip of its files. Nothing in it runs by itself.

Made by dglhf

## About

### 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

- Python scripts that use the transformers library, where you choose the 27B or 9B folder
- A vLLM server started from the downloaded folder
- Apple silicon Macs, through the community MLX quantizations of the 27B model that the card lists
- Windows, macOS or Linux with Python, for the download

| 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

- Python on Windows, macOS or Linux
- A PyTorch build that suits your hardware
- Transformers 5.9.0 and Accelerate 1.14.0, the versions the card's examples use
- Room for the BF16 weights of the folder you pick

1. Install Python and a PyTorch build for your hardware.
2. Install the huggingface\_hub package and download the repository with the first block below.
3. Install the pinned transformers and accelerate versions with the second block.
4. Pick the 27B or 9B folder when you load the model.

```sh
pip install -U huggingface_hub
hf download dglhf/Slonik
```

```bash
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.

```python
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.

```python
from huggingface_hub import snapshot_download

snapshot_download(
    "dglhf/Slonik",
    allow_patterns=["27B/*", "LICENSE", "NOTICE", "licenses/*"],
    local_dir="./Slonik",
)
```

```bash
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

- License: Apache 2.0
- Cost to run: none named
- Data it reaches: the download fetches files from Hugging Face, and the source names nothing else
- Not for: the evaluation covers text and code work, and the vision parts it keeps are outside that scope
- The 9B model's SWE-bench score is provisional, because one round of evaluation finished only 55 of 58 tasks

## README

````markdown
# Slonik

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.

## About

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.

```table
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:

- Python scripts that use the transformers library, where you choose the 27B or 9B folder
- A vLLM server started from the downloaded folder
- Apple silicon Macs, through the community MLX quantizations of the 27B model that the card lists
- Windows, macOS or Linux with Python, for the download

```table
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:

- Python on Windows, macOS or Linux
- A PyTorch build that suits your hardware
- Transformers 5.9.0 and Accelerate 1.14.0, the versions the card's examples use
- Room for the BF16 weights of the folder you pick

1. Install Python and a PyTorch build for your hardware.
2. Install the huggingface_hub package and download the repository with the first block below.
3. Install the pinned transformers and accelerate versions with the second block.
4. Pick the 27B or 9B folder when you load the model.

```sh
pip install -U huggingface_hub
hf download dglhf/Slonik
```

```bash
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.

```python
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.

```python
from huggingface_hub import snapshot_download

snapshot_download(
    "dglhf/Slonik",
    allow_patterns=["27B/*", "LICENSE", "NOTICE", "licenses/*"],
    local_dir="./Slonik",
)
```

```bash
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}'
```

```table
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.

```flow
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:

- License: Apache 2.0
- Cost to run: none named
- Data it reaches: the download fetches files from Hugging Face, and the source names nothing else
- Not for: the evaluation covers text and code work, and the vision parts it keeps are outside that scope
- The 9B model's SWE-bench score is provisional, because one round of evaluation finished only 55 of 58 tasks

## On Hugging Face, 13 November 2026

- Task: text generation
- Library: transformers
- Formats: Safetensors
- Downloads in the last 30 days: 0
- Likes: 5
- License: apache-2.0
- Quantized versions: 3
- Tags: transformers, safetensors, slonik, code, postgresql, software-engineering, reinforcement-learning, text-generation

## Links

- Model: https://huggingface.co/dglhf/Slonik
- Files: https://huggingface.co/dglhf/Slonik/tree/main

## Get the model

Download its files with Hugging Face's command line:

```sh
pip install -U huggingface_hub
hf download dglhf/Slonik
```

Then follow the usage in its model card. Nothing in this kit runs by itself.
````

## What is in it

1 files, 7 KB, downloaded as a zip.

```text
README.md  7 KB
```

## Source

[dglhf/Slonik on Hugging Face](https://huggingface.co/dglhf/Slonik)

## Compare with similar

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 | 2026-11-10 |
| [Slonik-27B-oQ8-mtp](https://mindket.com/p/44b9c508-ee2d-4157-bf27-1cb8c07a1994) | 498 | 3 | 27.3B | apache-2.0 | 2026-11-08 |
| [Terminal-RSI-27B](https://mindket.com/p/b7d63976-c860-4b80-abca-f0c045cd8b2b) | 2,536 | 33 | 27.8B | apache-2.0 | 2026-10-21 |
| [ColGrep-Agent-2B](https://mindket.com/p/b5c8de72-bc73-46d1-b926-75154f9a52c0) | 1,141 | 38 | 2.5B | apache-2.0 | 2026-10-11 |
| [Maincoder-1B](https://mindket.com/p/4ab6e559-24e5-4649-98d3-82237119cace) | 451 | 101 | 1B | apache-2.0 | 2026-05-13 |
| [Sabi-Noema](https://mindket.com/p/04e2ec5b-5be2-45e5-ac63-8b75f7b11c4e) | 1,810 | 55 | 27.4B | apache-2.0 | 2026-10-19 |

Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Last change on Hugging Face: 2026-11-10
- First published: 2026-11-05
- Checked on Hugging Face: 2026-11-12
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open dglhf/Slonik on Hugging Face](https://huggingface.co/dglhf/Slonik)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/d1ed3759-b732-40ee-a4dc-1d69def72a00)
- [Its page on Mindket](https://mindket.com/p/d1ed3759-b732-40ee-a4dc-1d69def72a00)
