How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf KomorAI/CodeThinker-Python-270M:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf KomorAI/CodeThinker-Python-270M:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf KomorAI/CodeThinker-Python-270M:Q4_K_M
# Run inference directly in the terminal:
llama cli -hf KomorAI/CodeThinker-Python-270M:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-app
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama serve -hf KomorAI/CodeThinker-Python-270M:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama cli -hf KomorAI/CodeThinker-Python-270M:Q4_K_M
Use Docker
docker model run hf.co/KomorAI/CodeThinker-Python-270M:Q4_K_M
Quick Links

KomorAI/CodeThinker-Python-270M

Lekki model językowy klasy 270M parametrów przeznaczony do zadań związanych z językiem Python (uzupełnianie kodu, proste funkcje, refaktoryzacja, podstawowe skrypty).

Uwaga: Nazwa CodeThinker jest wyłącznie umowna — model nie posiada wbudowanego trybu reasoning / chain-of-thought (nie generuje ukrytych ani jawnych łańcuchów rozumowania przed odpowiedzią).

Najważniejsze cechy

  • Rozmiar: ~270M parametrów — niskie zużycie pamięci VRAM/RAM oraz szybka inferencja nawet na słabszym sprzęcie (CPU / GPU klasy consumer).
  • Specjalizacja: Python (składnia, biblioteka standardowa, typowe wzorce i krótkie snippet-y).
  • Brak reasoningu: Bezpośrednia generacja tokenów wyjściowych bez dedykowanego mechanizmu wieloetapowego wnioskowania.

Szybki start (Transformers)

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "KomorAI/CodeThinker-Python-270M"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype="auto",
    device_map="auto",
)

prompt = "def fibonacci(n: int) -> list[int]:\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_new_tokens=128,
        temperature=0.2,
        top_p=0.95,
        do_sample=True,
        pad_token_id=tokenizer.eos_token_id,
    )

print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Downloads last month
-
GGUF
Model size
0.3B params
Architecture
gemma3
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support