Instructions to use Merkiumai/Arti-code-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Merkiumai/Arti-code-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Merkiumai/Arti-code-mini") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Merkiumai/Arti-code-mini", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Merkiumai/Arti-code-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Merkiumai/Arti-code-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Merkiumai/Arti-code-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Merkiumai/Arti-code-mini
- SGLang
How to use Merkiumai/Arti-code-mini with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Merkiumai/Arti-code-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Merkiumai/Arti-code-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Merkiumai/Arti-code-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Merkiumai/Arti-code-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use Merkiumai/Arti-code-mini with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Merkiumai/Arti-code-mini to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Merkiumai/Arti-code-mini to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Merkiumai/Arti-code-mini to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="Merkiumai/Arti-code-mini", max_seq_length=2048, ) - Docker Model Runner
How to use Merkiumai/Arti-code-mini with Docker Model Runner:
docker model run hf.co/Merkiumai/Arti-code-mini
apache-2.0 路 3B params 路 2,048 ctx 路 6GB+ VRAM
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.
Table of Contents
Quick start
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 |
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
pip install transformers torch accelerate bitsandbytes
Usage
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:
### 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
@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.
Contact
Model repository: huggingface.co/Merkiumai/Arti-code-mini
Developed and maintained by Merkium AI