Instructions to use reaperdoesntknow/MoA-400M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use reaperdoesntknow/MoA-400M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="reaperdoesntknow/MoA-400M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import MoAMetricLM model = MoAMetricLM.from_pretrained("reaperdoesntknow/MoA-400M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use reaperdoesntknow/MoA-400M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "reaperdoesntknow/MoA-400M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "reaperdoesntknow/MoA-400M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/reaperdoesntknow/MoA-400M
- SGLang
How to use reaperdoesntknow/MoA-400M 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 "reaperdoesntknow/MoA-400M" \ --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": "reaperdoesntknow/MoA-400M", "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 "reaperdoesntknow/MoA-400M" \ --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": "reaperdoesntknow/MoA-400M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use reaperdoesntknow/MoA-400M with Docker Model Runner:
docker model run hf.co/reaperdoesntknow/MoA-400M
Upload MoAMetricLM
Browse files- config.json +4 -4
- pytorch_model.bin +2 -2
config.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
| 18 |
"eos_token_id": 151643,
|
| 19 |
"ff_mult": 4,
|
| 20 |
"ffn_hidden": 2048,
|
| 21 |
-
"head_feature_heads":
|
| 22 |
"layer_scale_init_value": 0.0001,
|
| 23 |
"learn_alpha": true,
|
| 24 |
"learn_radius": true,
|
|
@@ -37,16 +37,16 @@
|
|
| 37 |
"origin_init_scale": 0.0,
|
| 38 |
"pad_token_id": 151643,
|
| 39 |
"proj_drop": 0.1,
|
| 40 |
-
"r_basis":
|
| 41 |
"radius_init": 3.0,
|
| 42 |
"router_bias_heads": 4,
|
| 43 |
"router_dropout": 0.1,
|
| 44 |
"router_hidden": 2048,
|
| 45 |
"router_init_temperature": 2.0,
|
| 46 |
-
"router_temperature":
|
| 47 |
"router_topk": 3,
|
| 48 |
"shared_kv_ratio": 0.55,
|
| 49 |
-
"theta_base":
|
| 50 |
"ti_reg_samples": 0,
|
| 51 |
"ti_reg_weight": 0.0,
|
| 52 |
"transformers_version": "4.56.1",
|
|
|
|
| 18 |
"eos_token_id": 151643,
|
| 19 |
"ff_mult": 4,
|
| 20 |
"ffn_hidden": 2048,
|
| 21 |
+
"head_feature_heads": 32,
|
| 22 |
"layer_scale_init_value": 0.0001,
|
| 23 |
"learn_alpha": true,
|
| 24 |
"learn_radius": true,
|
|
|
|
| 37 |
"origin_init_scale": 0.0,
|
| 38 |
"pad_token_id": 151643,
|
| 39 |
"proj_drop": 0.1,
|
| 40 |
+
"r_basis": 4,
|
| 41 |
"radius_init": 3.0,
|
| 42 |
"router_bias_heads": 4,
|
| 43 |
"router_dropout": 0.1,
|
| 44 |
"router_hidden": 2048,
|
| 45 |
"router_init_temperature": 2.0,
|
| 46 |
+
"router_temperature": 2.0,
|
| 47 |
"router_topk": 3,
|
| 48 |
"shared_kv_ratio": 0.55,
|
| 49 |
+
"theta_base": 100000.0,
|
| 50 |
"ti_reg_samples": 0,
|
| 51 |
"ti_reg_weight": 0.0,
|
| 52 |
"transformers_version": "4.56.1",
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4eab1a92049e5fe16817ed4c13ff98ec452f76e5fbc5af6be3df94f9a812184
|
| 3 |
+
size 1712299451
|