Instructions to use fuzhao/openmoe_large_tmp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fuzhao/openmoe_large_tmp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fuzhao/openmoe_large_tmp", device_map="auto")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("fuzhao/openmoe_large_tmp") model = AutoModelForCausalLM.from_pretrained("fuzhao/openmoe_large_tmp", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use fuzhao/openmoe_large_tmp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fuzhao/openmoe_large_tmp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fuzhao/openmoe_large_tmp", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/fuzhao/openmoe_large_tmp
- SGLang
How to use fuzhao/openmoe_large_tmp 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 "fuzhao/openmoe_large_tmp" \ --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": "fuzhao/openmoe_large_tmp", "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 "fuzhao/openmoe_large_tmp" \ --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": "fuzhao/openmoe_large_tmp", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use fuzhao/openmoe_large_tmp with Docker Model Runner:
docker model run hf.co/fuzhao/openmoe_large_tmp
First model version
Browse files- config.json +38 -0
config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"OpenMoeForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 1,
|
| 6 |
+
"capacity_factor_eval": 2.0,
|
| 7 |
+
"capacity_factor_train": 1.25,
|
| 8 |
+
"drop_tks": true,
|
| 9 |
+
"dropout_rate": 0.0,
|
| 10 |
+
"eos_token_id": 2,
|
| 11 |
+
"expert_parallel": null,
|
| 12 |
+
"gated": true,
|
| 13 |
+
"head_dim": 128,
|
| 14 |
+
"hidden_act": "swiglu",
|
| 15 |
+
"hidden_size": 2048,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 8192,
|
| 18 |
+
"layer_norm_epsilon": 1e-06,
|
| 19 |
+
"max_position_embeddings": 2048,
|
| 20 |
+
"min_capacity": 4,
|
| 21 |
+
"model_type": "llama",
|
| 22 |
+
"moe_layer_interval": 6,
|
| 23 |
+
"noisy_policy": null,
|
| 24 |
+
"num_attention_heads": 24,
|
| 25 |
+
"num_experts": 32,
|
| 26 |
+
"num_hidden_layers": 24,
|
| 27 |
+
"num_key_value_heads": 24,
|
| 28 |
+
"pretraining_tp": 1,
|
| 29 |
+
"rms_norm_eps": 1e-06,
|
| 30 |
+
"rope_scaling": null,
|
| 31 |
+
"rope_theta": 10000.0,
|
| 32 |
+
"tie_word_embeddings": false,
|
| 33 |
+
"topk": 2,
|
| 34 |
+
"torch_dtype": "float32",
|
| 35 |
+
"transformers_version": "4.33.1",
|
| 36 |
+
"use_cache": true,
|
| 37 |
+
"vocab_size": 256384
|
| 38 |
+
}
|