Instructions to use axteam/Motif-2.6B-FP8-dynamic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use axteam/Motif-2.6B-FP8-dynamic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="axteam/Motif-2.6B-FP8-dynamic", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("axteam/Motif-2.6B-FP8-dynamic", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use axteam/Motif-2.6B-FP8-dynamic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "axteam/Motif-2.6B-FP8-dynamic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "axteam/Motif-2.6B-FP8-dynamic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/axteam/Motif-2.6B-FP8-dynamic
- SGLang
How to use axteam/Motif-2.6B-FP8-dynamic with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "axteam/Motif-2.6B-FP8-dynamic" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "axteam/Motif-2.6B-FP8-dynamic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "axteam/Motif-2.6B-FP8-dynamic" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "axteam/Motif-2.6B-FP8-dynamic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use axteam/Motif-2.6B-FP8-dynamic with Docker Model Runner:
docker model run hf.co/axteam/Motif-2.6B-FP8-dynamic
Motif-2.6B ยท FP8 (dynamic)
8-bit quantization of Motif-Technologies/Motif-2.6B for ๐ค Transformers (trust_remote_code). Quantized by axteam.
| Base model | Motif-Technologies/Motif-2.6B |
| Method | FP8 (dynamic) |
| Format | compressed-tensors float-quantized (scheme FP8_DYNAMIC) |
| Weights / activations | W8A8 โ FP8 E4M3 weights (per-channel), dynamic per-token FP8 activations |
| Architecture | Dense (Motif arch ยท differential attention) ยท 32 layers ยท text-only |
| Size on disk | ~3.9 GB |
| Calibration | None (data-free) |
| License | apache-2.0 |
Quantization details
- Scheme โ W8A8 โ FP8 E4M3 weights (per-channel), dynamic per-token FP8 activations, stored as compressed-tensors
float-quantized(schemeFP8_DYNAMIC). - Kept in BF16 โ token embeddings, the LM head, and all RMSNorms. Only attention & MLP projections are quantized.
- Post-training quantization (no retraining). Tokenizer /
chat_templateidentical to the original.
Requirements
| Runtime | Transformers only โ vLLM 0.32 does not support the Motif architecture. |
| Transformers | transformers>=4.56,<5 + compressed-tensors>=0.19 + trust_remote_code=True (tested on CPU: 4.57.6 + 0.20.1, 4.56.2 + 0.20.1, 4.57.6 + 0.19.0). Transformers 5.x does not work. |
| Memory | weights 3.9 GB, but Transformers decompresses them to BF16 (~5.2 GB) on the first forward. |
Usage (Transformers)
vLLM does not support the Motif architecture (checked with vLLM 0.32). The bundled modeling_motif.py is the upstream code written for Transformers 4.x โ under Transformers 5.x it fails to load or generates only ! tokens (the BF16 original behaves the same), so pin 4.x:
pip install "transformers>=4.56,<5" "compressed-tensors>=0.19" accelerate torch
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "axteam/Motif-2.6B-FP8-dynamic"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16).eval()
msgs = [{"role": "user", "content": "๋ํ๋ฏผ๊ตญ์ ์๋๋ ์ด๋์ธ๊ฐ์?"}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt")
out = model.generate(ids, attention_mask=torch.ones_like(ids), max_new_tokens=128, do_sample=False,
pad_token_id=tok.pad_token_id)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
Tested on CPU, 2026-11-01: transformers 4.57.6 + compressed-tensors 0.20.1 (full prompt set), 4.56.2 + 0.20.1 and 4.57.6 + 0.19.0 (quick check); torch 2.15, Python 3.12. With the chat prompt above it answers
๋ํ๋ฏผ๊ตญ์ ์๋๋ ์์ธ์ ๋๋ค. โฆ, token-for-token the same as the BF16 original; the first next-token probabilities after "The capital of France is" are Paris 0.59 (FP8) vs 0.62 (BF16). Transformers 4.51.3 + compressed-tensors 0.10.2 also works but is very slow (it re-applies the FP8 quantization on every forward). 4.53.3 loads but crashes on the first forward (the FP8 weights are never decompressed โ Transformers' compressed-tensors loader decompresses them only from 4.56); 4.51.3 with compressed-tensors โฅ0.11 does not load. Memory/speed: Transformers decompresses the FP8 weights to BF16 on the first forward, so runtime memory and speed are the same as the BF16 model; this build mainly reduces download and storage size.
License
Quantized derivative of Motif-Technologies/Motif-2.6B (apache-2.0).
ํ๊ตญ์ด ์์ฝ
Motif-Technologies/Motif-2.6B์ FP8 (W8A8) ์์ํ ๋น๋ ยท ์ ์ axteam
๊ฐ์
| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| ์๋ณธ ๋ชจ๋ธ | Motif-Technologies/Motif-2.6B |
| ์์ํ ๋ฐฉ์ | FP8 ๋์ ์์ํ (W8A8) |
| ์ ์ฅ ํ์ | compressed-tensors float-quantized (scheme FP8_DYNAMIC) |
| ๋ชจ๋ธ ๊ตฌ์กฐ | Dense (Motif ๊ตฌ์กฐ, differential attention) ยท 32์ธต ยท ํ ์คํธ ์ ์ฉ |
| ์ฉ๋ | ์ฝ 3.9 GB |
| ๋ณด์ ๋ฐ์ดํฐ | ์์ (๊ฐ์ค์น ์ค์ผ์ผ์ ๊ฐ์ค์น๋ง์ผ๋ก ๊ณ์ฐ, ํ์ฑํ ์ค์ผ์ผ์ ์คํ ์ ๊ณ์ฐ) |
์์ํ ์์ธ
- ๊ฐ์ค์น: FP8(E4M3), ์ถ๋ ฅ ์ฑ๋๋ณ ์ค์ผ์ผ
- ํ์ฑํ: ์คํ ์ ํ ํฐ๋ณ ๋์ FP8
- ์์ํ ์ ์ฐจ: PTQ(ํ์ต ํ ์์ํ, ์ฌํ์ต ์์), ๊ฐ์ค์น ์ค์ผ์ผ์ ๋ฏธ๋ฆฌ ๊ณ์ฐํ๊ณ ํ์ฑํ ์ค์ผ์ผ์ ์คํ ์ ํ ํฐ๋ง๋ค ๊ณ์ฐ
- BF16 ์ ์ง: ํ ํฐ ์๋ฒ ๋ฉ, LM ํค๋, ๋ชจ๋ RMSNorm
- ์์ํ ๋์: ์ดํ ์ ยทMLP ์ ํ์ธต(projection)
- ์๋ณธ ํ์ผ: ํ ํฌ๋์ด์ ยทchat template์ ์๋ณธ๊ณผ ๋์ผ
ํ์ง (์ค์ธก)
- ์๋ณธ๊ณผ ๋น๊ต (CPU, 2026-11-01): ์ฑํ
ํ๋กฌํํธ ๋ต์ด BF16 ์๋ณธ๊ณผ ํ ํฐ ๋จ์๋ก ๋์ผ (
๋ํ๋ฏผ๊ตญ์ ์๋๋ ์์ธ์ ๋๋ค. โฆ), "The capital of France is" ๋ค์ ํ ํฐ Paris ํ๋ฅ 0.59 (์๋ณธ 0.62) โ transformers 4.57.6 + compressed-tensors 0.20.1
์๊ตฌ์ฌํญ
- ์คํ ํ๊ฒฝ: Transformers ์ ์ฉ โ ๊ณต์ vLLM 0.32๋ Motif ๊ตฌ์กฐ ๋ฏธ์ง์
- Transformers: transformers 4.56 ์ด์ 5 ๋ฏธ๋ง + compressed-tensors 0.19 ์ด์ +
trust_remote_code=True(CPU์์ ํ์ธ: 4.57.6 + 0.20.1, 4.56.2 + 0.20.1, 4.57.6 + 0.19.0), transformers 5.x๋ ๋์ํ์ง ์์ - ๋ฉ๋ชจ๋ฆฌ: ๊ฐ์ค์น 3.9 GB โ ์ฒซ ์คํ ๋ BF16(์ฝ 5.2 GB)์ผ๋ก ํ๋ ค ๋ฉ๋ชจ๋ฆฌยท์๋๋ ์๋ณธ๊ณผ ๊ฐ์ผ๋ฏ๋ก ์ฃผ๋ ํจ๊ณผ๋ ๋ค์ด๋ก๋ยท์ ์ฅ ์ฉ๋ ์ ๊ฐ
์ฌ์ฉ๋ฒ
- ์ค์น:
pip install "transformers>=4.56,<5" "compressed-tensors>=0.19" accelerate torch - ๋ก๋:
AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, dtype=torch.bfloat16)โ chat template ์ ์ฉ ํgenerate(์ ์ฒด ์์๋ ์ ์์ด ๋ณธ๋ฌธ 'Usage' ์ ์ฐธ๊ณ )
๋ผ์ด์ ์ค
- ๋ผ์ด์ ์ค: Apache-2.0 โ ์๋ณธ ๋ชจ๋ธ์ ๋ผ์ด์ ์ค๋ฅผ ๊ทธ๋๋ก ๋ฐ๋ฆ
- ๊ถ๋ฆฌ: ์๋ณธ ๋ชจ๋ธ์ ๊ถ๋ฆฌ๋ Motif Technologies์๊ฒ ์์, ์ด ๋ฆฌํฌ๋ ์์ํ ํ์๋ฌผ
- Downloads last month
- 151
Model tree for axteam/Motif-2.6B-FP8-dynamic
Base model
Motif-Technologies/Motif-2.6B