Views
No views yet


| Model | HumanEval | HumanEval+ | MBPP+ | MMLU | GSM8K |
|---|---|---|---|---|---|
| Maincode/Maincoder-1B | 0.7622 | 0.7256 | 0.7090 | 0.3054 | 0.2976 |
| deepseek-ai/deepseek-coder-1.3b-instruct | 0.5610 | 0.5305 | 0.6217 | 0.2705 | 0.0413 |
| HuggingFaceTB/SmolLM3-3B | 0.5366 | 0.5000 | 0.6799 | 0.5928 | 0.5505 |
| Qwen/Qwen2.5-Coder-1.5B-Instruct | 0.4634 | 0.4451 | 0.6561 | 0.4984 | 0.4944 |
| Qwen/Qwen3-1.7B | 0.4024 | 0.3780 | 0.5582 | 0.5571 | 0.6865 |
| Attribute | Value |
|---|---|
| Parameters | 1B |
| Hidden Size | 1536 |
| Layers | 32 |
| Attention Heads | 16 (4 KV heads) |
| Head Dimension | 96 |
| Vocabulary Size | 151,936 |
| Context Length | 2,048 |
| Format | ONNX |
pip install optimum[onnxruntime] transformerspip install optimum[onnxruntime-gpu]1from optimum.onnxruntime import ORTModelForCausalLM
2from transformers import AutoTokenizer
3
4# Load the ONNX model with KV-cache support
5model = ORTModelForCausalLM.from_pretrained(
6 "Maincode/Maincoder-1B-ONNX",
7 file_name="decoder_with_past_model.onnx",
8 use_cache=True
9)
10
11# Load the tokenizer
12tokenizer = AutoTokenizer.from_pretrained("Maincode/Maincoder-1B-ONNX")
13
14# Code completion example
15prompt = '''def fibonacci(n: int) -> int:
16 """Return the n-th Fibonacci number."""
17'''
18
19inputs = tokenizer(prompt, return_tensors="pt")
20outputs = model.generate(
21 **inputs,
22 max_new_tokens=128,
23 temperature=0.2,
24 do_sample=True,
25 pad_token_id=tokenizer.eos_token_id
26)
27
28print(tokenizer.decode(outputs[0], skip_special_tokens=True))1from optimum.onnxruntime import ORTModelForCausalLM
2
3model = ORTModelForCausalLM.from_pretrained(
4 "Maincode/Maincoder-1B-ONNX",
5 use_cache=True,
6 file_name="decoder_with_past_model.onnx",
7 provider="CUDAExecutionProvider"
8)npm install @huggingface/transformers1import { AutoModelForCausalLM, AutoTokenizer } from '@huggingface/transformers';
2
3// Load the tokenizer and model
4const tokenizer = await AutoTokenizer.from_pretrained('Maincode/Maincoder-1B-ONNX');
5const model = await AutoModelForCausalLM.from_pretrained('Maincode/Maincoder-1B-ONNX', {
6 subfolder: '.',
7 model_file_name: 'decoder_with_past_model',
8 use_external_data_format: true,
9
10});
11
12// Code completion example
13const prompt = `def fibonacci(n: int) -> int:
14 """Return the n-th Fibonacci number."""
15`;
16
17const inputs = await tokenizer(prompt, { return_tensors: 'pt' });
18
19const outputs = await model.generate({
20 input_ids: inputs.input_ids,
21 attention_mask: inputs.attention_mask,
22 max_new_tokens: 128,
23 temperature: 0.2,
24 do_sample: true,
25});
26
27const decoded = tokenizer.decode(outputs[0], { skip_special_tokens: true });
28console.log(decoded);1# Function completion
2prompt = '''def quicksort(arr: list) -> list:
3 """Sort a list using the quicksort algorithm."""
4'''
5
6# Class completion
7prompt = '''class BinarySearchTree:
8 """A binary search tree implementation."""
9
10 def __init__(self):
11'''
12
13# Algorithm implementation
14prompt = '''def dijkstra(graph: dict, start: str, end: str) -> tuple:
15 """Find the shortest path using Dijkstra's algorithm.
16
17 Args:
18 graph: Adjacency list representation of the graph
19 start: Starting node
20 end: Target node
21
22 Returns:
23 Tuple of (distance, path)
24 """
25'''1@misc{maincoder2025,
2 title = {Maincoder-1B: A High-Performance 1B Parameter Coding Model},
3 author = {Maincode Team},
4 year = {2025},
5 organization = {Maincode},
6 howpublished = {\url{https://huggingface.co/Maincode/Maincoder-1B}}
7}