Kreatix K2 300M
Introduction
Kreatix K2 300M is the smallest model of the Kreatix K2 family: a vision-language model built entirely from scratch by KreatixLabs, with its own architecture, tokenizer and vision encoder, trained from random weights. It is compact enough to run on a laptop CPU.
- Code-focused. Trained on curated multi-language code and coding answers distilled from a larger teacher model.
- Tool use. Calls tools (run Python, files, calculator), reads the result and continues.
- Vision. Understands images at their native aspect ratio.
- Direct responses within four firm safety limits.
Model overview
| Type | Causal vision-language model (text and images in, text out) |
| Parameters | 286M language model + 32M vision encoder |
| Layers | 16: Gated DeltaNet linear attention with full attention every fourth layer (DDDA) |
| Vocabulary | 65,536 (byte-level BPE, trained from scratch) |
| Context length | 8,192 tokens |
| Weights | bf16, about 0.6 GB |
| License | Apache 2.0 |
Quickstart
git clone https://huggingface.co/KreatixLabs/Kreatix-K2-300M
cd Kreatix-K2-300M
pip install -r requirements.txt
python scripts/generate.py --model . --tokenizer tokenizer.json --prompt "Write a Python function that reverses a list."
python scripts/generate.py --model . --tokenizer tokenizer.json --image photo.jpg --prompt "What is in this picture?"
from kreatix.data.tokenizer import KreatixTokenizer
from kreatix.inference import chat, load_model
model = load_model(".", device="cpu")
tok = KreatixTokenizer("tokenizer.json")
print(chat(model, tok, [{"role": "user", "content": "Explain list comprehensions."}], device="cpu"))
Tool use
# file tools only; add --allow-python to let the model run code on your machine
python scripts/generate.py --model . --tokenizer tokenizer.json --agent --prompt "Create hello.py that prints hello"
Tools: run_python (isolated process), read_file, write_file, list_files (sandboxed workspace) and calculator.
Deployment
kreatix/serve.py is an OpenAI-compatible server (/v1/chat/completions, streaming, images) protected by API keys.
Use any OpenAI client with base_url set to your endpoint. Keep keys on your server, never in browser code.
Training
| Stage | Data |
|---|---|
| Pretraining (from random weights) | FineWeb-Edu, Cosmopedia v2, FineMath 4+, OpenCoder annealing corpus |
| Vision alignment | FineVision instruction data rated 4+/5 |
| Instruction tuning | Coding instructions (OpenCoder, Magicoder), SmolTalk, FineVision, tool-use traces from real code execution, safety set |
Real pretraining log. Video: MP4 · still: PNG
Instruction tuning: 400 steps (about 52M tokens) on 1,915 teacher answers, 153 agent traces (39 with real code execution), OpenCoder and Magicoder coding data, SmolTalk, FineVision and the safety set. The vision encoder was trained only in this stage, so image understanding is early.
Instruction and tool-use data are partly distilled from a community build of GLM-5.3-Flash (MIT). Restricted topics are excluded from teacher prompts and screened out of answers. Training ran on NVIDIA Blackwell GPUs, distributed across sites with DiLoCo.
Responsible use
The model answers directly and declines four categories: manufacturing, acquiring or recreationally dosing illegal drugs; methods of self-harm (it responds supportively and points to crisis lines); sexual content involving minors; and biological, chemical, nuclear or radiological weapons. At this size these behaviours are not fully reliable.
Limitations
- A small model: expect factual mistakes, limited reasoning and simple code.
- Mostly English.
- Requires the included
kreatixpackage; not supported by transformers, llama.cpp or Ollama yet. - Tool use is basic at this size.
Citation
@misc{kreatix2026k2,
title = {Kreatix K2: A Vision-Language Model for Code and Tools, Built from Scratch},
author = {{Mych (Kim Night)} and {KreatixLabs}},
year = {2026},
url = {https://huggingface.co/KreatixLabs/Kreatix-K2}
}
Credits
- Mych (Kim Night)
- KreatixLabs
Weights exported from step_00000400 on 2026-11-15.