WinstonDeng commited on
Commit
d14f10b
·
verified ·
1 Parent(s): 456ec15

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +403 -0
README.md CHANGED
@@ -1,3 +1,406 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ library_name: transformers
4
+ pipeline_tag: image-text-to-text
5
+ language:
6
+ - en
7
+ tags:
8
+ - vision-language
9
+ - multimodal
10
+ - moe
11
  ---
12
+
13
+ - **[ModelPage]**: https://static.stepfun.com/blog/step-3.7-flash/
14
+ - **[Github]**: https://github.com/stepfun-ai/Step-3.7-Flash
15
+ - **[HuggingFace]**:
16
+ - BF16: https://huggingface.co/stepfun-ai/Step-3.7-Flash/
17
+ - FP8: https://huggingface.co/stepfun-ai/Step-3.7-Flash-FP8
18
+ - NVFP4: https://huggingface.co/stepfun-ai/Step-3.7-Flash-NVFP4
19
+ - GGUF: https://huggingface.co/stepfun-ai/Step-3.7-Flash-GGUF
20
+
21
+ ## 1. Introduction
22
+
23
+ Step 3.7 Flash is a 198B-parameter sparse Mixture-of-Experts (MoE) vision-language model that combines a 196B-parameter language backbone with a 1.8B-parameter vision encoder for native image understanding. Engineered for high-frequency production workloads, it activates approximately 11B parameters per token and delivers a throughput of up to 400 tokens per second. Step 3.7 Flash supports a 256k context window and offers three selectable reasoning levels (low, medium, and high) so developers can easily balance speed, cost, and cognitive depth.
24
+
25
+ We built Step 3.7 Flash for developers who need to scale agentic workflows that combine perception, search, and reasoning. It is designed to handle intensive tasks such as parsing massive financial reports in one pass, running multi-step search loops with cross-source verification, or operating concurrent coding agents in high-throughput pipelines.
26
+
27
+ ## 2. Capabilities & Performance
28
+
29
+ ### Multimodal Perception and Verification
30
+
31
+ The model delivers top-tier visual intelligence, securing first place on SimpleVQA (Search) with a 79.2 and achieving frontier parity on V* (Python) at 95.3. These metrics reflect strong visual grounding and retrieval-augmented reasoning beyond basic image description. The model accurately processes dense visual interfaces, such as UI wireframes, application GUIs, and data charts, to map them into structured code. When it encounters an incomplete visual asset, it can independently identify missing data and execute lookups to verify context before returning a factually verified conclusion.
32
+
33
+ ### Workflow Integrity and Tool Orchestration
34
+
35
+ Execution reliability is critical for autonomous agents. Step 3.7 Flash leads the ClawEval-1.1 benchmark with a score of 67.1, which significantly outperforms the next closest competitor at 59.8. This performance demonstrates high resistance to adversarial traps and strict adherence to system policies during multi-turn orchestration. Backed by scores of 49.5 on Toolathlon and 48.1 on HLE w. Tool, this profile ensures high trajectory integrity. Step 3.7 Flash reliably interacts with external APIs and executes long-horizon workflows without drifting from instructions or violating system constraints.
36
+
37
+ ### Code Engineering and Professional Baselines
38
+
39
+ Step 3.7 Flash is built for live engineering tasks and secured a definitive second-place finish on SWE-Bench PRO with a score of 56.3. It can independently trace multi-file repositories, isolate bugs from raw issue reports, and generate functional patches that pass automated unit tests. While evaluations like Terminal-Bench 2.1 (59.5) and GPDVal-AA (45.8) show clear areas for future optimization compared to the absolute peak of the cohort, they establish a dependable baseline for system interactions and structured professional deliverables.
40
+
41
+ ![Step 3.7 Flash benchmark results across General Agent, Agentic Coding, and Multimodal evaluations](assets/benchmarks.png)
42
+
43
+ ## 3. Pricing
44
+
45
+ | Token Type | Price |
46
+ |---|---|
47
+ | Input (cache miss) | $0.20 / M tokens |
48
+ | Input (cache hit) | $0.04 / M tokens |
49
+ | Output | $1.15 / M tokens |
50
+
51
+ ## 4. Availability, Deployment, and Ecosystem
52
+ - Availability: Step 3.7 Flash is available on the StepFun Open Platform — [platform.stepfun.ai](https://platform.stepfun.ai) (Global) and [platform.stepfun.com](https://platform.stepfun.com) (China), OpenRouter, and NVIDIA NIM. StepFun is also partnering with DeepInfra, Fireworks AI, and Modal to expand availability soon.
53
+ - Deployment: Step 3.7 Flash supports flexible deployment across cloud, data center, and local environments. For large-scale production and enterprise use cases, Step 3.7 Flash can be deployed on modern data center infrastructure. For local and workstation scenarios, it can also run on high-memory devices such as NVIDIA DGX Station, AMD Ryzen AI Max+ 395-based systems, and Mac Studio / Macbook Pro devices with at least 128GB unified memory.
54
+ - Ecosystem: Step 3.7 Flash is supported across popular open-source infrastructure for both inference and model development. For inference and serving, developers can use vLLM, SGLang, Hugging Face Transformers, and llama.cpp. For model development workflows, StepFun model support has landed in the NVIDIA Megatron ecosystem, including Megatron Core and Megatron Bridge.
55
+
56
+ ## 5. Examples
57
+
58
+ You can get started with Step 3.7 Flash in minutes using StepFun's API or via other inference providers.
59
+
60
+ > Pick the right `base_url` for your region. StepFun operates two regional platforms with separate API hosts. The `base_url` you pass to the OpenAI client must match the platform where your API key was issued, otherwise requests will be rejected as unauthorized.
61
+ >
62
+ > - **Global**: [platform.stepfun.ai](https://platform.stepfun.ai) — `base_url=https://api.stepfun.ai/v1`
63
+ > - **China**: [platform.stepfun.com](https://platform.stepfun.com) — `base_url=https://api.stepfun.com/v1`
64
+ >
65
+ > To avoid hard-coding the wrong region, the examples below read both the API key and base URL from environment variables. Export them once before running:
66
+ >
67
+ > ```bash
68
+ > export STEP_API_KEY="sk-..."
69
+ > export STEP_BASE_URL="https://api.stepfun.ai/v1" # use https://api.stepfun.com/v1 for the China platform
70
+ > ```
71
+
72
+ ### 5.1 Chat Example
73
+
74
+ ```python
75
+ import os
76
+ from openai import OpenAI
77
+
78
+ client = OpenAI(
79
+ api_key=os.environ["STEP_API_KEY"],
80
+ base_url=os.environ["STEP_BASE_URL"],
81
+ )
82
+
83
+ completion = client.chat.completions.create(
84
+ model="step-3.7-flash",
85
+ messages=[
86
+ {
87
+ "role": "system",
88
+ "content": "You are an AI assistant provided by StepFun. You are good at Chinese, English, and many other languages, and you can see, think, and act to help users get things done.",
89
+ },
90
+ {
91
+ "role": "user",
92
+ "content": "Introduce StepFun's artificial intelligence capabilities."
93
+ },
94
+ ],
95
+ )
96
+
97
+ print(completion)
98
+ ```
99
+
100
+ ### 5.2 Text and Image Input Example
101
+
102
+ ```python
103
+ import os
104
+ from openai import OpenAI
105
+
106
+ client = OpenAI(
107
+ api_key=os.environ["STEP_API_KEY"],
108
+ base_url=os.environ["STEP_BASE_URL"],
109
+ )
110
+
111
+ completion = client.chat.completions.create(
112
+ model="step-3.7-flash",
113
+ messages=[
114
+ {
115
+ "role": "user",
116
+ "content": [
117
+ {"type": "text", "text": "What is in this picture?"},
118
+ {
119
+ "type": "image_url",
120
+ "image_url": {"url": "https://example.com/photo.jpg"},
121
+ },
122
+ ],
123
+ },
124
+ ],
125
+ )
126
+
127
+ print(completion)
128
+ ```
129
+
130
+ ## 6. Local Deployment
131
+
132
+ Step 3.7 Flash is optimized for local inference and supports industry-standard backends including vLLM, SGLang, Hugging Face Transformers and llama.cpp.
133
+
134
+ ### 6.1 vLLM
135
+
136
+ We recommend using StepFun's prebuilt vLLM Docker image with Step 3.7 support.
137
+
138
+ 1. Install vLLM.
139
+
140
+ ```bash
141
+ # via Docker
142
+ docker pull vllm/vllm-openai:stepfun37
143
+ ```
144
+
145
+ 2. Launch the server.
146
+
147
+ - For FP8 model
148
+ ```bash
149
+ vllm serve <MODEL_PATH_OR_HF_ID> \
150
+ --served-model-name step3p7-flash \
151
+ --tensor-parallel-size 8 \
152
+ --enable-expert-parallel \
153
+ --disable-cascade-attn \
154
+ --reasoning-parser step3p5 \
155
+ --enable-auto-tool-choice \
156
+ --tool-call-parser step3p5 \
157
+ --speculative_config '{"method": "mtp", "num_speculative_tokens": 3}' \
158
+ --trust-remote-code
159
+ ```
160
+ - For BF16 model
161
+ ```bash
162
+ vllm serve <MODEL_PATH_OR_HF_ID> \
163
+ --served-model-name step3p7-flash-bf16 \
164
+ --tensor-parallel-size 8 \
165
+ --enable-expert-parallel \
166
+ --disable-cascade-attn \
167
+ --reasoning-parser step3p5 \
168
+ --enable-auto-tool-choice \
169
+ --tool-call-parser step3p5 \
170
+ --speculative_config '{"method": "mtp", "num_speculative_tokens": 3}' \
171
+ --trust-remote-code
172
+ ```
173
+
174
+ - For NVFP4 model
175
+ Compared to standard precisions, running the FP4 quantized version requires modelopt activation and FP8 KV Cache alignment.
176
+ ```bash
177
+ python3 -m vllm.entrypoints.openai.api_server \
178
+ --host 0.0.0.0 \
179
+ --port ${PORT} \
180
+ --model stepfun-ai/Step-3.7-Flash-NVFP4 \
181
+ --served-model-name step3p7 \
182
+ --tensor-parallel-size 4 \
183
+ --gpu-memory-utilization 0.9 \
184
+ --enable-expert-parallel \
185
+ --trust-remote-code \
186
+ --quantization modelopt \
187
+ --kv-cache-dtype fp8 \
188
+ --max-model-len 8192 \
189
+ --reasoning-parser step3p5 \
190
+ --enable-auto-tool-choice \
191
+ --tool-call-parser step3p5 \
192
+ --async-scheduling
193
+ ```
194
+
195
+ ### 6.2 SGLang
196
+
197
+ 1. Install SGLang.
198
+
199
+ ```bash
200
+ # via Docker
201
+ docker pull lmsysorg/sglang:dev-step-3.7-flash
202
+
203
+ # or from source (pip)
204
+ pip install "sglang[all] @ git+https://github.com/sgl-project/sglang.git"
205
+ ```
206
+
207
+ 2. Launch the server.
208
+
209
+ > **Note:** For Blackwell GPUs, `--mm-attention-backend fa4` may be used.
210
+
211
+ - For BF16 model
212
+
213
+ ```bash
214
+ sglang serve --model-path stepfun-ai/Step-3.7-Flash \
215
+ --tp 8 \
216
+ --reasoning-parser step3p5 \
217
+ --tool-call-parser step3p5 \
218
+ --enable-multimodal \
219
+ --speculative-algorithm EAGLE \
220
+ --speculative-num-steps 3 \
221
+ --speculative-eagle-topk 1 \
222
+ --speculative-num-draft-tokens 4 \
223
+ --enable-multi-layer-eagle \
224
+ --trust-remote-code \
225
+ --host 0.0.0.0 \
226
+ --port 8000
227
+ ```
228
+
229
+ - For FP8 model
230
+
231
+ ```bash
232
+ sglang serve --model-path stepfun-ai/Step-3.7-Flash-fp8 \
233
+ --tp 8 \
234
+ --ep 4 \
235
+ --reasoning-parser step3p5 \
236
+ --tool-call-parser step3p5 \
237
+ --enable-multimodal \
238
+ --speculative-algorithm EAGLE \
239
+ --speculative-num-steps 3 \
240
+ --speculative-eagle-topk 1 \
241
+ --speculative-num-draft-tokens 4 \
242
+ --enable-multi-layer-eagle \
243
+ --trust-remote-code \
244
+ --host 0.0.0.0 \
245
+ --port 8000
246
+ ```
247
+
248
+ - For NVFP4 model
249
+
250
+ ```bash
251
+ sglang serve --model-path stepfun-ai/Step-3.7-Flash-NVFP4 \
252
+ --tp 4 --ep 4 \
253
+ --moe-runner-backend flashinfer_trtllm \
254
+ --kv-cache-dtype fp8_e4m3 \
255
+ --quantization modelopt_fp4 \
256
+ --trust-remote-code \
257
+ --reasoning-parser step3p5 \
258
+ --tool-call-parser step3p5 \
259
+ --attention-backend trtllm_mha
260
+ ```
261
+
262
+ ### 6.3 Transformers (Debug / Verification)
263
+
264
+ Use this snippet for quick functional verification. For high-throughput serving, use vLLM or SGLang.
265
+
266
+ > **Note:** Deployment of this model requires `transformers` 5.0 or later.
267
+
268
+ ```python
269
+ from transformers import AutoProcessor, AutoModelForCausalLM
270
+
271
+ MODEL_PATH = "<MODEL_PATH_OR_HF_ID>"
272
+
273
+ # 1. Setup
274
+ processor = AutoProcessor.from_pretrained(MODEL_PATH, trust_remote_code=True)
275
+ model = AutoModelForCausalLM.from_pretrained(
276
+ MODEL_PATH,
277
+ device_map="auto",
278
+ dtype="auto",
279
+ trust_remote_code=True
280
+ )
281
+
282
+ # 2. Prepare Input
283
+ messages = [
284
+ {
285
+ "role": "user",
286
+ "content": [
287
+ {"type": "image", "url": "https://example.com/photo.jpg"},
288
+ {"type": "text", "text": "What is in this picture?"}
289
+ ]
290
+ },
291
+ ]
292
+ inputs = processor.apply_chat_template(
293
+ messages,
294
+ tokenize=True,
295
+ add_generation_prompt=True,
296
+ return_dict=True,
297
+ return_tensors="pt",
298
+ ).to(model.device)
299
+
300
+ # 3. Generate
301
+ generated_ids = model.generate(**inputs, max_new_tokens=128, do_sample=False)
302
+ output_text = processor.decode(generated_ids[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
303
+
304
+ print(output_text)
305
+ ```
306
+
307
+ ### 6.4 llama.cpp
308
+
309
+ **System Requirements**
310
+
311
+ GGUF Model Weights:
312
+
313
+ | Component | Quantization | File Size |
314
+ |---|---|---|
315
+ | Language Model | Q4_K_S | 111.5 GB |
316
+ | Language Model | IQ4_XS | 104.99 GB |
317
+ | Language Model | Q3_K_L | 102.5 GB |
318
+ | Multimodal Projector | FP16 | 3.97 GB |
319
+
320
+ - **Runtime Overhead:** ~7 GB
321
+ - **Minimum unified memory / VRAM:** 120 GB (e.g., Mac Studio, NVIDIA DGX Station, AMD Ryzen AI Max+ 395)
322
+ - **Recommended:** 128 GB unified memory
323
+
324
+ **Steps**
325
+
326
+ 1. Use llama.cpp:
327
+
328
+ ```bash
329
+ git clone https://github.com/stepfun-ai/llama.cpp.git
330
+ cd llama.cpp
331
+ git checkout -b step3.7 origin/step3.7
332
+ ```
333
+
334
+ 2. Build llama.cpp on Mac:
335
+
336
+ ```bash
337
+ cmake -B build-macos -S . \
338
+ -DCMAKE_BUILD_TYPE=Release \
339
+ -DBUILD_SHARED_LIBS=ON \
340
+ -DLLAMA_BUILD_SERVER=ON \
341
+ -DLLAMA_BUILD_TESTS=ON \
342
+ -DGGML_METAL=ON \
343
+ -DGGML_METAL_EMBED_LIBRARY=ON \
344
+ -DGGML_BLAS=ON \
345
+ -DGGML_BLAS_VENDOR=Apple \
346
+ -DGGML_ACCELERATE=ON \
347
+ -DGGML_NATIVE=ON
348
+ cmake --build build-macos -j8
349
+ ```
350
+
351
+ 3. Build llama.cpp on DGX-Spark:
352
+
353
+ ```bash
354
+ cmake -S . -B build-cuda \
355
+ -DCMAKE_BUILD_TYPE=Release \
356
+ -DGGML_CUDA=ON \
357
+ -DGGML_CUDA_GRAPHS=ON \
358
+ -DGGML_CUDA_FORCE_MMQ=ON \
359
+ -DLLAMA_OPENSSL=OFF \
360
+ -DLLAMA_BUILD_COMMON=ON \
361
+ -DLLAMA_BUILD_TOOLS=ON \
362
+ -DLLAMA_BUILD_SERVER=ON \
363
+ -DLLAMA_BUILD_EXAMPLES=OFF \
364
+ -DLLAMA_BUILD_TESTS=OFF
365
+ cmake --build build-cuda -j8
366
+ ```
367
+
368
+ 4. Build llama.cpp on AMD Windows:
369
+
370
+ ```bash
371
+ cmake -S . -B build-vulkan \
372
+ -DCMAKE_BUILD_TYPE=Release \
373
+ -DGGML_VULKAN=ON \
374
+ -DGGML_NATIVE=ON \
375
+ -DLLAMA_BUILD_SERVER=ON \
376
+ -DLLAMA_BUILD_UI=OFF \
377
+ -DLLAMA_BUILD_TOOLS=ON
378
+ cmake --build build-vulkan -j8
379
+ ```
380
+
381
+ 5. Run with `llama-cli`:
382
+
383
+ ```bash
384
+ ./llama-cli -m Step3.7_Q4_K_S.gguf -b 2048 -ub 2048 -fa on --temp 1.0 -p "What's your name?"
385
+ ```
386
+
387
+ 6. Test performance with `llama-batched-bench`:
388
+
389
+ ```bash
390
+ ./llama-batched-bench -m step3.7_Q4_K_S.gguf -c 32768 -b 2048 -ub 2048 -npp 0,2048,8192,16384,32768 -ntg 128 -npl 1
391
+ ```
392
+
393
+ ## 7. Using Step 3.7 Flash on Agent Platforms
394
+
395
+ You can use Step 3.7 Flash on Agent platforms such as Hermes Agent, OpenClaw, Kilo Code, and more.
396
+
397
+ ## 8. Getting in Touch
398
+
399
+ As we work to shape the future of AGI by expanding broad model capabilities, we want to ensure we are solving the right problems. We invite you to be part of this continuous feedback loop — your insights directly influence our priorities.
400
+
401
+ - **Join the Conversation:** Our [Discord](https://discord.gg/RcMJhNVAQc) community is the primary hub for brainstorming future architectures, proposing capabilities, and getting early access updates 🚀
402
+ - **Report Friction:** Encountering limitations? You can open an issue or start a discussion on GitHub / HuggingFace, or flag it directly in our Discord support channels.
403
+
404
+ ## 📄 License
405
+
406
+ This project is open-sourced under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).