Text Generation
Transformers
Safetensors
English
Korean
Motif
text-generation-inference
conversational
custom_code
Instructions to use Motif-Technologies/Motif-2-12.7B-Reasoning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Motif-Technologies/Motif-2-12.7B-Reasoning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Motif-Technologies/Motif-2-12.7B-Reasoning", 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("Motif-Technologies/Motif-2-12.7B-Reasoning", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Motif-Technologies/Motif-2-12.7B-Reasoning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Motif-Technologies/Motif-2-12.7B-Reasoning" # 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-2-12.7B-Reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Motif-Technologies/Motif-2-12.7B-Reasoning
- SGLang
How to use Motif-Technologies/Motif-2-12.7B-Reasoning 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-2-12.7B-Reasoning" \ --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-2-12.7B-Reasoning", "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-2-12.7B-Reasoning" \ --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-2-12.7B-Reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Motif-Technologies/Motif-2-12.7B-Reasoning with Docker Model Runner:
docker model run hf.co/Motif-Technologies/Motif-2-12.7B-Reasoning
Commit History
-
hf-version-issue (#6)
- Update modeling_motif.py (14cac4a95c94460b27f532a3309f51faeceb91ee)02d0608
-
add logitprocessor (#5)
Verified signature- add logitprocessor (bc61b509afcba4c8bd3b7e6d63a5536433c1b030) - Update README.md (519788840b2fad3b94ee4d2e6da976777e9673fd) - Update README.md (47d28325cd0a7ff61a30f437ddabca4af5a142ab) - Update README.md (3bcafecb45378ab073e22fdbb84c2afe595917da) - remove unused dependency in logitproc (bd52fd36761b58eb1112dfc9d9214625003c2ee5) - Update README.md (73e65dd8d9a4e2b9c053014ac56d05efe33e8d71) - Update logit_processors/logit_.py (f19aee39ef4030eaa17c46f381b1865c33d9f4a7) - update min value to logit dtype minval (5b8a4315f28d80f7dac9e8a29076a620e4dda7a3) - Update logit_processors/logit_.py (4ea8a0479b708ee22d53ff8e3cd0e20bcb6e1979) - change n-gram and ratio check order (d63f78d6b693b382085be092f911d758d04526be) - Update README.md (c2ca4055343c7cd7e67dbc07a80b59eee08ce90f)fbfb8df
-
Update README.md
Verified signature390323a -
Update README.md
Verified signature24fc7ff
-
Update chat_template.jinja (#3)
Verified signature- Update chat_template.jinja (d80b65ee8a3cee0e394ebcf2d2f98cbdd9e1abb5)fc0b3f2
-
update model weight to single safetensor (#2)
Verified signature- Update: replace sharded safetensor to single safetensor file (b452f0b953f467ccd3013cd6e6ffe8bc4bc76ddd) - Update: add default system prompt (373193f259b58b94069fc8f6091acb2cb4976971) Co-authored-by: dongseokkim <dongseokmotif@users.noreply.huggingface.co>217efdb -
Update README.md
Verified signaturecea42e0
-
Update README.md
Verified signature3765b6f -
add_trained_weights (#1)
Verified signature- Add: add trained weights (3ae4b147e4744f58152d8add2bfc0b7e47b9a1bd) - Update: remove _attn_implementation from config.json (8e6a2dc597e87d2c20645b18562609eb459aec76) - Update: update comment of Grouped Differential Attention (00790c992fbe4ec20a65c5cc4c45d4f88dff5b48) - Update generation_config.json (5b6a02dd8f997723ba27ba5541b2ec879e157d3e) - Update generation_config.json (223d224c1e2ba1fbebf3b57e4bf32b44ecd186c3) - Update generation_config.json (c213563fdd483432218030f47e8aaf849e81348b) Co-authored-by: leejunhyeok <leejunhyeok@users.noreply.huggingface.co> Co-authored-by: dongseokkim <dongseokmotif@users.noreply.huggingface.co> Co-authored-by: Jeongdoolee <jeongdoolee@users.noreply.huggingface.co>a259d49
-
Update README.md
Verified signaturee9f496e
-
initial commit
Verified signatureba46857