Text Generation
Transformers
Safetensors
English
Korean
Motif
feature-extraction
motif
motif-3
mixture-of-experts
Mixture of Experts
long-context
multilingual
preview
conversational
custom_code
Instructions to use Motif-Technologies/Motif-3-Beta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Motif-Technologies/Motif-3-Beta with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Motif-Technologies/Motif-3-Beta", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Motif-Technologies/Motif-3-Beta", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Motif-Technologies/Motif-3-Beta with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Motif-Technologies/Motif-3-Beta" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Motif-Technologies/Motif-3-Beta", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Motif-Technologies/Motif-3-Beta
- SGLang
How to use Motif-Technologies/Motif-3-Beta 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 "Motif-Technologies/Motif-3-Beta" \ --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": "Motif-Technologies/Motif-3-Beta", "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 "Motif-Technologies/Motif-3-Beta" \ --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": "Motif-Technologies/Motif-3-Beta", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Motif-Technologies/Motif-3-Beta with Docker Model Runner:
docker model run hf.co/Motif-Technologies/Motif-3-Beta
Commit History
-
docs: update vLLM image to v0.26.0-motif3 (#11)
- docs: update vLLM image to v0.26.0-motif3 (7d3332db70f2d3b36dbf5a25cb498b9cc942e44d)ad36cea
-
tokenizer: also rename ids 55-84 in model.vocab (not just added_tokens)
Verified signatureFollow-up to e9b3a7b: the company/author name strings were still present as keys in model.vocab. Renamed those to <|reserved_55|>..<|reserved_84|> as well, so the names are fully removed from the tokenizer (added_tokens + vocab; not in merges). Behavior unchanged (the strings already tokenized as subwords after the added_tokens fix).b286b52 -
tokenizer: replace company/author name tokens (ids 55-84) with reserved placeholders
Verified signatureThese 30 added tokens (MOTIF Technologies / 모티프 테크놀로지스 + 28 author names) were non-special, undertrained single tokens. When those exact strings appeared in the input they collapsed to one glitch token and produced incoherent output. Renamed to <|reserved_55|>..<|reserved_84|> (special) so the names now tokenize as normal subwords. Ids/embedding rows are preserved; verified on a checkpoint (30 tokens x 3 runs, coherent).e9b3a7b
-
docs: add MTP (Multi-Token Prediction) to the Architecture section
Verified signatureeee2817 -
docs: document built-in MTP head / self-speculative decoding (vLLM --speculative-config, num_speculative_tokens=1)
Verified signature672a4d4
-
Update README.md
Verified signaturef134005 -
Update README.md
Verified signaturedf4e953 -
modeling: require attn_implementation=flash_attention_2 (eager/sdpa mishandle GDLA GQA + per-layer sliding window); fail fast with a clear message
Verified signature0fe349f -
docs: drop WIP from HF.generate section (modeling code fixed and working)
Verified signatured2c9ac6 -
docs: update HF.generate note — modeling code fixed, now runs; vLLM recommended pending full parity
Verified signatured843b3d -
docs: make HF.generate example runnable (return_dict=True, **inputs, slice by input_ids length)
Verified signatureedd84db -
Fix modeling/config: RoPE inv_freq init, per-expert PolyNorm, precision; update HF.generate usage example
Verified signature- modeling_motif.py: recompute inv_freq on the real device (device_map/meta init gave zeros -> identity RoPE -> collapse); fp32 Q projection; mHC/MoE fp32 accumulation; self.h_post_coeff fix; remove dead basic-attn/debug code. - configuration_motif.py: force eager per-expert dispatch for MoE Motif models (grouped_mm applied expert 0's PolyNorm coeffs to all experts); set yarn attention_factor=1.0 / apply_yarn_scaling=False to avoid double mscale. - README: HF.generate example uses dtype= and attn_implementation=flash_attention_2.b446ac1 -
Update README.md
Verified signature8a76d55
-
Restore license (from @iamwyldecat ) + keep GDLA expansion
Verified signature32b0305 -
Expand GDLA -> Grouped Differential Latent Attention
Verified signaturec3b189e
-
Update license
Verified signature2520876 -
Set license to Apache-2.0
Verified signature94cd932 -
Finalize public model card (multilingual, architecture, no gating)
Verified signatured03e855 -
Add files using upload-large-folder tool
Verified signaturea13b5c1 -
Add files using upload-large-folder tool
Verified signaturedd24bba -
Add files using upload-large-folder tool
Verified signatured77de33 -
Add files using upload-large-folder tool
Verified signature95db90e -
Add files using upload-large-folder tool
Verified signatureb5af44a -
Add model card (test commit)
Verified signature4f6413a -
initial commit
Verified signature3e72297