How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="KSTRLAI/Colossus-2.2-Code-UC")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("KSTRLAI/Colossus-2.2-Code-UC")
model = AutoModelForCausalLM.from_pretrained("KSTRLAI/Colossus-2.2-Code-UC", device_map="auto")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Colossus 2.2 Code UC (Ultra Code)

A concise, direct coding assistant for almost every popular language: Python, JavaScript/TypeScript, Java, C#, C++, C, Go, Rust, PHP, Kotlin, Swift, SQL, Bash/PowerShell, HTML/CSS and Roblox Luau. It writes complete, working files, debugs and reviews code, and explains fixes briefly. It thinks step by step in a <think> block before hard problems and answers simple messages right away. Built on Qwen3-4B-Instruct-2507.

Files

  • Root: merged 16-bit safetensors model (use with transformers / vLLM)
  • Colossus-2.2-Code-UC-Q4_K_M.gguf (2.5 GB, fast) and Colossus-2.2-Code-UC-Q8_0.gguf (4.3 GB, higher quality): llama.cpp, LM Studio, Ollama. Both fit on an 8 GB GPU.

Run

llama-server -m Colossus-2.2-Code-UC-Q4_K_M.gguf -ngl 99 -c 16384 --jinja

For code, a temperature around 0.3 gives the most consistent results. Use a context of 16k or more for long files.

Ollama: create a Modelfile with FROM ./Colossus-2.2-Code-UC-Q4_K_M.gguf and PARAMETER num_ctx 16384, then ollama create colossus-code-uc -f Modelfile.

Transformers:

from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("KSTRLAI/Colossus-2.2-Code-UC"); model = AutoModelForCausalLM.from_pretrained("KSTRLAI/Colossus-2.2-Code-UC", torch_dtype="auto", device_map="auto")
Downloads last month
13
Safetensors
Model size
4B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for KSTRLAI/Colossus-2.2-Code-UC

Quantized
(406)
this model