KSTRLAI commited on
Commit
b94d763
·
verified ·
1 Parent(s): 0fa0508

Improve model card

Browse files
Files changed (1) hide show
  1. README.md +131 -27
README.md CHANGED
@@ -1,27 +1,131 @@
1
- ---
2
- base_model: Qwen/Qwen3-4B-Instruct-2507
3
- library_name: transformers
4
- license: apache-2.0
5
- tags: [qwen3, code, luau, roblox, lua, web, ui, react, tailwind, reasoning, gguf]
6
- ---
7
- # Colossus 2.2 Code
8
-
9
- A concise, direct coding assistant. It is especially strong at Roblox Luau (scripts, ModuleScripts, GUIs, DataStores, networking, Fusion and React-Lua) and at building web UI with HTML, CSS, JavaScript, React and Tailwind, and it writes code in many other languages too. It thinks step by step in a `<think>` block before hard problems and answers simple messages right away. Built on Qwen3-4B-Instruct-2507.
10
-
11
- ## Files
12
- - Root: merged 16-bit safetensors model (use with transformers / vLLM)
13
- - `Colossus-2.2-Code-Q4_K_M.gguf` (~2.5 GB, fast) and `Colossus-2.2-Code-Q8_0.gguf` (~4.3 GB, higher quality): llama.cpp, LM Studio, Ollama. Both fit easily on an 8 GB GPU.
14
-
15
- ## Run
16
- ```
17
- llama-server -m Colossus-2.2-Code-Q4_K_M.gguf -ngl 99 -c 16384 --jinja
18
- ```
19
- Temperature 0.6 and top_p 0.95 work well; for code, a lower temperature such as 0.3 gives more consistent results. Use a context of 16k or more for long files.
20
-
21
- Ollama: create a Modelfile with `FROM ./Colossus-2.2-Code-Q4_K_M.gguf` and `PARAMETER num_ctx 16384`, then `ollama create colossus-code -f Modelfile`.
22
-
23
- Transformers:
24
- ```python
25
- from transformers import AutoModelForCausalLM, AutoTokenizer
26
- tok = AutoTokenizer.from_pretrained("KSTRLAI/Colossus-2.2-Code"); model = AutoModelForCausalLM.from_pretrained("KSTRLAI/Colossus-2.2-Code", torch_dtype="auto", device_map="auto")
27
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: apache-2.0
4
+ pipeline_tag: text-generation
5
+ tags:
6
+ - code
7
+ - luau
8
+ - roblox
9
+ - lua
10
+ - web
11
+ - ui
12
+ - react
13
+ - tailwind
14
+ - reasoning
15
+ - gguf
16
+ ---
17
+
18
+ # Colossus 2.2 Code
19
+
20
+ Colossus 2.2 Code is a concise, direct coding assistant. It is especially strong at Roblox Luau — scripts, ModuleScripts, GUIs, DataStores, networking, Fusion, and React-Lua — and at building web UI with HTML, CSS, JavaScript, React, and Tailwind. It also writes code in many other languages. On harder problems it thinks step by step inside a `<think>` block before answering; simple messages get a direct reply. It is made by KSTRL.
21
+
22
+ ## Identity
23
+
24
+ The model gives its name (Colossus) only when asked. It says it was made by KSTRL only when asked who made it.
25
+
26
+ ## Files
27
+
28
+ | Path | Type | Size | Notes |
29
+ | --- | --- | --- | --- |
30
+ | `model-00001-of-00002.safetensors`, `model-00002-of-00002.safetensors` | Merged 16-bit (bf16) | 8.0 GB | Transformers weights in the repo root |
31
+ | `Colossus-2.2-Code-Q4_K_M.gguf` | GGUF Q4_K_M | 2.5 GB | Faster local use |
32
+ | `Colossus-2.2-Code-Q8_0.gguf` | GGUF Q8_0 | 4.3 GB | Higher-fidelity local use |
33
+ | `tokenizer.json`, `tokenizer_config.json`, `chat_template.jinja` | Tokenizer and chat template | — | Use these with the 16-bit weights |
34
+
35
+ ## Recommended hardware
36
+
37
+ - **Q4_K_M (2.5 GB)** fits comfortably on an 8 GB GPU, with room for a useful context window.
38
+ - **Q8_0 (4.3 GB)** also fits on an 8 GB GPU.
39
+ - **16-bit (8.0 GB)** is tight on 8 GB of VRAM. Short prompts may work; longer context usually needs offload or more memory.
40
+
41
+ Use a context window of 16K or more when you are working with long files. The model config allows up to 262,144 tokens if you have the memory.
42
+
43
+ ## Chat format
44
+
45
+ Use the chat template that ships with the model. Messages use the usual `system`, `user`, and `assistant` roles. In Transformers, call `tokenizer.apply_chat_template(...)`. In llama.cpp, pass `--jinja` so the bundled template is applied and thinking can be shown separately from the final answer.
46
+
47
+ When the model reasons, the reply may include a `<think> ... </think>` block followed by the answer.
48
+
49
+ ## Usage
50
+
51
+ ### Transformers
52
+
53
+ ```python
54
+ from transformers import AutoModelForCausalLM, AutoTokenizer
55
+
56
+ repo = "KSTRLAI/Colossus-2.2-Code"
57
+ tokenizer = AutoTokenizer.from_pretrained(repo)
58
+ model = AutoModelForCausalLM.from_pretrained(
59
+ repo,
60
+ torch_dtype="auto",
61
+ device_map="auto",
62
+ )
63
+
64
+ messages = [
65
+ {"role": "user", "content": "Write a Roblox ModuleScript that caches DataStore reads with a short TTL."},
66
+ ]
67
+ inputs = tokenizer.apply_chat_template(
68
+ messages,
69
+ add_generation_prompt=True,
70
+ tokenize=True,
71
+ return_dict=True,
72
+ return_tensors="pt",
73
+ )
74
+ inputs = {k: v.to(model.device) for k, v in inputs.items()}
75
+
76
+ output = model.generate(
77
+ **inputs,
78
+ max_new_tokens=2048,
79
+ temperature=0.3,
80
+ top_p=0.95,
81
+ )
82
+ print(tokenizer.decode(output[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
83
+ ```
84
+
85
+ Temperature `0.6` and `top_p` `0.95` work well in general. For code, a lower temperature such as `0.3` usually gives more consistent results.
86
+
87
+ ### llama.cpp
88
+
89
+ ```bash
90
+ hf download KSTRLAI/Colossus-2.2-Code --include "*.gguf" --local-dir Colossus-2.2-Code
91
+
92
+ llama-cli \
93
+ -m Colossus-2.2-Code/Colossus-2.2-Code-Q4_K_M.gguf \
94
+ --jinja -ngl 99 -c 16384 \
95
+ --temp 0.3 --top-p 0.95 \
96
+ -p "Write a React component that renders a responsive navbar with Tailwind."
97
+
98
+ llama-server \
99
+ -m Colossus-2.2-Code/Colossus-2.2-Code-Q4_K_M.gguf \
100
+ --jinja -ngl 99 -c 16384
101
+ ```
102
+
103
+ ### Ollama
104
+
105
+ Create a `Modelfile`:
106
+
107
+ ```
108
+ FROM ./Colossus-2.2-Code-Q4_K_M.gguf
109
+ PARAMETER num_ctx 16384
110
+ PARAMETER temperature 0.3
111
+ PARAMETER top_p 0.95
112
+ ```
113
+
114
+ Then:
115
+
116
+ ```bash
117
+ ollama create colossus-2.2-code -f Modelfile
118
+ ollama run colossus-2.2-code
119
+ ```
120
+
121
+ ### LM Studio
122
+
123
+ Download a GGUF from this repo into your LM Studio models folder and load it in the app. Set context length to at least 16K. Q4_K_M is the better starting point on 8 GB GPUs; switch to Q8_0 if you want higher fidelity and have the headroom.
124
+
125
+ ## Limitations
126
+
127
+ Generated code can contain bugs, outdated APIs, or insecure patterns. Read and test everything before you ship it. The thinking block is a reasoning draft, not a guarantee of a correct solution.
128
+
129
+ ## License
130
+
131
+ Apache License 2.0.