constructai commited on
Commit
aa8b2bc
·
verified ·
1 Parent(s): 4a3726a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +163 -7
README.md CHANGED
@@ -7,18 +7,174 @@ base_model:
7
  - Qwen/Qwen2.5-Coder-7B
8
  ---
9
 
10
- # Kiro 1.0 XCode
11
 
12
- ## Model description
13
 
14
- **kiro-1.0-7B-XCode** is a 7-billion-parameter language model based on the **Qwen2.5-Coder-7B** architecture. It has been further trained on code-specific data to excel at various programming-related tasks, including code generation, completion, explanation, translation between programming languages, and answering coding-related questions.
 
15
 
 
 
 
 
16
 
17
- [Напиши здесь описание модели]
18
 
19
- ## Intended uses & limitations
20
- <!-- Для каких целей предназначена модель? Где её можно применять, а где не стоит? Какие есть ограничения? -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
- [Опиши предполагаемое использование и ограничения]
 
 
23
 
24
 
 
7
  - Qwen/Qwen2.5-Coder-7B
8
  ---
9
 
10
+ # kiro-1.0-7B-XCode
11
 
12
+ <div align="center">
13
 
14
+ **kiro-1.0-7B-XCode** a code-focused language model fine-tuned on top of Qwen2.5-Coder-7B,
15
+ trained on a mixed dataset of real-world code and instruction pairs.
16
 
17
+ [![HuggingFace](https://img.shields.io/badge/🤗%20HuggingFace-constructai%2Fkiro--1.0--7B--XCode-yellow)](https://huggingface.co/constructai/kiro-1.0-7B-XCode)
18
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue)](https://opensource.org/licenses/Apache-2.0)
19
+ [![Model Size](https://img.shields.io/badge/Parameters-7B-green)](https://huggingface.co/constructai/kiro-1.0-7B-XCode)
20
+ [![Base Model](https://img.shields.io/badge/Base-Qwen2.5--Coder--7B-orange)](https://huggingface.co/Qwen/Qwen2.5-Coder-7B)
21
 
22
+ </div>
23
 
24
+ ---
25
+
26
+ ## 📖 Overview
27
+
28
+ **kiro-1.0-7B-XCode** is the first model in the **kiro** series by [constructai](https://huggingface.co/constructai).
29
+
30
+ This model is specialized for writing, analyzing, and explaining code in Python and JavaScript. It is trained to follow instructions in the `### Instruction → ### Response` format, making it suitable for IDE plugins, coding assistants, and code review tools.
31
+
32
+ ---
33
+
34
+ ## 🏋️ Training
35
+
36
+ | Parameter | Value |
37
+ |---|---|
38
+ | Base model | `Qwen/Qwen2.5-Coder-7B` |
39
+ | Method | QLoRA (4-bit, NF4) + LoRA merge |
40
+ | LoRA rank | 16 |
41
+ | LoRA alpha | 32 |
42
+ | Epochs | 1 |
43
+ | Learning rate | 2e-4 |
44
+ | Scheduler | Cosine |
45
+ | Hardware | NVIDIA RTX A5000 24GB |
46
+
47
+ ### Dataset
48
+
49
+ The model was trained on ~58,000 samples from a mixed dataset:
50
+
51
+ | Source | Samples | Description |
52
+ |---|---|---|
53
+ | `bigcode/the-stack-smol` (Python) | 20,000 | Real-world Python code from GitHub |
54
+ | `bigcode/the-stack-smol` (JavaScript) | 20,000 | Real-world JavaScript code from GitHub |
55
+ | `iamtarun/python_code_instructions_18k_alpaca` | 18,000 | Python instruction-response pairs |
56
+
57
+ ---
58
+
59
+ ## 🚀 Quick Start
60
+
61
+ ### Installation
62
+
63
+ ```bash
64
+ pip install transformers torch accelerate
65
+ ```
66
+
67
+ ### Inference
68
+
69
+ ```python
70
+ from transformers import AutoTokenizer, AutoModelForCausalLM
71
+ import torch
72
+
73
+ model_name = "constructai/kiro-1.0-7B-XCode"
74
+
75
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
76
+ model = AutoModelForCausalLM.from_pretrained(
77
+ model_name,
78
+ dtype=torch.bfloat16,
79
+ device_map="auto",
80
+ trust_remote_code=True,
81
+ )
82
+
83
+ prompt = "### Instruction:\nWrite a Python function that checks if a number is prime.\n\n### Response:\n"
84
+
85
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
86
+ outputs = model.generate(
87
+ **inputs,
88
+ max_new_tokens=512,
89
+ do_sample=False,
90
+ repetition_penalty=1.3,
91
+ pad_token_id=tokenizer.eos_token_id,
92
+ )
93
+ response = tokenizer.decode(
94
+ outputs[0][inputs["input_ids"].shape[1]:],
95
+ skip_special_tokens=True
96
+ )
97
+ print(response)
98
+ ```
99
+
100
+ ### Prompt Format
101
+
102
+ ```
103
+ ### Instruction:
104
+ {your request}
105
+
106
+ ### Response:
107
+ ```
108
+
109
+ With additional context:
110
+ ```
111
+ ### Instruction:
112
+ {your request}
113
+
114
+ ### Input:
115
+ {additional context or code}
116
+
117
+ ### Response:
118
+ ```
119
+
120
+ ---
121
+
122
+ ## 📊 Example
123
+
124
+ **Prompt:**
125
+ ```
126
+ ### Instruction:
127
+ Write a Python function that checks if a number is prime.
128
+
129
+ ### Response:
130
+ ```
131
+
132
+ **kiro-1.0 output:**
133
+ ```python
134
+ def is_prime(num):
135
+ for i in range(2, num):
136
+ if (num % i) == 0:
137
+ return False
138
+ return True
139
+ ```
140
+
141
+ ---
142
+
143
+ ## 🗺️ Roadmap
144
+
145
+ This is the first release of the kiro model series. Upcoming versions:
146
+
147
+ - **kiro-1.5-7B-XCode** — larger dataset (500k+ samples), improved benchmarks
148
+ - **kiro-2.0-7B-XCode** — instruction tuning + DPO alignment
149
+ - **kiro-3.0-14B-XCode** — larger base model
150
+ - **ZuKU** — custom architecture trained from scratch (100–200M parameters)
151
+
152
+ ---
153
+
154
+ ## ⚠️ Limitations
155
+
156
+ - Trained for 1 epoch — may produce repetitions in long outputs (use `repetition_penalty=1.3`)
157
+ - Optimized for Python and JavaScript — other languages have limited support
158
+ - This is v1.0 — quality will improve in future releases
159
+
160
+ ---
161
+
162
+ ## 📜 License
163
+
164
+ This model is released under the **Apache 2.0** license, inherited from the base model Qwen2.5-Coder-7B.
165
+
166
+ ---
167
+
168
+ ## 🙏 Acknowledgements
169
+
170
+ - [Qwen Team](https://huggingface.co/Qwen) for the excellent base model
171
+ - [BigCode](https://huggingface.co/bigcode) for The Stack dataset
172
+ - [Hugging Face](https://huggingface.co) for the infrastructure
173
+
174
+ ---
175
 
176
+ <div align="center">
177
+ Made with ❤️ by <a href="https://huggingface.co/constructai">constructai</a>
178
+ </div>
179
 
180