Downloads · 30 days
156
24% of all-time downloads
arcee-ai/AFM-4.5B-Base-KDA-Only
AFM-4.5B-Base-KDA-Only is a feature extraction model from arcee-ai. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as apache-2.0.
A research variant of AFM-4.5B-Base where all attention layers have been replaced with Kimi Delta Attention (KDA) through knowledge distillation. This model contains no full-attention layers.
Downloads · 30 days
156
24% of all-time downloads
All-time downloads
652
Public
Parameters
5B
10.1 GB on disk
Likes
12
Public
Click a slice to open those files.
.safetensors10.1 GB · 100%
How the weights are stored.
BF165B · 100%
From the Hugging Face model README
A research variant of AFM-4.5B-Base where all attention layers have been replaced with Kimi Delta Attention (KDA) through knowledge distillation. This model contains no full-attention layers.
⚠️ Research Model: This is an experimental model released for research purposes. For production use, see AFM-4.5B.
More details available in our blog post here: https://www.arcee.ai/blog/distilling-kimi-delta-attention-into-afm-4-5b-and-the-tool-we-used-to-do-it
This model explores whether full attention can be completely replaced with linear attention mechanisms. Using DistillKit, we distilled the original AFM-4.5B-Base (teacher) into a pure-KDA architecture (student).
Key characteristics:
| Component | Details |
|---|---|
| Parameters | 4.5B |
| Attention Type | Kimi Delta Attention (All layers) |
| Positional Encoding | None (inherent to KDA) |
| Max Training Length | 32k tokens |
| Base Model | AFM-4.5B-Base |
Performance compared to the teacher model and hybrid configurations:
| Benchmark | Teacher (Full Attn) | KDA-Only |
|---|---|---|
| MMLU (Avg) | 63.1% | 55.8% |
| ARC-Challenge | 55.6% | 49.9% |
| HellaSwag (Norm) | 78.0% | 74.3% |
| GSM8K (Math) | 52.1% | 26.8% |
The pure-KDA model shows interesting long-context characteristics:
This behavior aligns with expectations for state-space-like architectures: fixed hidden state size creates inherent tension with growing context, but degradation is graceful.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "arcee-ai/AFM-4.5B-Base-KDA-Only"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
prompt = "The theory of relativity states that"
input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(model.device)
outputs = model.generate(
input_ids,
max_new_tokens=100,
do_sample=True,
temperature=0.7,
top_p=0.95
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model is intended for:
AFM-4.5B is released under the Apache-2.0 license.