Apertus
Collection
SwissAI's Apertus models that support 1k languages • 5 items • Updated • 4
Run mlx-community/Apertus-8B-2509-4bit on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/mlx-community/Apertus-8B-2509-4bit. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/mlx-community/Apertus-8B-2509-4bit on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to evaluate https://huggingface.co/mlx-community/Apertus-8B-2509-4bit. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
How to use mlx-community/Apertus-8B-2509-4bit with MLX:
# Make sure mlx-lm is installed
# pip install --upgrade mlx-lm
# if on a CUDA device, also pip install mlx[cuda]
# Generate text with mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/Apertus-8B-2509-4bit")
prompt = "Once upon a time in"
text = generate(model, tokenizer, prompt=prompt, verbose=True)How to use mlx-community/Apertus-8B-2509-4bit with MLX LM:
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "mlx-community/Apertus-8B-2509-4bit" --prompt "Once upon a time"
This model mlx-community/Apertus-8B-2509-4bit was converted to MLX format from swiss-ai/Apertus-8B-2509 using mlx-lm version 0.27.0.
pip install mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/Apertus-8B-2509-4bit")
prompt = "hello"
if tokenizer.chat_template is not None:
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
messages, add_generation_prompt=True
)
response = generate(model, tokenizer, prompt=prompt, verbose=True)
4-bit
Base model
swiss-ai/Apertus-8B-2509