Text Generation
Transformers
Safetensors
English
Korean
Motif
feature-extraction
motif
motif-3
mixture-of-experts
Mixture of Experts
multilingual
pretrained
base-model
custom_code
Instructions to use Motif-Technologies/Motif-3-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Motif-Technologies/Motif-3-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Motif-Technologies/Motif-3-Base", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Motif-Technologies/Motif-3-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Motif-Technologies/Motif-3-Base 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-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Motif-Technologies/Motif-3-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Motif-Technologies/Motif-3-Base
- SGLang
How to use Motif-Technologies/Motif-3-Base 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-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Motif-Technologies/Motif-3-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Motif-Technologies/Motif-3-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Motif-Technologies/Motif-3-Base with Docker Model Runner:
docker model run hf.co/Motif-Technologies/Motif-3-Base
File size: 2,143 Bytes
028c31e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | {
"_debug_force_load_balance": false,
"architectures": [
"MotifForCausalLM"
],
"attention_cls": "gdla",
"attention_dropout": 0.0,
"auto_map": {
"AutoConfig": "configuration_motif.MotifConfig",
"AutoModel": "modeling_motif.MotifForCausalLM",
"AutoModelForCausalLM": "modeling_motif.MotifForCausalLM"
},
"diff_v2": true,
"dtype": "bfloat16",
"elementwise_attn_output_gate": true,
"eos_token_id": 0,
"experts_top_k": 8,
"head_dim": 192,
"headwise_attn_output_gate": false,
"hidden_act": "poly_norm",
"hidden_size": 4096,
"initializer_range": 0.02,
"interleave_moe_layer_step": 1,
"intermediate_size": 12288,
"k_ratio": 1,
"kv_lora_rank": 512,
"load_balance_coeff": 0.0001,
"max_position_embeddings": 262144,
"max_window_layers": 9,
"mhc_enabled": true,
"mhc_expansion_rate": 4,
"mhc_identity_init": false,
"mhc_sinkhorn_iters": 20,
"model_type": "Motif",
"moe_intermediate_size": 1280,
"mscale": 1.0,
"n_dense_first_layers": 2,
"num_attention_heads": 80,
"num_experts": 384,
"num_hidden_layers": 53,
"num_key_value_heads": 16,
"num_noise_heads": 16,
"num_shared_experts": 1,
"output_router_logits": false,
"q_lora_rank": 1024,
"qk_rope_head_dim": 64,
"rms_norm_eps": 1e-05,
"rope_theta": 10000.0,
"route_norm": true,
"route_scale": 2.0,
"router_aux_loss_coef": 0.0,
"score_before_experts": false,
"score_func": "sigmoid",
"sliding_window": 128,
"sliding_window_pattern": "interleave",
"sliding_window_period": 4,
"swa_rope_theta": 10000.0,
"tie_word_embeddings": false,
"transformers_version": "5.7.0",
"use_cache": true,
"use_sliding_window": true,
"v_head_dim": 128,
"vocab_size": 220160,
"rope_factor": 64.0,
"original_seq_len": 4096,
"rope_scaling": {
"original_max_position_embeddings": 4096,
"factor": 64.0,
"mscale": 1.0,
"rope_type": "yarn",
"rope_theta": 10000.0,
"beta_fast": 32.0,
"beta_slow": 1.0,
"apply_yarn_scaling": false
},
"polynorm_output_scale": 0.5,
"polynorm_output_scale_per_layer": {},
"polynorm_bias_clamp": 0.5,
"hidden_clamp": 1000000.0
}
|