Image-Text-to-Text
Transformers
Safetensors
English
step3p7
text-generation
vision-language
multimodal
Mixture of Experts
conversational
custom_code
Eval Results
Instructions to use stepfun-ai/Step-3.7-Flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stepfun-ai/Step-3.7-Flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="stepfun-ai/Step-3.7-Flash", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("stepfun-ai/Step-3.7-Flash", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use stepfun-ai/Step-3.7-Flash 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.7-Flash" # 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.7-Flash", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/stepfun-ai/Step-3.7-Flash
- SGLang
How to use stepfun-ai/Step-3.7-Flash 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.7-Flash" \ --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.7-Flash", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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.7-Flash" \ --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.7-Flash", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use stepfun-ai/Step-3.7-Flash with Docker Model Runner:
docker model run hf.co/stepfun-ai/Step-3.7-Flash
hengm3467 commited on
Commit ·
ee8c807
1
Parent(s): 1678751
clarify regional base_url and use env vars in examples
Browse files- add callout in Examples section with Global vs China base_url table
- switch 5.1 and 5.2 to read STEP_API_KEY and STEP_BASE_URL from env
- label platform.stepfun.ai/.com with Global/China in Availability bullet
README.md
CHANGED
|
@@ -41,7 +41,7 @@ Step 3.7 Flash is built for live engineering tasks and secured a definitive seco
|
|
| 41 |
| Output | $1.15 / M tokens |
|
| 42 |
|
| 43 |
## 4. Availability, Deployment, and Ecosystem
|
| 44 |
-
- Availability: Step 3.7 Flash is available through StepFun Open Platform
|
| 45 |
- 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.
|
| 46 |
- 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.
|
| 47 |
|
|
@@ -49,12 +49,30 @@ Step 3.7 Flash is built for live engineering tasks and secured a definitive seco
|
|
| 49 |
|
| 50 |
You can get started with Step 3.7 Flash in minutes using StepFun's API or via other inference providers.
|
| 51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
### 5.1 Chat Example
|
| 53 |
|
| 54 |
```python
|
|
|
|
| 55 |
from openai import OpenAI
|
| 56 |
|
| 57 |
-
client = OpenAI(
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
completion = client.chat.completions.create(
|
| 60 |
model="step-3.7-flash",
|
|
@@ -76,9 +94,13 @@ print(completion)
|
|
| 76 |
### 5.2 Text and Image Input Example
|
| 77 |
|
| 78 |
```python
|
|
|
|
| 79 |
from openai import OpenAI
|
| 80 |
|
| 81 |
-
client = OpenAI(
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
completion = client.chat.completions.create(
|
| 84 |
model="step-3.7-flash",
|
|
|
|
| 41 |
| Output | $1.15 / M tokens |
|
| 42 |
|
| 43 |
## 4. Availability, Deployment, and Ecosystem
|
| 44 |
+
- Availability: Step 3.7 Flash is available through StepFun Open Platform — [platform.stepfun.ai](https://platform.stepfun.ai) (Global) and [platform.stepfun.com](https://platform.stepfun.com) (China) — as well as partner platforms including OpenRouter and NVIDIA NIM.
|
| 45 |
- 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.
|
| 46 |
- 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.
|
| 47 |
|
|
|
|
| 49 |
|
| 50 |
You can get started with Step 3.7 Flash in minutes using StepFun's API or via other inference providers.
|
| 51 |
|
| 52 |
+
> **Note — 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.
|
| 53 |
+
>
|
| 54 |
+
> | Platform | Console | `base_url` |
|
| 55 |
+
> |---|---|---|
|
| 56 |
+
> | Global | [platform.stepfun.ai](https://platform.stepfun.ai) | `https://api.stepfun.ai/v1` |
|
| 57 |
+
> | China | [platform.stepfun.com](https://platform.stepfun.com) | `https://api.stepfun.com/v1` |
|
| 58 |
+
>
|
| 59 |
+
> To avoid hard-coding the wrong region, the examples below read both values from environment variables. Export them once before running:
|
| 60 |
+
>
|
| 61 |
+
> ```bash
|
| 62 |
+
> export STEP_API_KEY="sk-..."
|
| 63 |
+
> export STEP_BASE_URL="https://api.stepfun.ai/v1" # use https://api.stepfun.com/v1 for the China platform
|
| 64 |
+
> ```
|
| 65 |
+
|
| 66 |
### 5.1 Chat Example
|
| 67 |
|
| 68 |
```python
|
| 69 |
+
import os
|
| 70 |
from openai import OpenAI
|
| 71 |
|
| 72 |
+
client = OpenAI(
|
| 73 |
+
api_key=os.environ["STEP_API_KEY"],
|
| 74 |
+
base_url=os.environ["STEP_BASE_URL"],
|
| 75 |
+
)
|
| 76 |
|
| 77 |
completion = client.chat.completions.create(
|
| 78 |
model="step-3.7-flash",
|
|
|
|
| 94 |
### 5.2 Text and Image Input Example
|
| 95 |
|
| 96 |
```python
|
| 97 |
+
import os
|
| 98 |
from openai import OpenAI
|
| 99 |
|
| 100 |
+
client = OpenAI(
|
| 101 |
+
api_key=os.environ["STEP_API_KEY"],
|
| 102 |
+
base_url=os.environ["STEP_BASE_URL"],
|
| 103 |
+
)
|
| 104 |
|
| 105 |
completion = client.chat.completions.create(
|
| 106 |
model="step-3.7-flash",
|