Instructions to use KomorAI/CodeThinker-Python-270M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use KomorAI/CodeThinker-Python-270M with 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
- Llama new
- LM Studio
- Jan
- Ollama
How to use KomorAI/CodeThinker-Python-270M with Ollama:
ollama run hf.co/KomorAI/CodeThinker-Python-270M:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use KomorAI/CodeThinker-Python-270M with Docker Model Runner:
docker model run hf.co/KomorAI/CodeThinker-Python-270M:Q4_K_M
- Lemonade
How to use KomorAI/CodeThinker-Python-270M with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull KomorAI/CodeThinker-Python-270M:Q4_K_M
Run and chat with the model
lemonade run user.CodeThinker-Python-270M-Q4_K_M
List all available models
lemonade list
- Atomic Chat
File size: 1,609 Bytes
553c359 0c1a6c8 553c359 0c1a6c8 553c359 0c1a6c8 553c359 0c1a6c8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | ---
tags:
- gguf
- llama.cpp
- llama-cpp
- unsloth
---
# 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)
```python
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)) |