Instructions to use stepfun-ai/Step-3.5-Flash-Base 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 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", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("stepfun-ai/Step-3.5-Flash-Base", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use stepfun-ai/Step-3.5-Flash-Base 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" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stepfun-ai/Step-3.5-Flash-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/stepfun-ai/Step-3.5-Flash-Base
- SGLang
How to use stepfun-ai/Step-3.5-Flash-Base 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" \ --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": "stepfun-ai/Step-3.5-Flash-Base", "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 "stepfun-ai/Step-3.5-Flash-Base" \ --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": "stepfun-ai/Step-3.5-Flash-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use stepfun-ai/Step-3.5-Flash-Base with Docker Model Runner:
docker model run hf.co/stepfun-ai/Step-3.5-Flash-Base
| { | |
| "architectures": [ | |
| "Step3p5ForCausalLM" | |
| ], | |
| "model_type": "step3p5", | |
| "auto_map": { | |
| "AutoConfig": "configuration_step3p5.Step3p5Config", | |
| "AutoModelForCausalLM": "modeling_step3p5.Step3p5ForCausalLM" | |
| }, | |
| "hidden_size": 4096, | |
| "intermediate_size": 11264, | |
| "num_hidden_layers": 45, | |
| "max_seq_len": 32768, | |
| "max_position_embedding": 32768, | |
| "vocab_size": 128815, | |
| "torch_dtype": "bfloat16", | |
| "use_qk_norm": true, | |
| "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", | |
| "num_attention_heads": 64, | |
| "num_attention_groups": 8, | |
| "num_nextn_predict_layers": 1, | |
| "head_dim": 128, | |
| "use_moe": true, | |
| "moe_num_experts": 288, | |
| "moe_top_k": 8, | |
| "moe_intermediate_size": 1280, | |
| "share_expert_dim": 1280, | |
| "moe_layer_offset": 0, | |
| "moe_every_n_layer": 1, | |
| "norm_expert_weight": true, | |
| "moe_router_activation": "sigmoid", | |
| "moe_router_scaling_factor": 3.0, | |
| "att_impl_type": "GQA", | |
| "tie_word_embeddings": false, | |
| "rope_theta": [ | |
| 1000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 1000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 1000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 1000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 1000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 1000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 1000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 1000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 1000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 1000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 1000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 1000000.0, | |
| 10000.0 | |
| ], | |
| "use_head_wise_attn_gate": true, | |
| "sliding_window": 512, | |
| "use_moe_router_bias": true, | |
| "need_fp32_gate": true, | |
| "sink": false, | |
| "layer_types": [ | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention" | |
| ], | |
| "use_rope_layers": [], | |
| "partial_rotary_factors": [ | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0 | |
| ], | |
| "eos_token_id": [ | |
| 1, | |
| 2 | |
| ], | |
| "bos_token_id": 0, | |
| "attention_other_setting": { | |
| "attention_type": "sliding_attention", | |
| "num_attention_heads": 96, | |
| "num_attention_groups": 8, | |
| "head_dim": 128, | |
| "true_head_dim": 128 | |
| }, | |
| "swiglu_limits": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 7, | |
| 7, | |
| 0.0 | |
| ], | |
| "swiglu_limits_shared": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 16, | |
| 0.0 | |
| ], | |
| "zero_centered": true | |
| } |