File size: 5,807 Bytes
c372bdb
 
 
 
 
 
 
 
 
 
 
 
 
 
43cc47b
c372bdb
 
 
 
 
1e21552
 
 
 
 
 
 
 
 
 
6a06281
1e21552
 
 
 
c372bdb
1e21552
c372bdb
1e21552
4dbb447
1e21552
4dbb447
1e21552
4dbb447
1e21552
 
4dbb447
1e21552
 
 
 
 
 
 
 
 
 
4dbb447
1e21552
4dbb447
1e21552
4dbb447
1e21552
 
 
 
 
 
 
 
4dbb447
c372bdb
4dbb447
c372bdb
 
 
 
1e21552
 
 
 
c372bdb
63c68b6
4dbb447
c372bdb
4dbb447
1e21552
 
 
 
 
4dbb447
1e21552
 
 
 
4dbb447
c372bdb
3e203fc
c372bdb
3e203fc
1e21552
3e203fc
1e21552
3e203fc
1e21552
3e203fc
 
 
 
 
1e21552
3e203fc
 
 
 
 
 
 
 
1e21552
3e203fc
 
1e21552
 
3e203fc
 
 
 
 
 
 
 
 
1e21552
3e203fc
1e21552
3e203fc
1e21552
3e203fc
1e21552
3e203fc
 
 
 
 
 
 
1e21552
 
 
4dbb447
1e21552
c372bdb
1e21552
 
 
 
 
c372bdb
1e21552
4dbb447
1e21552
 
 
 
 
 
4dbb447
1e21552
4dbb447
1e21552
 
 
 
 
4dbb447
1e21552
4dbb447
1e21552
3e203fc
1e21552
 
 
 
3e203fc
1e21552
3e203fc
1e21552
3e203fc
1e21552
3e203fc
1e21552
3e203fc
1e21552
c372bdb
3e203fc
 
1e21552
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
---
license: apache-2.0
language:
  - en
library_name: transformers
pipeline_tag: text-generation
tags:
  - code
  - code-generation
  - coding-assistant
  - qlora
  - unsloth
  - local-inference
  - merkium-ai
  - adamas-mini-1
model-index:
  - name: Arti Code Mini
    results: []
---

<div align="center">

<svg width="640" height="108" viewBox="0 0 640 108" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Arti Code Mini banner">
  <rect width="640" height="108" fill="#111111"/>
  <rect x="0" y="0" width="640" height="28" fill="#1c1c1c"/>
  <circle cx="16" cy="14" r="5" fill="#4a4a4a"/>
  <circle cx="34" cy="14" r="5" fill="#4a4a4a"/>
  <circle cx="52" cy="14" r="5" fill="#4a4a4a"/>
  <text x="320" y="18" font-family="'SF Mono', Consolas, monospace" font-size="11" fill="#7a7a7a" text-anchor="middle">arti-code-mini</text>
  <text x="24" y="60" font-family="'SF Mono', Consolas, monospace" font-size="22" fill="#f2f2f2">&gt; Arti Code Mini</text>
  <text x="24" y="84" font-family="'SF Mono', Consolas, monospace" font-size="13" fill="#8a8a8a">Local Coding</text>
  <rect x="24" y="93" width="8" height="14" fill="#f2f2f2">
    <animate attributeName="opacity" values="1;1;0;0" dur="1s" repeatCount="indefinite"/>
  </rect>
</svg>

<sub>apache-2.0 &nbsp;路&nbsp; 3B params &nbsp;路&nbsp; 2,048 ctx &nbsp;路&nbsp; 6GB+ VRAM</sub>

</div>

# Arti Code Mini

Arti Code Mini is a 3B-parameter coding assistant fine-tuned by **Merkium AI** for local deployment on consumer hardware. It targets clean, well-structured code generation and multi-turn debugging assistance without a dependency on cloud inference.

<details>
<summary><b>Table of Contents</b></summary>

- [Model Details](#model-details)
- [Intended Use](#intended-use)
- [Installation](#installation)
- [Usage](#usage)
- [Hardware Requirements](#hardware-requirements)
- [Example Prompts](#example-prompts)
- [Limitations](#limitations)
- [Citation](#citation)
- [License](#license)
- [Contact](#contact)

</details>

**Quick start**

```bash
pip install transformers torch accelerate bitsandbytes
python -c "
from transformers import pipeline
pipe = pipeline('text-generation', model='Merkiumai/Arti-code-mini', device_map='auto')
print(pipe([{'role': 'user', 'content': 'Write a function that reverses a string.'}], max_new_tokens=200)[0]['generated_text'][-1]['content'])
"
```

## Model Details

| Property | Value |
|---|---|
| Developer | Merkium AI |
| Parameters | 3 Billion |
| Fine-tuning method | QLoRA (LoRA via Unsloth) |
| Primary use case | Coding assistant |
| Context length | 2,048 tokens |
| Precision | float16 / 4-bit quantized |
| License | Apache 2.0 |
| tuned | Adamas Mini 1 |

## Intended Use

**In scope:**
- Writing and completing code across multiple languages
- Debugging and explaining existing code
- Generating functions, classes, algorithms, and scripts
- Learning support for programming concepts and best practices

**Out of scope:**
- General conversation or non-coding tasks
- Fully autonomous code generation without human review
- Production systems without independent testing and validation

## Installation

```bash
pip install transformers torch accelerate bitsandbytes
```

## Usage

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_name = "Merkiumai/Arti-code-mini"

tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.float16,
    device_map="auto",
    trust_remote_code=True
)

messages = [
    {"role": "user", "content": "Write a Python function that checks if a number is prime."}
]

text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)

outputs = model.generate(
    **inputs,
    max_new_tokens=300,
    temperature=0.3,
    do_sample=True,
    pad_token_id=tokenizer.eos_token_id
)

response = tokenizer.decode(outputs[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True)
print(response)
```

Chat formatting is applied automatically via `tokenizer.apply_chat_template()`. The underlying format:

```text
### System:
You are Arti Code Mini, a helpful coding assistant created by Merkium AI.

### User:
Write a Python function that reverses a string.

### Arti:
def reverse_string(s: str) -> str:
    return s[::-1]
```

## Hardware Requirements

| Component | Minimum | Recommended |
|---|---|---|
| GPU VRAM | 6 GB | 8 GB+ |
| RAM | 8 GB | 16 GB |
| Storage | 4 GB free | 8 GB free |

## Example Prompts

- Write a Python function that checks if a string is a palindrome.
- Create a FastAPI endpoint that accepts a name and returns a greeting.
- Explain how binary search works and provide an implementation.
- Write a class for a bank account with deposit and withdraw methods.
- Write a decorator that measures the execution time of a function.
- Remove duplicates from a list while preserving order.

## Limitations

- May occasionally produce incorrect or incomplete code.
- Performs best with clear, specific, well-structured prompts.
- Not suited to tasks outside coding and software development.
- Context limited to 2,048 tokens per session.
- All generated code should be reviewed by a human before use in production.

## Citation

```bibtex
@misc{artimini2025,
  title  = {Arti Code Mini: A Lightweight Local Coding Assistant},
  author = {{Merkium AI}},
  year   = {2025},
  url    = {https://huggingface.co/Merkiumai/Arti-code-mini}
}
```

## License

Released under the [Apache 2.0](LICENSE) license.

## Contact

Model repository: [huggingface.co/Merkiumai/Arti-code-mini](https://huggingface.co/Merkiumai/Arti-code-mini)

---

<p align="center"><sub>Developed and maintained by Merkium AI</sub></p>