Model reference · open weights
AFM is an open-weight language model from arcee-ai. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Maker | arcee-ai |
|---|---|
| Type | Language models |
| Task | Text gen |
| Parameters (lead) | 4.6B |
| Context | 64k tokens |
| Runs with | transformers |
| Based on | arcee-ai/AFM-4.5B-Base |
| Released | 2025-07-29 |
| Popularity | 11k downloads / month |
| Licence | Open weights |
About
AFM-4.5B is a 4.5 billion parameter instruction-tuned model developed by Arcee.ai, designed for enterprise-grade performance across diverse deployment environments from cloud to edge. The base model was trained on a dataset of 8 trillion tokens, comprising 6.5 trillion tokens of general pretraining data followed by 1.5 trillion tokens of midtraining data with enhanced focus on mathematical reasoning and code generation. Following pretraining, the model underwent supervised fine-tuning on high-quality instruction datasets. The instruction-tuned model was further refined through reinforcement learning on verifiable rewards as well as for human preference. We use a modified version of TorchTitan for pretraining, Axolotl for supervised fine-tuning, and a modified version of Verifiers for reinforcement learning.
The development of AFM-4.5B prioritized data quality as a fundamental requirement for achieving robust model performance. We collaborated with DatologyAI, a company specializing in large-scale data curation. DatologyAI's curation pipeline integrates a suite of proprietary algorithms—model-based quality filtering, embedding-based curation, target distribution-matching, source mixing, and synthetic data. Their expertise enabled the creation of a curated dataset tailored to support strong real-world performance.
The model architecture follows a standard transformer decoder-only design based on Vaswani et al., incorporating several key modifications for enhanced performance and efficiency. Notable architectural features include grouped query attention for improved inference efficiency and ReLU^2 activation functions instead of SwiGLU to enable sparsification while maintaining or exceeding performance benchmarks.
The model available in this repo is the instruct model following supervised fine-tuning and reinforcement learning.
View our documentation here for more details: https://docs.arcee.ai/arcee-foundation-models/introduction-to-arcee-foundation-models
*Qwen3 and SmolLM's reasoning approach causes their scores to vary wildly from suite to suite - but these are all scores on our internal harness with the same hyperparameters. Be sure to reference their reported scores. SmolLM just released its bench.
transformersYou can use the model directly with the transformers library.
We recommend a lower temperature, around 0.5, for optimal performance.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "arcee-ai/AFM-4.5B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
messages = [
{"role": "user", "content": "Who are you?"},
]
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
outputs = model.generate(
input_ids,
max_new_tokens=256,
do_sample=True,
temperature=0.5,
top_k=50,
top_p=0.95
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
vllmEnsure you are on version 0.10.1 or newer
pip install vllm>=0.10.1
You can then serve the model natively
vllm serve arcee-ai/AFM-4.5B
You can access this model directly via the Together Playground.
from together import Together
client = Together()
response = client.chat.completions.create(
model="arcee-ai/AFM-4.5B",
messages=[
{
"role": "user",
"content": "What are some fun things to do in New York?"
}
]
)
print(response.choices[0].message.content)
curl -X POST "https://api.together.xyz/v1/chat/completions" \
-H "Authorization: Bearer $TOGETHER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "arcee-ai/AFM-4.5B",
"messages": [
{
"role": "user",
"content": "What are some fun things to do in New York?"
}
]
}'
Support for llama.cpp and Intel OpenVINO is available:
https://huggingface.co/arcee-ai/AFM-4.5B-GGUF
https://huggingface.co/arcee-ai/AFM-4.5B-ov
AFM-4.5B is released under the Apache-2.0 license.
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys afm for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (afm below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"afm","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.