Instructions to use StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304
- SGLang
How to use StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304 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 "StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304" \ --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": "StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304", "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 "StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304" \ --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": "StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304 with Docker Model Runner:
docker model run hf.co/StepLaw/StepLaw-N_268M-D_4.0B-LR7.812e-03-BS4194304
Upload config.json with huggingface_hub
Browse files- config.json +21 -0
config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Step1MoEForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"model_type": "step1",
|
| 6 |
+
"hidden_size": 1024,
|
| 7 |
+
"intermediate_size": 9552,
|
| 8 |
+
"num_attention_heads": 16,
|
| 9 |
+
"num_attention_groups": 16,
|
| 10 |
+
"num_hidden_layers": 8,
|
| 11 |
+
"max_seq_len": 65536,
|
| 12 |
+
"vocab_size": 65536,
|
| 13 |
+
"rms_norm_eps": 1e-05,
|
| 14 |
+
"torch_dtype": "bfloat16",
|
| 15 |
+
"moe_every_n_layer": 64,
|
| 16 |
+
"moe_intermediate_size": 4096,
|
| 17 |
+
"moe_num_experts": 8,
|
| 18 |
+
"moe_top_k": 2,
|
| 19 |
+
"use_moe": true,
|
| 20 |
+
"moe_layer_offset": 1
|
| 21 |
+
}
|