How to use from the
Use from the
MLX library
# Make sure mlx-lm is installed
# pip install --upgrade mlx-lm

# Generate text with mlx-lm
from mlx_lm import load, generate

model, tokenizer = load("AlphaOxO/Maincoder-1B-8bits-mlx")

prompt = "Write a story about Einstein"
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
    messages, add_generation_prompt=True
)

text = generate(model, tokenizer, prompt=prompt, verbose=True)

Maincoder-1B — MLX 8bits

Quantized to 8bits format.

Converted from Maincode/Maincoder-1B using mlx-lm.

Requirements

The Maincoder model type is support in my mlx-lm fork(AlphaKure/mlx-lm).

Update at: 2026/09/09

pip install git+https://github.com/AlphaKure/mlx-lm.git@19ed84b1e3333bc9c320109b15dec38fe0784d29

Use

  • use --extra-eos-token '<|im_end|>' to avoid loop response
mlx_lm.generate --model AlphaOxO/Maincoder-1B-8bits-mlx --prompt "def insert_sort(nums: list[int]):" --max-tokens 2048 --extra-eos-token '<|im_end|>'
Downloads last month
30
Safetensors
Model size
1B params
Tensor type
U32
·
BF16
·
MLX
Hardware compatibility
Log In to add your hardware

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AlphaOxO/Maincoder-1B-8bits-mlx

Quantized
(8)
this model

Collection including AlphaOxO/Maincoder-1B-8bits-mlx