Instructions to use stepfun-ai/Step-3.5-Flash-Base-Midtrain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stepfun-ai/Step-3.5-Flash-Base-Midtrain with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="stepfun-ai/Step-3.5-Flash-Base-Midtrain", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("stepfun-ai/Step-3.5-Flash-Base-Midtrain", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use stepfun-ai/Step-3.5-Flash-Base-Midtrain with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "stepfun-ai/Step-3.5-Flash-Base-Midtrain" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stepfun-ai/Step-3.5-Flash-Base-Midtrain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/stepfun-ai/Step-3.5-Flash-Base-Midtrain
- SGLang
How to use stepfun-ai/Step-3.5-Flash-Base-Midtrain 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 "stepfun-ai/Step-3.5-Flash-Base-Midtrain" \ --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": "stepfun-ai/Step-3.5-Flash-Base-Midtrain", "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 "stepfun-ai/Step-3.5-Flash-Base-Midtrain" \ --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": "stepfun-ai/Step-3.5-Flash-Base-Midtrain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use stepfun-ai/Step-3.5-Flash-Base-Midtrain with Docker Model Runner:
docker model run hf.co/stepfun-ai/Step-3.5-Flash-Base-Midtrain
Update config.json
Browse files- config.json +10 -6
config.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
-
"
|
| 4 |
],
|
| 5 |
-
"model_type": "
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
"hidden_size": 4096,
|
| 7 |
"intermediate_size": 11264,
|
| 8 |
"num_hidden_layers": 45,
|
|
@@ -10,9 +14,8 @@
|
|
| 10 |
"max_position_embedding": 131072,
|
| 11 |
"vocab_size": 128896,
|
| 12 |
"torch_dtype": "bfloat16",
|
| 13 |
-
"use_qk_norm":
|
| 14 |
"moe_layers_enum": "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",
|
| 15 |
-
"use_mfa": false,
|
| 16 |
"num_attention_heads": 64,
|
| 17 |
"num_attention_groups": 8,
|
| 18 |
"num_nextn_predict_layers": 1,
|
|
@@ -285,5 +288,6 @@
|
|
| 285 |
0.0,
|
| 286 |
16,
|
| 287 |
0.0
|
| 288 |
-
]
|
| 289 |
-
|
|
|
|
|
|
| 1 |
{
|
| 2 |
"architectures": [
|
| 3 |
+
"Step3p5ForCausalLM"
|
| 4 |
],
|
| 5 |
+
"model_type": "step3p5",
|
| 6 |
+
"auto_map": {
|
| 7 |
+
"AutoConfig": "configuration_step3p5.Step3p5Config",
|
| 8 |
+
"AutoModelForCausalLM": "modeling_step3p5.Step3p5ForCausalLM"
|
| 9 |
+
},
|
| 10 |
"hidden_size": 4096,
|
| 11 |
"intermediate_size": 11264,
|
| 12 |
"num_hidden_layers": 45,
|
|
|
|
| 14 |
"max_position_embedding": 131072,
|
| 15 |
"vocab_size": 128896,
|
| 16 |
"torch_dtype": "bfloat16",
|
| 17 |
+
"use_qk_norm": true,
|
| 18 |
"moe_layers_enum": "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",
|
|
|
|
| 19 |
"num_attention_heads": 64,
|
| 20 |
"num_attention_groups": 8,
|
| 21 |
"num_nextn_predict_layers": 1,
|
|
|
|
| 288 |
0.0,
|
| 289 |
16,
|
| 290 |
0.0
|
| 291 |
+
],
|
| 292 |
+
"zero_centered": true
|
| 293 |
+
}
|